From patchwork Tue Feb 27 00:04:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10243975 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A97B960386 for ; Tue, 27 Feb 2018 00:05:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A72E2A405 for ; Tue, 27 Feb 2018 00:05:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EE762A49E; Tue, 27 Feb 2018 00:05:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5F412A405 for ; Tue, 27 Feb 2018 00:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751631AbeB0AF2 (ORCPT ); Mon, 26 Feb 2018 19:05:28 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34429 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbeB0AEb (ORCPT ); Mon, 26 Feb 2018 19:04:31 -0500 Received: by mail-pg0-f65.google.com with SMTP id m19so6838165pgn.1 for ; Mon, 26 Feb 2018 16:04:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dbqY1MtAK4aL/FBrzy4hA6hntGdRhdxi/aooZ+NhCdA=; b=DUBwFuNxHtT88HMNeIqshn2AzphEBpNLHfzLmK8TY+m27nACijRjpIGzECVuZ3ZN5c ezojRjkW0/1duXZ4av2C3JOV1bALjgUSQ/UZ8iO5Uka6aB4p85i0neXy8BGEOYkrxxhB DW51JBxk+JF2T5aK3tqPtBpd0bIUZL4ttbt3M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dbqY1MtAK4aL/FBrzy4hA6hntGdRhdxi/aooZ+NhCdA=; b=RIHhTgM9iyuhSFMIaWIdD00DFqgqluuGNneQTeNAppfb4pODnhW6GgNtUgFzKQb1rq Ar/+6WVDdBLclayMdNofXwFutPhUffgakR2lTBrQzCH/eQOtoFQRJE0HrEou+MOdSobu C2m1OwYHkUIFiSiBbHl78EI9wC8c3yjnt2EPlXU1F680o0JM38h+EgYFUXBjoXw2TpT6 UA/xRtX7oKqXbI7GPff9pyw5H22+sweQ6/1gXwq+pFhG7Yi0lr9g+T0F60JvAkDUPn+v gIrst7800mmygPMpeaV3o0LDsx3Evoq9ULQODrh/gs9DaJ6qH0gCHzLF7PmG7UYG88nb h9tw== X-Gm-Message-State: APf1xPBXJ/ewgVPhPgaIOBGw4VBe2qP9ZJ7qWXs2Z318BDPVQUS+Oe+g Cf6l5ejr5SI06XnCWaz5xCgo9A== X-Google-Smtp-Source: AH8x2273FYn0KILCPIFQ6NEdtHwj91S3YvBDoDuzizhE/RmzE0msR399dXw1n8SDoeZa9PUxS42fUg== X-Received: by 10.99.175.87 with SMTP id s23mr9687279pgo.328.1519689870991; Mon, 26 Feb 2018 16:04:30 -0800 (PST) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id 184sm1039121pfg.125.2018.02.26.16.04.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Feb 2018 16:04:27 -0800 (PST) From: Kees Cook To: Greg Kroah-Hartman Cc: Kees Cook , Sami Tolvanen , Bartlomiej Zolnierkiewicz , Nicolas Pitre , Thomas Winischhofer , linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] console: Fill in struct consw argument names Date: Mon, 26 Feb 2018 16:04:19 -0800 Message-Id: <1519689860-7421-3-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519689860-7421-1-git-send-email-keescook@chromium.org> References: <1519689860-7421-1-git-send-email-keescook@chromium.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reading the function declarations for the console callbacks lacks any hints as to what the arguments are. Instead of going and digging around in various implementations that may each only have a subset of the callbacks, name all the arguments in the declaration. This has no functional change. Signed-off-by: Kees Cook --- include/linux/console.h | 58 +++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/include/linux/console.h b/include/linux/console.h index b8920a031a3e..dfd6b0e97855 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -46,46 +46,52 @@ enum con_scroll { struct consw { struct module *owner; const char *(*con_startup)(void); - void (*con_init)(struct vc_data *, int); - void (*con_deinit)(struct vc_data *); - void (*con_clear)(struct vc_data *, int, int, int, int); - void (*con_putc)(struct vc_data *, int, int, int); - void (*con_putcs)(struct vc_data *, const unsigned short *, int, int, int); - void (*con_cursor)(struct vc_data *, int); - bool (*con_scroll)(struct vc_data *, unsigned int top, + void (*con_init)(struct vc_data *vc, int init); + void (*con_deinit)(struct vc_data *vc); + void (*con_clear)(struct vc_data *vc, int sy, int sx, int height, + int width); + void (*con_putc)(struct vc_data *vc, int c, int ypos, int xpos); + void (*con_putcs)(struct vc_data *vc, const unsigned short *s, + int count, int ypos, int xpos); + void (*con_cursor)(struct vc_data *vc, int mode); + bool (*con_scroll)(struct vc_data *vc, unsigned int top, unsigned int bottom, enum con_scroll dir, unsigned int lines); - int (*con_switch)(struct vc_data *); - int (*con_blank)(struct vc_data *, int, int); - int (*con_font_set)(struct vc_data *, struct console_font *, unsigned); - int (*con_font_get)(struct vc_data *, struct console_font *); - int (*con_font_default)(struct vc_data *, struct console_font *, char *); - int (*con_font_copy)(struct vc_data *, int); - int (*con_resize)(struct vc_data *, unsigned int, unsigned int, - unsigned int); - void (*con_set_palette)(struct vc_data *, + int (*con_switch)(struct vc_data *vc); + int (*con_blank)(struct vc_data *vc, int blank, int mode_switch); + int (*con_font_set)(struct vc_data *vc, struct console_font *font, + unsigned int flags); + int (*con_font_get)(struct vc_data *vc, struct console_font *font); + int (*con_font_default)(struct vc_data *vc, + struct console_font *font, char *name); + int (*con_font_copy)(struct vc_data *vc, int con); + int (*con_resize)(struct vc_data *vc, unsigned int width, + unsigned int height, unsigned int user); + void (*con_set_palette)(struct vc_data *vc, const unsigned char *table); - void (*con_scrolldelta)(struct vc_data *, int lines); - int (*con_set_origin)(struct vc_data *); - void (*con_save_screen)(struct vc_data *); - u8 (*con_build_attr)(struct vc_data *, u8, u8, u8, u8, u8, u8); - void (*con_invert_region)(struct vc_data *, u16 *, int); - u16 *(*con_screen_pos)(struct vc_data *, int); - unsigned long (*con_getxy)(struct vc_data *, unsigned long, int *, int *); + void (*con_scrolldelta)(struct vc_data *vc, int lines); + int (*con_set_origin)(struct vc_data *vc); + void (*con_save_screen)(struct vc_data *vc); + u8 (*con_build_attr)(struct vc_data *vc, u8 color, u8 intensity, + u8 blink, u8 underline, u8 reverse, u8 italic); + void (*con_invert_region)(struct vc_data *vc, u16 *p, int count); + u16 *(*con_screen_pos)(struct vc_data *vc, int offset); + unsigned long (*con_getxy)(struct vc_data *vc, unsigned long position, + int *px, int *py); /* * Flush the video console driver's scrollback buffer */ - void (*con_flush_scrollback)(struct vc_data *); + void (*con_flush_scrollback)(struct vc_data *vc); /* * Prepare the console for the debugger. This includes, but is not * limited to, unblanking the console, loading an appropriate * palette, and allowing debugger generated output. */ - int (*con_debug_enter)(struct vc_data *); + int (*con_debug_enter)(struct vc_data *vc); /* * Restore the console to its pre-debug state as closely as possible. */ - int (*con_debug_leave)(struct vc_data *); + int (*con_debug_leave)(struct vc_data *vc); }; extern const struct consw *conswitchp;