linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/36] Rid W=1 issues from TTY
@ 2020-11-04 19:35 Lee Jones
  2020-11-04 19:35 ` [PATCH 01/36] tty: serdev: core: Remove unused variable 'dummy' Lee Jones
                   ` (36 more replies)
  0 siblings, 37 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alexandre Torgue, Andrew J. Kroll, Andrew Morton,
	Andy Gross, Benjamin Herrenschmidt, Bill Hawes, Bjorn Andersson,
	Christian König, Colin Ian King, C. Scott Ananian,
	David A. Hinds, dri-devel, Filip Aben, Gerald Baeza,
	Greg Kroah-Hartman, Jakub Jelinek, Jan Dumon, Jiri Slaby,
	Jonathan Hunter, Joseph Barrow, --,
	Kevin Wells, Laxman Dewangan, linaro-mm-sig, linux-arm-msm,
	linux-media, linuxppc-dev, linux-riscv, linux-serial,
	linux-stm32, linux-tegra, Marko Kohtala, Maxime Coquelin,
	Michael Ellerman, Michal Simek, Mike Hudson, Miloslav Trmac,
	Nick Holloway, Palmer Dabbelt, paulkf, Paul Mackerras,
	Paul Walmsley, Philipp Zabel, processes-Sapan Bhatia,
	Robert Love, Rob Herring, Roland Stigge, Russell King,
	Russell King, Russ Gorby, Stanislav Voronyi, Sumit Semwal,
	Sylvain Lemieux, Thierry Reding, Vladimir Zapolskiy

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

Lee Jones (36):
  tty: serdev: core: Remove unused variable 'dummy'
  tty: serdev: core: Provide missing description for 'owner'
  tty: tty_baudrate: Add missing description for 'tty'
  tty: tty_io: Move 'tty_sysctl_init's prototype to shared space
  tty: tty_buffer: Add missing description for 'limit'
  tty: tty_port: Demote obvious abuse of kernel-doc formatting
  tty: tty_jobctrl: Add missing function parameter descriptions
  tty: tty_ldisc: Fix some kernel-doc related misdemeanours
  tty: vt: consolemap: Demote weakly documented function header
  tty: n_tty: Add 2 missing parameter descriptions
  tty: serial: jsm: jsm_cls: Remove unused variable 'discard'
  tty: tty_io: Fix some kernel-doc issues
  tty: serial: 8250: 8250_port: Staticify functions referenced by
    pointers
  tty: serial: 8250: serial_cs: Remove unused/unchecked variable 'err'
  tty: tty_audit: Demote non-conformant kernel-doc headers
  tty: pty: Provide descriptions for the 'file' parameters
  tty: serial: amba-pl011: Mark 'sbsa_uart_acpi_match' as __maybe_unused
  tty: n_gsm: Demote obvious abuse of kernel-doc and supply other
    missing docss
  tty: serial: lpc32xx_hs: Remove unused variable 'tmp'
  tty: serial: msm_serial: Remove set but unused variable 'status'
  tty: serial: ifx6x60: Fix function documentation headers
  tty: serial: xilinx_uartps: Supply description for missing member
    'cts_override'
  tty: synclink_gt: Demote one kernel-doc header and repair another
  tty: serial: serial-tegra: Struct headers should start with 'struct
    <name>'
  tty: serial: sifive: Struct headers should start with 'struct <name>'
  tty: synclinkmp: Add missing description for function param 'txqueue'
  tty: synclinkmp: Mark never checked 'readval' as __always_unused
  tty: serial: stm32-usart: Remove set but unused 'cookie' variables
  tty: tty_ldisc: Supply missing description for 'tty_ldisc_get's 'tty'
    param
  tty: serial: serial-tegra: Provide some missing struct member
    descriptions
  powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to
    shared location
  tty: hvc: hvc_vio: Staticify function invoked only by reference
  tty: hvc: hvc_opal: Staticify function invoked by reference
  tty: serial: pmac_zilog: Make disposable variable __always_unused
  tty: synclink: Mark disposable variables as __always_unused
  tty: synclink: Provide missing description for 'hdlcdev_tx_timeout's
    'txqueue' param

 arch/powerpc/include/asm/hvconsole.h     |  3 +++
 arch/powerpc/platforms/pseries/pseries.h |  3 ---
 arch/powerpc/platforms/pseries/setup.c   |  1 +
 drivers/tty/hvc/hvc_opal.c               |  2 +-
 drivers/tty/hvc/hvc_vio.c                |  2 +-
 drivers/tty/n_gsm.c                      |  4 +++-
 drivers/tty/n_tty.c                      |  2 ++
 drivers/tty/pty.c                        |  2 ++
 drivers/tty/serdev/core.c                |  6 ++----
 drivers/tty/serial/8250/8250_port.c      |  4 ++--
 drivers/tty/serial/8250/serial_cs.c      |  9 +++------
 drivers/tty/serial/amba-pl011.c          |  2 +-
 drivers/tty/serial/ifx6x60.c             |  3 ++-
 drivers/tty/serial/jsm/jsm_cls.c         |  4 +---
 drivers/tty/serial/lpc32xx_hs.c          |  3 +--
 drivers/tty/serial/msm_serial.c          |  3 +--
 drivers/tty/serial/pmac_zilog.h          |  2 +-
 drivers/tty/serial/serial-tegra.c        |  7 ++++++-
 drivers/tty/serial/sifive.c              |  3 ++-
 drivers/tty/serial/stm32-usart.c         |  6 ++----
 drivers/tty/serial/xilinx_uartps.c       |  1 +
 drivers/tty/synclink.c                   |  5 +++--
 drivers/tty/synclink_gt.c                |  3 ++-
 drivers/tty/synclinkmp.c                 |  3 ++-
 drivers/tty/tty_audit.c                  | 12 ++++++------
 drivers/tty/tty_baudrate.c               |  1 +
 drivers/tty/tty_buffer.c                 |  1 +
 drivers/tty/tty_io.c                     | 12 +++++++-----
 drivers/tty/tty_jobctrl.c                |  3 +++
 drivers/tty/tty_ldisc.c                  | 11 ++++++-----
 drivers/tty/tty_port.c                   |  4 ++--
 drivers/tty/vt/consolemap.c              |  3 +--
 include/linux/tty.h                      |  1 +
 33 files changed, 73 insertions(+), 58 deletions(-)

Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: "Andrew J. Kroll" <ag784@freenet.buffalo.edu>
Cc: Andrew Morton <andrewm@uow.edu.eu>
Cc: Andy Gross <agross@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bill Hawes <whawes@star.net>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: "C. Scott Ananian" <cananian@alumni.princeton.edu>
Cc: "David A. Hinds" <dahinds@users.sourceforge.net>
Cc: dri-devel@lists.freedesktop.org
Cc: Filip Aben <f.aben@option.com>
Cc: Gerald Baeza <gerald.baeza@st.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jakub Jelinek <jj@ultra.linux.cz>
Cc: Jan Dumon <j.dumon@option.com>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Joseph Barrow <d.barow@option.com>
Cc: -- <julian@uhunix.uhcc.hawaii.edu>
Cc: Kevin Wells <kevin.wells@nxp.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: linaro-mm-sig@lists.linaro.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-riscv@lists.infradead.org
Cc: linux-serial@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-tegra@vger.kernel.org
Cc: Marko Kohtala <Marko.Kohtala@hut.fi>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Mike Hudson <Exoray@isys.ca>
Cc: Miloslav Trmac <mitr@redhat.com>
Cc: Nick Holloway <alfie@dcs.warwick.ac.uk>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: paulkf@microgate.com
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: processes-Sapan Bhatia <sapan@corewars.org>
Cc: Robert Love <rlove@google.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Russ Gorby <russ.gorby@intel.com>
Cc: Stanislav Voronyi <stas@cnti.uanet.kharkov.ua>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Sylvain Lemieux <slemieux.tyco@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
-- 
2.25.1


^ permalink raw reply	[flat|nested] 84+ messages in thread

* [PATCH 01/36] tty: serdev: core: Remove unused variable 'dummy'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 02/36] tty: serdev: core: Provide missing description for 'owner' Lee Jones
                   ` (35 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Rob Herring, Greg Kroah-Hartman, Jiri Slaby, linux-serial

No need to have a dummy variable here.

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serdev/core.c: In function ‘serdev_controller_remove’:
 drivers/tty/serdev/core.c:791:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]

Cc: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serdev/core.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index c5f0d936b003a..fecc28a73b3b2 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -788,13 +788,10 @@ static int serdev_remove_device(struct device *dev, void *data)
  */
 void serdev_controller_remove(struct serdev_controller *ctrl)
 {
-	int dummy;
-
 	if (!ctrl)
 		return;
 
-	dummy = device_for_each_child(&ctrl->dev, NULL,
-				      serdev_remove_device);
+	device_for_each_child(&ctrl->dev, NULL, serdev_remove_device);
 	pm_runtime_disable(&ctrl->dev);
 	device_del(&ctrl->dev);
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 02/36] tty: serdev: core: Provide missing description for 'owner'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
  2020-11-04 19:35 ` [PATCH 01/36] tty: serdev: core: Remove unused variable 'dummy' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 03/36] tty: tty_baudrate: Add missing description for 'tty' Lee Jones
                   ` (34 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Rob Herring, Greg Kroah-Hartman, Jiri Slaby, linux-serial

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serdev/core.c: In function ‘serdev_controller_remove’:
 drivers/tty/serdev/core.c:811: warning: Function parameter or member 'owner' not described in '__serdev_device_driver_register'

Cc: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serdev/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index fecc28a73b3b2..aead0c0c97966 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -800,6 +800,7 @@ EXPORT_SYMBOL_GPL(serdev_controller_remove);
 /**
  * serdev_driver_register() - Register client driver with serdev core
  * @sdrv:	client driver to be associated with client-device.
+ * @owner:	client driver owner to set.
  *
  * This API will register the client driver with the serdev framework.
  * It is typically called from the driver's module-init function.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 03/36] tty: tty_baudrate: Add missing description for 'tty'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
  2020-11-04 19:35 ` [PATCH 01/36] tty: serdev: core: Remove unused variable 'dummy' Lee Jones
  2020-11-04 19:35 ` [PATCH 02/36] tty: serdev: core: Provide missing description for 'owner' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 04/36] tty: tty_io: Move 'tty_sysctl_init's prototype to shared space Lee Jones
                   ` (33 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby

Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_baudrate.c:234: warning: Function parameter or member 'tty' not described in 'tty_encode_baud_rate'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/tty_baudrate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/tty_baudrate.c b/drivers/tty/tty_baudrate.c
index 84fec3c62d6a4..6551b188b736b 100644
--- a/drivers/tty/tty_baudrate.c
+++ b/drivers/tty/tty_baudrate.c
@@ -222,6 +222,7 @@ EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
 
 /**
  *	tty_encode_baud_rate		-	set baud rate of the tty
+ *	@tty:   terminal device
  *	@ibaud: input baud rate
  *	@obaud: output baud rate
  *
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 04/36] tty: tty_io: Move 'tty_sysctl_init's prototype to shared space
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (2 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 03/36] tty: tty_baudrate: Add missing description for 'tty' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 05/36] tty: tty_buffer: Add missing description for 'limit' Lee Jones
                   ` (32 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Nick Holloway, --,
	Marko Kohtala, Bill Hawes, C. Scott Ananian, Russell King,
	Andrew Morton

Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_ldisc.c:883:6: warning: no previous prototype for ‘tty_sysctl_init’ [-Wmissing-prototypes]
 883 | void tty_sysctl_init(void)
 | ^~~~~~~~~~~~~~~

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Nick Holloway <alfie@dcs.warwick.ac.uk>
Cc: -- <julian@uhunix.uhcc.hawaii.edu>
Cc: Marko Kohtala <Marko.Kohtala@hut.fi>
Cc: Bill Hawes <whawes@star.net>
Cc: "C. Scott Ananian" <cananian@alumni.princeton.edu>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Andrew Morton <andrewm@uow.edu.eu>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/tty_io.c | 2 --
 include/linux/tty.h  | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 7a4c02548fb3f..88b00c47b606e 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -514,8 +514,6 @@ static const struct file_operations hung_up_tty_fops = {
 static DEFINE_SPINLOCK(redirect_lock);
 static struct file *redirect;
 
-extern void tty_sysctl_init(void);
-
 /**
  *	tty_wakeup	-	request more data
  *	@tty: terminal
diff --git a/include/linux/tty.h b/include/linux/tty.h
index a99e9b8e4e316..10212c6e4345e 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -716,6 +716,7 @@ extern int __must_check tty_ldisc_init(struct tty_struct *tty);
 extern void tty_ldisc_deinit(struct tty_struct *tty);
 extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
 				 char *f, int count);
+extern void tty_sysctl_init(void);
 
 /* n_tty.c */
 extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 05/36] tty: tty_buffer: Add missing description for 'limit'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (3 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 04/36] tty: tty_io: Move 'tty_sysctl_init's prototype to shared space Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 06/36] tty: tty_port: Demote obvious abuse of kernel-doc formatting Lee Jones
                   ` (31 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby

Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_buffer.c:592: warning: Function parameter or member 'limit' not described in 'tty_buffer_set_limit'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/tty_buffer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index bd2d91546e327..6d4995a5f3187 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -583,6 +583,7 @@ void tty_buffer_init(struct tty_port *port)
 /**
  *	tty_buffer_set_limit	-	change the tty buffer memory limit
  *	@port: tty port to change
+ *	@limit: memory limit to set
  *
  *	Change the tty buffer memory limit.
  *	Must be called before the other tty buffer functions are used.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 06/36] tty: tty_port: Demote obvious abuse of kernel-doc formatting
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (4 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 05/36] tty: tty_buffer: Add missing description for 'limit' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 07/36] tty: tty_jobctrl: Add missing function parameter descriptions Lee Jones
                   ` (30 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby

Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_port.c:633: warning: Function parameter or member 'port' not described in 'tty_port_close'
 drivers/tty/tty_port.c:633: warning: Function parameter or member 'tty' not described in 'tty_port_close'
 drivers/tty/tty_port.c:633: warning: Function parameter or member 'filp' not described in 'tty_port_close'
 drivers/tty/tty_port.c:672: warning: Function parameter or member 'port' not described in 'tty_port_open'
 drivers/tty/tty_port.c:672: warning: Function parameter or member 'tty' not described in 'tty_port_open'
 drivers/tty/tty_port.c:672: warning: Function parameter or member 'filp' not described in 'tty_port_open'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/tty_port.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index ea80bf872f543..346d20f4a4862 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -623,7 +623,7 @@ void tty_port_close_end(struct tty_port *port, struct tty_struct *tty)
 }
 EXPORT_SYMBOL(tty_port_close_end);
 
-/**
+/*
  * tty_port_close
  *
  * Caller holds tty lock
@@ -659,7 +659,7 @@ int tty_port_install(struct tty_port *port, struct tty_driver *driver,
 }
 EXPORT_SYMBOL_GPL(tty_port_install);
 
-/**
+/*
  * tty_port_open
  *
  * Caller holds tty lock.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 07/36] tty: tty_jobctrl: Add missing function parameter descriptions
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (5 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 06/36] tty: tty_port: Demote obvious abuse of kernel-doc formatting Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours Lee Jones
                   ` (29 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby

Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_jobctrl.c:32: warning: Function parameter or member 'sig' not described in '__tty_check_change'
 drivers/tty/tty_jobctrl.c:95: warning: Function parameter or member 'tty' not described in '__proc_set_tty'
 drivers/tty/tty_jobctrl.c:344: warning: Function parameter or member 'file' not described in 'tiocsctty'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/tty_jobctrl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/tty_jobctrl.c b/drivers/tty/tty_jobctrl.c
index 28a23a0fef21c..2054e4164c660 100644
--- a/drivers/tty/tty_jobctrl.c
+++ b/drivers/tty/tty_jobctrl.c
@@ -21,6 +21,7 @@ static int is_ignored(int sig)
 /**
  *	tty_check_change	-	check for POSIX terminal changes
  *	@tty: tty to check
+ *	@sig: signal to send
  *
  *	If we try to write to, or set the state of, a terminal and we're
  *	not in the foreground, send a SIGTTOU.  If the signal is blocked or
@@ -83,6 +84,7 @@ void proc_clear_tty(struct task_struct *p)
 
 /**
  * proc_set_tty -  set the controlling terminal
+ *	@tty: tty structure
  *
  * Only callable by the session leader and only if it does not already have
  * a controlling terminal.
@@ -330,6 +332,7 @@ void no_tty(void)
 /**
  *	tiocsctty	-	set controlling tty
  *	@tty: tty structure
+ *	@file: file structure used to check permissions
  *	@arg: user argument
  *
  *	This ioctl is used to manage job control. It permits a session
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (6 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 07/36] tty: tty_jobctrl: Add missing function parameter descriptions Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-05  8:12   ` Jiri Slaby
  2020-11-04 19:35 ` [PATCH 09/36] tty: vt: consolemap: Demote weakly documented function header Lee Jones
                   ` (28 subsequent siblings)
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby

 - Functions must follow directly on from their headers
 - Demote non-conforming kernel-doc header
 - Ensure notes have unique section names
 - Provide missing description for 'reinit'

Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_ldisc.c:158: warning: cannot understand function prototype: 'int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD); '
 drivers/tty/tty_ldisc.c:199: warning: Function parameter or member 'ld' not described in 'tty_ldisc_put'
 drivers/tty/tty_ldisc.c:260: warning: duplicate section name 'Note'
 drivers/tty/tty_ldisc.c:717: warning: Function parameter or member 'reinit' not described in 'tty_ldisc_hangup'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/tty_ldisc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index fe37ec331289b..aced2bf6173be 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -135,6 +135,7 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
 	raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags);
 }
 
+static int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD);
 /**
  *	tty_ldisc_get		-	take a reference to an ldisc
  *	@disc: ldisc number
@@ -155,8 +156,6 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
  *		takes tty_ldiscs_lock to guard against ldisc races
  */
 
-static int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD);
-
 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
 {
 	struct tty_ldisc *ld;
@@ -190,7 +189,7 @@ static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
 	return ld;
 }
 
-/**
+/*
  *	tty_ldisc_put		-	release the ldisc
  *
  *	Complement of tty_ldisc_get().
@@ -250,12 +249,12 @@ const struct seq_operations tty_ldiscs_seq_ops = {
  *	Returns: NULL if the tty has been hungup and not re-opened with
  *		 a new file descriptor, otherwise valid ldisc reference
  *
- *	Note: Must not be called from an IRQ/timer context. The caller
+ *	Note 1: Must not be called from an IRQ/timer context. The caller
  *	must also be careful not to hold other locks that will deadlock
  *	against a discipline change, such as an existing ldisc reference
  *	(which we check for)
  *
- *	Note: a file_operations routine (read/poll/write) should use this
+ *	Note 2: a file_operations routine (read/poll/write) should use this
  *	function to wait for any ldisc lifetime events to finish.
  */
 
@@ -701,6 +700,7 @@ int tty_ldisc_reinit(struct tty_struct *tty, int disc)
 /**
  *	tty_ldisc_hangup		-	hangup ldisc reset
  *	@tty: tty being hung up
+ *	@reinit: whether to re-initialise the tty
  *
  *	Some tty devices reset their termios when they receive a hangup
  *	event. In that situation we must also switch back to N_TTY properly
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 09/36] tty: vt: consolemap: Demote weakly documented function header
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (7 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 10/36] tty: n_tty: Add 2 missing parameter descriptions Lee Jones
                   ` (27 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Jakub Jelinek,
	Stanislav Voronyi

Fixes the following W=1 kernel build warning(s):

 drivers/tty/vt/consolemap.c:739: warning: Function parameter or member 'ct' not described in 'con_get_unimap'
 drivers/tty/vt/consolemap.c:739: warning: Function parameter or member 'uct' not described in 'con_get_unimap'
 drivers/tty/vt/consolemap.c:739: warning: Function parameter or member 'list' not described in 'con_get_unimap'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Jakub Jelinek <jj@ultra.linux.cz>
Cc: Stanislav Voronyi <stas@cnti.uanet.kharkov.ua>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/vt/consolemap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
index 5d778c0aa0091..f7d015c67963d 100644
--- a/drivers/tty/vt/consolemap.c
+++ b/drivers/tty/vt/consolemap.c
@@ -728,9 +728,8 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc)
 }
 EXPORT_SYMBOL(con_copy_unimap);
 
-/**
+/*
  *	con_get_unimap		-	get the unicode map
- *	@vc: the console to read from
  *
  *	Read the console unicode data for this console. Called from the ioctl
  *	handlers.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 10/36] tty: n_tty: Add 2 missing parameter descriptions
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (8 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 09/36] tty: vt: consolemap: Demote weakly documented function header Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 11/36] tty: serial: jsm: jsm_cls: Remove unused variable 'discard' Lee Jones
                   ` (26 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Andrew J. Kroll,
	processes-Sapan Bhatia

Fixes the following W=1 kernel build warning(s):

 drivers/tty/n_tty.c:405: warning: Function parameter or member 'tty' not described in 'is_continuation'
 drivers/tty/n_tty.c:1701: warning: Function parameter or member 'flow' not described in 'n_tty_receive_buf_common'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: "Andrew J. Kroll" <ag784@freenet.buffalo.edu>
Cc: processes-Sapan Bhatia <sapan@corewars.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/n_tty.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 7e5e363152607..319d68c8a5df3 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -396,6 +396,7 @@ static inline int is_utf8_continuation(unsigned char c)
 /**
  *	is_continuation		-	multibyte check
  *	@c: byte to check
+ *	@tty: terminal device
  *
  *	Returns true if the utf8 character 'c' is a multibyte continuation
  *	character and the terminal is in unicode mode.
@@ -1668,6 +1669,7 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
  *	@cp: input chars
  *	@fp: flags for each char (if NULL, all chars are TTY_NORMAL)
  *	@count: number of input chars in @cp
+ *	@flow: enable flow control
  *
  *	Called by the terminal driver when a block of characters has
  *	been received. This function must be called from soft contexts
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 11/36] tty: serial: jsm: jsm_cls: Remove unused variable 'discard'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (9 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 10/36] tty: n_tty: Add 2 missing parameter descriptions Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues Lee Jones
                   ` (25 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, linux-serial

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/jsm/jsm_cls.c: In function ‘cls_copy_data_from_uart_to_queue’:
 drivers/tty/serial/jsm/jsm_cls.c:400:7: warning: variable ‘discard’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/jsm/jsm_cls.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_cls.c b/drivers/tty/serial/jsm/jsm_cls.c
index c061a7b7bd233..b507a2cec9269 100644
--- a/drivers/tty/serial/jsm/jsm_cls.c
+++ b/drivers/tty/serial/jsm/jsm_cls.c
@@ -397,10 +397,8 @@ static void cls_copy_data_from_uart_to_queue(struct jsm_channel *ch)
 		 * which in this case is the break signal.
 		 */
 		if (linestatus & error_mask)  {
-			u8 discard;
-
 			linestatus = 0;
-			discard = readb(&ch->ch_cls_uart->txrx);
+			readb(&ch->ch_cls_uart->txrx);
 			continue;
 		}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (10 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 11/36] tty: serial: jsm: jsm_cls: Remove unused variable 'discard' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-05  8:16   ` Jiri Slaby
  2020-11-04 19:35 ` [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers Lee Jones
                   ` (24 subsequent siblings)
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Nick Holloway, --,
	Marko Kohtala, Bill Hawes, C. Scott Ananian, Russell King,
	Andrew Morton

Demote non-conformant headers and supply some missing descriptions.

Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_io.c:218: warning: Function parameter or member 'file' not described in 'tty_free_file'
 drivers/tty/tty_io.c:566: warning: Function parameter or member 'exit_session' not described in '__tty_hangup'
 drivers/tty/tty_io.c:1077: warning: Function parameter or member 'tty' not described in 'tty_send_xchar'
 drivers/tty/tty_io.c:1077: warning: Function parameter or member 'ch' not described in 'tty_send_xchar'
 drivers/tty/tty_io.c:1155: warning: Function parameter or member 'file' not described in 'tty_driver_lookup_tty'
 drivers/tty/tty_io.c:1508: warning: Function parameter or member 'tty' not described in 'release_tty'
 drivers/tty/tty_io.c:1508: warning: Function parameter or member 'idx' not described in 'release_tty'
 drivers/tty/tty_io.c:2973: warning: Function parameter or member 'driver' not described in 'alloc_tty_struct'
 drivers/tty/tty_io.c:2973: warning: Function parameter or member 'idx' not described in 'alloc_tty_struct'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Nick Holloway <alfie@dcs.warwick.ac.uk>
Cc: -- <julian@uhunix.uhcc.hawaii.edu>
Cc: Marko Kohtala <Marko.Kohtala@hut.fi>
Cc: Bill Hawes <whawes@star.net>
Cc: "C. Scott Ananian" <cananian@alumni.princeton.edu>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Andrew Morton <andrewm@uow.edu.eu>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/tty_io.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 88b00c47b606e..f50286fb080da 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -208,7 +208,7 @@ void tty_add_file(struct tty_struct *tty, struct file *file)
 	spin_unlock(&tty->files_lock);
 }
 
-/**
+/*
  * tty_free_file - free file->private_data
  *
  * This shall be used only for fail path handling when tty_add_file was not
@@ -543,6 +543,7 @@ EXPORT_SYMBOL_GPL(tty_wakeup);
 /**
  *	__tty_hangup		-	actual handler for hangup events
  *	@tty: tty device
+ *	@exit_session: if non-zero, signal all foreground group processes
  *
  *	This can be called by a "kworker" kernel thread.  That is process
  *	synchronous but doesn't hold any locks, so we need to make sure we
@@ -1065,7 +1066,7 @@ ssize_t redirected_tty_write(struct file *file, const char __user *buf,
 	return tty_write(file, buf, count, ppos);
 }
 
-/**
+/*
  *	tty_send_xchar	-	send priority character
  *
  *	Send a high priority character to the tty even if stopped
@@ -1143,6 +1144,7 @@ static ssize_t tty_line_name(struct tty_driver *driver, int index, char *p)
 /**
  *	tty_driver_lookup_tty() - find an existing tty, if any
  *	@driver: the driver for the tty
+ *	@file:   file object
  *	@idx:	 the minor number
  *
  *	Return the tty, if found. If not found, return NULL or ERR_PTR() if the
@@ -1494,6 +1496,8 @@ EXPORT_SYMBOL(tty_kref_put);
 
 /**
  *	release_tty		-	release tty structure memory
+ *	@tty: tty device release
+ *	@idx: index of the tty device release
  *
  *	Release both @tty and a possible linked partner (think pty pair),
  *	and decrement the refcount of the backing module.
@@ -2961,7 +2965,7 @@ static struct device *tty_get_device(struct tty_struct *tty)
 }
 
 
-/**
+/*
  *	alloc_tty_struct
  *
  *	This subroutine allocates and initializes a tty structure.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (11 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-06  9:53   ` Greg Kroah-Hartman
  2020-11-04 19:35 ` [PATCH 14/36] tty: serial: 8250: serial_cs: Remove unused/unchecked variable 'err' Lee Jones
                   ` (23 subsequent siblings)
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Mike Hudson, linux-serial

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
 drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Mike Hudson <Exoray@isys.ca>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/8250/8250_port.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index b0af13074cd36..ebce4406dc289 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -346,7 +346,7 @@ static const s8 au_io_out_map[8] = {
 	-1,	/* UART_SCR (unmapped) */
 };
 
-unsigned int au_serial_in(struct uart_port *p, int offset)
+static unsigned int au_serial_in(struct uart_port *p, int offset)
 {
 	if (offset >= ARRAY_SIZE(au_io_in_map))
 		return UINT_MAX;
@@ -356,7 +356,7 @@ unsigned int au_serial_in(struct uart_port *p, int offset)
 	return __raw_readl(p->membase + (offset << p->regshift));
 }
 
-void au_serial_out(struct uart_port *p, int offset, int value)
+static void au_serial_out(struct uart_port *p, int offset, int value)
 {
 	if (offset >= ARRAY_SIZE(au_io_out_map))
 		return;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 14/36] tty: serial: 8250: serial_cs: Remove unused/unchecked variable 'err'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (12 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 15/36] tty: tty_audit: Demote non-conformant kernel-doc headers Lee Jones
                   ` (22 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Colin Ian King,
	David A. Hinds, linux-serial

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/8250/serial_cs.c: In function ‘multi_config’:
 drivers/tty/serial/8250/serial_cs.c:562:7: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: "David A. Hinds" <dahinds@users.sourceforge.net>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/8250/serial_cs.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8250/serial_cs.c
index e3d10794dbba3..35ff6627c61be 100644
--- a/drivers/tty/serial/8250/serial_cs.c
+++ b/drivers/tty/serial/8250/serial_cs.c
@@ -559,16 +559,13 @@ static int multi_config(struct pcmcia_device *link)
 	 */
 	if (info->manfid == MANFID_OXSEMI || (info->manfid == MANFID_POSSIO &&
 				info->prodid == PRODID_POSSIO_GCC)) {
-		int err;
-
 		if (link->config_index == 1 ||
 		    link->config_index == 3) {
-			err = setup_serial(link, info, base2,
-					link->irq);
+			setup_serial(link, info, base2, link->irq);
 			base2 = link->resource[0]->start;
 		} else {
-			err = setup_serial(link, info, link->resource[0]->start,
-					link->irq);
+			setup_serial(link, info, link->resource[0]->start,
+				     link->irq);
 		}
 		info->c950ctrl = base2;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 15/36] tty: tty_audit: Demote non-conformant kernel-doc headers
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (13 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 14/36] tty: serial: 8250: serial_cs: Remove unused/unchecked variable 'err' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 16/36] tty: pty: Provide descriptions for the 'file' parameters Lee Jones
                   ` (21 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Miloslav Trmac

Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_audit.c:91: warning: Function parameter or member 'buf' not described in 'tty_audit_buf_push'
 drivers/tty/tty_audit.c:129: warning: Function parameter or member 'sig' not described in 'tty_audit_fork'
 drivers/tty/tty_audit.c:137: warning: Function parameter or member 'tty' not described in 'tty_audit_tiocsti'
 drivers/tty/tty_audit.c:137: warning: Function parameter or member 'ch' not described in 'tty_audit_tiocsti'
 drivers/tty/tty_audit.c:202: warning: Function parameter or member 'tty' not described in 'tty_audit_add_data'
 drivers/tty/tty_audit.c:202: warning: Function parameter or member 'data' not described in 'tty_audit_add_data'
 drivers/tty/tty_audit.c:202: warning: Function parameter or member 'size' not described in 'tty_audit_add_data'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Miloslav Trmac <mitr@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/tty_audit.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c
index 9f906a5b8e810..32898aabcd068 100644
--- a/drivers/tty/tty_audit.c
+++ b/drivers/tty/tty_audit.c
@@ -81,7 +81,7 @@ static void tty_audit_log(const char *description, dev_t dev,
 	}
 }
 
-/**
+/*
  *	tty_audit_buf_push	-	Push buffered data out
  *
  *	Generate an audit message from the contents of @buf, which is owned by
@@ -120,7 +120,7 @@ void tty_audit_exit(void)
 	tty_audit_buf_free(buf);
 }
 
-/**
+/*
  *	tty_audit_fork	-	Copy TTY audit state for a new task
  *
  *	Set up TTY audit state in @sig from current.  @sig needs no locking.
@@ -130,7 +130,7 @@ void tty_audit_fork(struct signal_struct *sig)
 	sig->audit_tty = current->signal->audit_tty;
 }
 
-/**
+/*
  *	tty_audit_tiocsti	-	Log TIOCSTI
  */
 void tty_audit_tiocsti(struct tty_struct *tty, char ch)
@@ -145,7 +145,7 @@ void tty_audit_tiocsti(struct tty_struct *tty, char ch)
 		tty_audit_log("ioctl=TIOCSTI", dev, &ch, 1);
 }
 
-/**
+/*
  *	tty_audit_push	-	Flush current's pending audit data
  *
  *	Returns 0 if success, -EPERM if tty audit is disabled
@@ -166,7 +166,7 @@ int tty_audit_push(void)
 	return 0;
 }
 
-/**
+/*
  *	tty_audit_buf_get	-	Get an audit buffer.
  *
  *	Get an audit buffer, allocate it if necessary.  Return %NULL
@@ -193,7 +193,7 @@ static struct tty_audit_buf *tty_audit_buf_get(void)
 	return tty_audit_buf_ref();
 }
 
-/**
+/*
  *	tty_audit_add_data	-	Add data for TTY auditing.
  *
  *	Audit @data of @size from @tty, if necessary.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 16/36] tty: pty: Provide descriptions for the 'file' parameters
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (14 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 15/36] tty: tty_audit: Demote non-conformant kernel-doc headers Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 17/36] tty: serial: amba-pl011: Mark 'sbsa_uart_acpi_match' as __maybe_unused Lee Jones
                   ` (20 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, C. Scott Ananian

Fixes the following W=1 kernel build warning(s):

 drivers/tty/pty.c:710: warning: Function parameter or member 'file' not described in 'ptm_unix98_lookup'
 drivers/tty/pty.c:726: warning: Function parameter or member 'file' not described in 'pts_unix98_lookup'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: "C. Scott Ananian" <cananian@alumni.princeton.edu>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/pty.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 23368cec7ee84..a59f1e062bc65 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -699,6 +699,7 @@ static long pty_unix98_compat_ioctl(struct tty_struct *tty,
 /**
  *	ptm_unix98_lookup	-	find a pty master
  *	@driver: ptm driver
+ *	@file: unused
  *	@idx: tty index
  *
  *	Look up a pty master device. Called under the tty_mutex for now.
@@ -715,6 +716,7 @@ static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
 /**
  *	pts_unix98_lookup	-	find a pty slave
  *	@driver: pts driver
+ *	@file: file pointer to tty
  *	@idx: tty index
  *
  *	Look up a pty master device. Called under the tty_mutex for now.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 17/36] tty: serial: amba-pl011: Mark 'sbsa_uart_acpi_match' as __maybe_unused
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (15 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 16/36] tty: pty: Provide descriptions for the 'file' parameters Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 18/36] tty: n_gsm: Demote obvious abuse of kernel-doc and supply other missing docss Lee Jones
                   ` (19 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Russell King, Greg Kroah-Hartman, Jiri Slaby, linux-serial

When !ACPI 'sbsa_uart_acpi_match' is not referenced.

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/amba-pl011.c:2792:36: warning: ‘sbsa_uart_acpi_match’ defined but not used [-Wunused-const-variable=]

Cc: Russell King <linux@armlinux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/amba-pl011.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 87dc3fc15694a..c255476cce287 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2789,7 +2789,7 @@ static const struct of_device_id sbsa_uart_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, sbsa_uart_of_match);
 
-static const struct acpi_device_id sbsa_uart_acpi_match[] = {
+static const struct acpi_device_id __maybe_unused sbsa_uart_acpi_match[] = {
 	{ "ARMH0011", 0 },
 	{},
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 18/36] tty: n_gsm: Demote obvious abuse of kernel-doc and supply other missing docss
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (16 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 17/36] tty: serial: amba-pl011: Mark 'sbsa_uart_acpi_match' as __maybe_unused Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 19/36] tty: serial: lpc32xx_hs: Remove unused variable 'tmp' Lee Jones
                   ` (18 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby

Fixes the following W=1 kernel build warning(s):

 drivers/tty/n_gsm.c:85: warning: Function parameter or member 'ref' not described in 'gsm_mux_net'
 drivers/tty/n_gsm.c:85: warning: Function parameter or member 'dlci' not described in 'gsm_mux_net'
 drivers/tty/n_gsm.c:664: warning: Function parameter or member 'dlci' not described in 'gsm_data_kick'
 drivers/tty/n_gsm.c:1015: warning: Function parameter or member 'clen' not described in 'gsm_process_modem'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/n_gsm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 25f3152089c2a..c676fa89ee0b6 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -74,7 +74,7 @@ module_param(debug, int, 0600);
 #define MAX_MTU 1500
 #define	GSM_NET_TX_TIMEOUT (HZ*10)
 
-/**
+/*
  *	struct gsm_mux_net	-	network interface
  *
  *	Created when net interface is initialized.
@@ -651,6 +651,7 @@ static struct gsm_msg *gsm_data_alloc(struct gsm_mux *gsm, u8 addr, int len,
 /**
  *	gsm_data_kick		-	poke the queue
  *	@gsm: GSM Mux
+ *	@dlci: DLCI sending the data
  *
  *	The tty device has called us to indicate that room has appeared in
  *	the transmit queue. Ram more data into the pipe if we have any
@@ -1005,6 +1006,7 @@ static void gsm_control_reply(struct gsm_mux *gsm, int cmd, const u8 *data,
  *	@tty: virtual tty bound to the DLCI
  *	@dlci: DLCI to affect
  *	@modem: modem bits (full EA)
+ *	@clen: command length
  *
  *	Used when a modem control message or line state inline in adaption
  *	layer 2 is processed. Sort out the local modem state and throttles
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 19/36] tty: serial: lpc32xx_hs: Remove unused variable 'tmp'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (17 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 18/36] tty: n_gsm: Demote obvious abuse of kernel-doc and supply other missing docss Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 20:04   ` Vladimir Zapolskiy
  2020-11-04 19:35 ` [PATCH 20/36] tty: serial: msm_serial: Remove set but unused variable 'status' Lee Jones
                   ` (17 subsequent siblings)
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Vladimir Zapolskiy,
	Sylvain Lemieux, Kevin Wells, Roland Stigge, linux-serial

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/lpc32xx_hs.c: In function ‘__serial_uart_flush’:
 drivers/tty/serial/lpc32xx_hs.c:244:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Sylvain Lemieux <slemieux.tyco@gmail.com>
Cc: Kevin Wells <kevin.wells@nxp.com>
Cc: Roland Stigge <stigge@antcom.de>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/lpc32xx_hs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c
index b5898c9320361..1fa098d7aec4b 100644
--- a/drivers/tty/serial/lpc32xx_hs.c
+++ b/drivers/tty/serial/lpc32xx_hs.c
@@ -241,12 +241,11 @@ static unsigned int __serial_get_clock_div(unsigned long uartclk,
 
 static void __serial_uart_flush(struct uart_port *port)
 {
-	u32 tmp;
 	int cnt = 0;
 
 	while ((readl(LPC32XX_HSUART_LEVEL(port->membase)) > 0) &&
 	       (cnt++ < FIFO_READ_LIMIT))
-		tmp = readl(LPC32XX_HSUART_FIFO(port->membase));
+		readl(LPC32XX_HSUART_FIFO(port->membase));
 }
 
 static void __serial_lpc32xx_rx(struct uart_port *port)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 20/36] tty: serial: msm_serial: Remove set but unused variable 'status'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (18 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 19/36] tty: serial: lpc32xx_hs: Remove unused variable 'tmp' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-05 16:09   ` Jeffrey Hugo
  2020-11-04 19:35 ` [PATCH 21/36] tty: serial: ifx6x60: Fix function documentation headers Lee Jones
                   ` (16 subsequent siblings)
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Andy Gross, Bjorn Andersson, Greg Kroah-Hartman,
	Jiri Slaby, Robert Love, linux-arm-msm, linux-serial

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/msm_serial.c: In function ‘msm_complete_tx_dma’:
 drivers/tty/serial/msm_serial.c:429:18: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]

Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Robert Love <rlove@google.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/msm_serial.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 87f005e5d2aff..ec31a809644a5 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -426,7 +426,6 @@ static void msm_complete_tx_dma(void *args)
 	struct circ_buf *xmit = &port->state->xmit;
 	struct msm_dma *dma = &msm_port->tx_dma;
 	struct dma_tx_state state;
-	enum dma_status status;
 	unsigned long flags;
 	unsigned int count;
 	u32 val;
@@ -437,7 +436,7 @@ static void msm_complete_tx_dma(void *args)
 	if (!dma->count)
 		goto done;
 
-	status = dmaengine_tx_status(dma->chan, dma->cookie, &state);
+	dmaengine_tx_status(dma->chan, dma->cookie, &state);
 
 	dma_unmap_single(port->dev, dma->phys, dma->count, dma->dir);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 21/36] tty: serial: ifx6x60: Fix function documentation headers
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (19 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 20/36] tty: serial: msm_serial: Remove set but unused variable 'status' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override' Lee Jones
                   ` (15 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Filip Aben,
	Joseph Barrow, Jan Dumon, Russ Gorby, linux-serial

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/ifx6x60.c:553: warning: Function parameter or member 'tty' not described in 'ifx_port_activate'
 drivers/tty/serial/ifx6x60.c:728: warning: Function parameter or member 't' not described in 'ifx_spi_io'
 drivers/tty/serial/ifx6x60.c:728: warning: Excess function parameter 'data' description in 'ifx_spi_io'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Filip Aben <f.aben@option.com>
Cc: Joseph Barrow <d.barow@option.com>
Cc: Jan Dumon <j.dumon@option.com>
Cc: Russ Gorby <russ.gorby@intel.com>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/ifx6x60.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 21d519c804cb9..182e0ccd60b2c 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -545,6 +545,7 @@ static void ifx_spi_hangup(struct tty_struct *tty)
 /**
  *	ifx_port_activate
  *	@port: our tty port
+ *	@tty: our tty device
  *
  *	tty port activate method - called for first open. Serialized
  *	with hangup and shutdown by the tty layer.
@@ -719,7 +720,7 @@ static void ifx_spi_complete(void *ctx)
 
 /**
  *	ifx_spio_io		-	I/O tasklet
- *	@data: our SPI device
+ *	@t: tasklet construct used to fetch the SPI device
  *
  *	Queue data for transmission if possible and then kick off the
  *	transfer.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (20 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 21/36] tty: serial: ifx6x60: Fix function documentation headers Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-16 10:55   ` Maarten Brock
  2020-11-04 19:35 ` [PATCH 23/36] tty: synclink_gt: Demote one kernel-doc header and repair another Lee Jones
                   ` (14 subsequent siblings)
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Michal Simek, linux-serial

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/xilinx_uartps.c:205: warning: Function parameter or member 'cts_override' not described in 'cdns_uart'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/xilinx_uartps.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index a9b1ee27183a7..a14c5d9964739 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -192,6 +192,7 @@ MODULE_PARM_DESC(rx_timeout, "Rx timeout, 1-255");
  * @baud:		Current baud rate
  * @clk_rate_change_nb:	Notifier block for clock changes
  * @quirks:		Flags for RXBS support.
+ * @cts_override:	Modem control state override
  */
 struct cdns_uart {
 	struct uart_port	*port;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 23/36] tty: synclink_gt: Demote one kernel-doc header and repair another
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (21 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 24/36] tty: serial: serial-tegra: Struct headers should start with 'struct <name>' Lee Jones
                   ` (13 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, paulkf

Fixes the following W=1 kernel build warning(s):

 drivers/tty/synclink_gt.c:633: warning: Function parameter or member 'tty' not described in 'ldisc_receive_buf'
 drivers/tty/synclink_gt.c:633: warning: Function parameter or member 'data' not described in 'ldisc_receive_buf'
 drivers/tty/synclink_gt.c:633: warning: Function parameter or member 'flags' not described in 'ldisc_receive_buf'
 drivers/tty/synclink_gt.c:633: warning: Function parameter or member 'count' not described in 'ldisc_receive_buf'
 drivers/tty/synclink_gt.c:1683: warning: Function parameter or member 'txqueue' not described in 'hdlcdev_tx_timeout'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: paulkf@microgate.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/synclink_gt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index afa4cc52e48d7..c0b384e3ed4de 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -620,7 +620,7 @@ static inline int sanity_check(struct slgt_info *info, char *devname, const char
 	return 0;
 }
 
-/**
+/*
  * line discipline callback wrappers
  *
  * The wrappers maintain line discipline references
@@ -1678,6 +1678,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 /**
  * hdlcdev_tx_timeout - called by network layer when transmit timeout is detected
  * @dev: pointer to network device structure
+ * @txqueue: unused
  */
 static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 24/36] tty: serial: serial-tegra: Struct headers should start with 'struct <name>'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (22 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 23/36] tty: synclink_gt: Demote one kernel-doc header and repair another Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 25/36] tty: serial: sifive: " Lee Jones
                   ` (12 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Laxman Dewangan, Greg Kroah-Hartman, Jiri Slaby,
	Thierry Reding, Jonathan Hunter, Philipp Zabel, Sumit Semwal,
	Christian König, linux-serial, linux-tegra, linux-media,
	dri-devel, linaro-mm-sig

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/serial-tegra.c:85: warning: cannot understand function prototype: 'struct tegra_uart_chip_data '

Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: linux-serial@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/serial-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index bd13014a1c537..c363ee0470f45 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -75,7 +75,7 @@
 #define TEGRA_UART_FCR_IIR_FIFO_EN		0x40
 
 /**
- * tegra_uart_chip_data: SOC specific data.
+ * struct tegra_uart_chip_data: SOC specific data.
  *
  * @tx_fifo_full_status: Status flag available for checking tx fifo full.
  * @allow_txfifo_reset_fifo_mode: allow_tx fifo reset with fifo mode or not.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 25/36] tty: serial: sifive: Struct headers should start with 'struct <name>'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (23 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 24/36] tty: serial: serial-tegra: Struct headers should start with 'struct <name>' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-06  8:11   ` Palmer Dabbelt
  2020-11-04 19:35 ` [PATCH 26/36] tty: synclinkmp: Add missing description for function param 'txqueue' Lee Jones
                   ` (11 subsequent siblings)
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Palmer Dabbelt,
	Paul Walmsley, linux-serial, linux-riscv

Also supply a missing member description.

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/sifive.c:157: warning: cannot understand function prototype: 'struct sifive_serial_port '

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: linux-serial@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/sifive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
index 13eadcb8aec4e..1066eebe3b28b 100644
--- a/drivers/tty/serial/sifive.c
+++ b/drivers/tty/serial/sifive.c
@@ -144,12 +144,13 @@
  */
 
 /**
- * sifive_serial_port - driver-specific data extension to struct uart_port
+ * struct sifive_serial_port - driver-specific data extension to struct uart_port
  * @port: struct uart_port embedded in this struct
  * @dev: struct device *
  * @ier: shadowed copy of the interrupt enable register
  * @clkin_rate: input clock to the UART IP block.
  * @baud_rate: UART serial line rate (e.g., 115200 baud)
+ * @clk: reference to this device's clock
  * @clk_notifier: clock rate change notifier for upstream clock changes
  *
  * Configuration data specific to this SiFive UART.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 26/36] tty: synclinkmp: Add missing description for function param 'txqueue'
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (24 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 25/36] tty: serial: sifive: " Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused Lee Jones
                   ` (10 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, paulkf

Fixes the following W=1 kernel build warning(s):

 drivers/tty/synclinkmp.c:1808: warning: Function parameter or member 'txqueue' not described in 'hdlcdev_tx_timeout'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: paulkf@microgate.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/synclinkmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index ce08c5ec331cc..0ca738f61a35b 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
@@ -1803,6 +1803,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 /**
  * hdlcdev_tx_timeout - called by network layer when transmit timeout is detected
  * @dev: pointer to network device structure
+ * @txqueue: unused
  */
 static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (25 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 26/36] tty: synclinkmp: Add missing description for function param 'txqueue' Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-05  8:28   ` Jiri Slaby
  2020-11-04 19:35 ` [PATCH 28/36] tty: serial: stm32-usart: Remove set but unused 'cookie' variables Lee Jones
                   ` (9 subsequent siblings)
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, paulkf

Fixes the following W=1 kernel build warning(s):

 drivers/tty/synclinkmp.c: In function ‘init_adapter’:
 drivers/tty/synclinkmp.c:5167:6: warning: variable ‘readval’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: paulkf@microgate.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/synclinkmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index 0ca738f61a35b..75f494bfdcbed 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
@@ -5165,7 +5165,7 @@ static bool init_adapter(SLMP_INFO *info)
 
 	/* Set BIT30 of Local Control Reg 0x50 to reset SCA */
 	volatile u32 *MiscCtrl = (u32 *)(info->lcr_base + 0x50);
-	u32 readval;
+	u32 __always_unused readval;
 
 	info->misc_ctrl_value |= BIT30;
 	*MiscCtrl = info->misc_ctrl_value;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 28/36] tty: serial: stm32-usart: Remove set but unused 'cookie' variables
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (26 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 29/36] tty: tty_ldisc: Supply missing description for 'tty_ldisc_get's 'tty' param Lee Jones
                   ` (8 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Maxime Coquelin,
	Alexandre Torgue, Gerald Baeza, linux-serial, linux-stm32

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/stm32-usart.c: In function ‘stm32_transmit_chars_dma’:
 drivers/tty/serial/stm32-usart.c:353:15: warning: variable ‘cookie’ set but not used [-Wunused-but-set-variable]
 drivers/tty/serial/stm32-usart.c: In function ‘stm32_of_dma_rx_probe’:
 drivers/tty/serial/stm32-usart.c:1090:15: warning: variable ‘cookie’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Gerald Baeza <gerald.baeza@st.com>
Cc: linux-serial@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/stm32-usart.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index ee6c7762d3559..f4de32d3f2afe 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -350,7 +350,6 @@ static void stm32_transmit_chars_dma(struct uart_port *port)
 	struct stm32_usart_offsets *ofs = &stm32port->info->ofs;
 	struct circ_buf *xmit = &port->state->xmit;
 	struct dma_async_tx_descriptor *desc = NULL;
-	dma_cookie_t cookie;
 	unsigned int count, i;
 
 	if (stm32port->tx_dma_busy)
@@ -394,7 +393,7 @@ static void stm32_transmit_chars_dma(struct uart_port *port)
 	desc->callback_param = port;
 
 	/* Push current DMA TX transaction in the pending queue */
-	cookie = dmaengine_submit(desc);
+	dmaengine_submit(desc);
 
 	/* Issue pending DMA TX requests */
 	dma_async_issue_pending(stm32port->tx_ch);
@@ -1087,7 +1086,6 @@ static int stm32_of_dma_rx_probe(struct stm32_port *stm32port,
 	struct device *dev = &pdev->dev;
 	struct dma_slave_config config;
 	struct dma_async_tx_descriptor *desc = NULL;
-	dma_cookie_t cookie;
 	int ret;
 
 	/* Request DMA RX channel */
@@ -1132,7 +1130,7 @@ static int stm32_of_dma_rx_probe(struct stm32_port *stm32port,
 	desc->callback_param = NULL;
 
 	/* Push current DMA transaction in the pending queue */
-	cookie = dmaengine_submit(desc);
+	dmaengine_submit(desc);
 
 	/* Issue pending DMA requests */
 	dma_async_issue_pending(stm32port->rx_ch);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 29/36] tty: tty_ldisc: Supply missing description for 'tty_ldisc_get's 'tty' param
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (27 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 28/36] tty: serial: stm32-usart: Remove set but unused 'cookie' variables Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 30/36] tty: serial: serial-tegra: Provide some missing struct member descriptions Lee Jones
                   ` (7 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby

Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_ldisc.c:160: warning: Function parameter or member 'tty' not described in 'tty_ldisc_get'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/tty_ldisc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index aced2bf6173be..1ba74d6f5e5cd 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -138,6 +138,7 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
 static int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD);
 /**
  *	tty_ldisc_get		-	take a reference to an ldisc
+ *	@tty: tty device
  *	@disc: ldisc number
  *
  *	Takes a reference to a line discipline. Deals with refcounts and
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 30/36] tty: serial: serial-tegra: Provide some missing struct member descriptions
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (28 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 29/36] tty: tty_ldisc: Supply missing description for 'tty_ldisc_get's 'tty' param Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location Lee Jones
                   ` (6 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Laxman Dewangan, Greg Kroah-Hartman, Jiri Slaby,
	Thierry Reding, Jonathan Hunter, Philipp Zabel, Sumit Semwal,
	Christian König, linux-serial, linux-tegra, linux-media,
	dri-devel, linaro-mm-sig

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'fifo_mode_enable_status' not described in 'tegra_uart_chip_data'
 drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'uart_max_port' not described in 'tegra_uart_chip_data'
 drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'max_dma_burst_bytes' not described in 'tegra_uart_chip_data'
 drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'error_tolerance_low_range' not described in 'tegra_uart_chip_data'
 drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'error_tolerance_high_range' not described in 'tegra_uart_chip_data'

Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: linux-serial@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/serial-tegra.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index c363ee0470f45..bbae072a125db 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -81,6 +81,11 @@
  * @allow_txfifo_reset_fifo_mode: allow_tx fifo reset with fifo mode or not.
  *			Tegra30 does not allow this.
  * @support_clk_src_div: Clock source support the clock divider.
+ * @fifo_mode_enable_status: Is FIFO mode enabled?
+ * @uart_max_port: Maximum number of UART ports
+ * @max_dma_burst_bytes: Maximum size of DMA bursts
+ * @error_tolerance_low_range: Lowest number in the error tolerance range
+ * @error_tolerance_high_range: Highest number in the error tolerance range
  */
 struct tegra_uart_chip_data {
 	bool	tx_fifo_full_status;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (29 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 30/36] tty: serial: serial-tegra: Provide some missing struct member descriptions Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 23:36   ` Michael Ellerman
                     ` (2 more replies)
  2020-11-04 19:35 ` [PATCH 32/36] tty: hvc: hvc_vio: Staticify function invoked only by reference Lee Jones
                   ` (5 subsequent siblings)
  36 siblings, 3 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Michael Ellerman, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev

Fixes the following W=1 kernel build warning(s):

 drivers/tty/hvc/hvc_vio.c:385:13: warning: no previous prototype for ‘hvc_vio_init_early’ [-Wmissing-prototypes]
 385 | void __init hvc_vio_init_early(void)
 | ^~~~~~~~~~~~~~~~~~

Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/powerpc/include/asm/hvconsole.h     | 3 +++
 arch/powerpc/platforms/pseries/pseries.h | 3 ---
 arch/powerpc/platforms/pseries/setup.c   | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/include/asm/hvconsole.h b/arch/powerpc/include/asm/hvconsole.h
index 999ed5ac90531..936a1ee1ac786 100644
--- a/arch/powerpc/include/asm/hvconsole.h
+++ b/arch/powerpc/include/asm/hvconsole.h
@@ -24,5 +24,8 @@
 extern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
 extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
 
+/* Provided by HVC VIO */
+extern void hvc_vio_init_early(void);
+
 #endif /* __KERNEL__ */
 #endif /* _PPC64_HVCONSOLE_H */
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 13fa370a87e4e..7be5b054dfc36 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -43,9 +43,6 @@ extern void pSeries_final_fixup(void);
 /* Poweron flag used for enabling auto ups restart */
 extern unsigned long rtas_poweron_auto;
 
-/* Provided by HVC VIO */
-extern void hvc_vio_init_early(void);
-
 /* Dynamic logical Partitioning/Mobility */
 extern void dlpar_free_cc_nodes(struct device_node *);
 extern void dlpar_free_cc_property(struct property *);
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 633c45ec406da..6999b83f06612 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -71,6 +71,7 @@
 #include <asm/swiotlb.h>
 #include <asm/svm.h>
 #include <asm/dtl.h>
+#include <asm/hvconsole.h>
 
 #include "pseries.h"
 #include "../../../../drivers/pci/pci.h"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 32/36] tty: hvc: hvc_vio: Staticify function invoked only by reference
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (30 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 33/36] tty: hvc: hvc_opal: Staticify function invoked " Lee Jones
                   ` (4 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, linuxppc-dev

Fixes the following W=1 kernel build warning(s):

 drivers/tty/hvc/hvc_vio.c:181:6: warning: no previous prototype for ‘hvterm_hvsi_hangup’ [-Wmissing-prototypes]
 181 | void hvterm_hvsi_hangup(struct hvc_struct *hp, int data)
 | ^~~~~~~~~~~~~~~~~~

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/hvc/hvc_vio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index 7af54d6ed5b84..798f27f40cc2d 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -178,7 +178,7 @@ static void hvterm_hvsi_close(struct hvc_struct *hp, int data)
 	notifier_del_irq(hp, data);
 }
 
-void hvterm_hvsi_hangup(struct hvc_struct *hp, int data)
+static void hvterm_hvsi_hangup(struct hvc_struct *hp, int data)
 {
 	struct hvterm_priv *pv = hvterm_privs[hp->vtermno];
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 33/36] tty: hvc: hvc_opal: Staticify function invoked by reference
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (31 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 32/36] tty: hvc: hvc_vio: Staticify function invoked only by reference Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-04 19:35 ` [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused Lee Jones
                   ` (3 subsequent siblings)
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Michael Ellerman, Benjamin Herrenschmidt,
	Paul Mackerras, Greg Kroah-Hartman, Jiri Slaby, linuxppc-dev

Fixes the following W=1 kernel build warning(s):

 drivers/tty/hvc/hvc_opal.c:106:6: warning: no previous prototype for ‘hvc_opal_hvsi_hangup’ [-Wmissing-prototypes]

Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/hvc/hvc_opal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c
index c66412566efce..056ae21a51214 100644
--- a/drivers/tty/hvc/hvc_opal.c
+++ b/drivers/tty/hvc/hvc_opal.c
@@ -103,7 +103,7 @@ static void hvc_opal_hvsi_close(struct hvc_struct *hp, int data)
 	notifier_del_irq(hp, data);
 }
 
-void hvc_opal_hvsi_hangup(struct hvc_struct *hp, int data)
+static void hvc_opal_hvsi_hangup(struct hvc_struct *hp, int data)
 {
 	struct hvc_opal_priv *pv = hvc_opal_privs[hp->vtermno];
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (32 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 33/36] tty: hvc: hvc_opal: Staticify function invoked " Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-05  7:04   ` Christophe Leroy
  2020-11-04 19:35 ` [PATCH 35/36] tty: synclink: Mark disposable variables as __always_unused Lee Jones
                   ` (2 subsequent siblings)
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, linux-serial,
	linuxppc-dev

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/pmac_zilog.h:365:58: warning: variable ‘garbage’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linux-serial@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/pmac_zilog.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/pmac_zilog.h b/drivers/tty/serial/pmac_zilog.h
index bb874e76810e0..968aec7c1cf82 100644
--- a/drivers/tty/serial/pmac_zilog.h
+++ b/drivers/tty/serial/pmac_zilog.h
@@ -362,7 +362,7 @@ static inline void zssync(struct uart_pmac_port *port)
 
 /* Misc macros */
 #define ZS_CLEARERR(port)    (write_zsreg(port, 0, ERR_RES))
-#define ZS_CLEARFIFO(port)   do { volatile unsigned char garbage; \
+#define ZS_CLEARFIFO(port)   do { volatile unsigned char __always_unused garbage; \
 				     garbage = read_zsdata(port); \
 				     garbage = read_zsdata(port); \
 				     garbage = read_zsdata(port); \
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 35/36] tty: synclink: Mark disposable variables as __always_unused
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (33 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-05  8:35   ` Jiri Slaby
  2020-11-04 19:35 ` [PATCH 36/36] tty: synclink: Provide missing description for 'hdlcdev_tx_timeout's 'txqueue' param Lee Jones
  2020-11-06  9:54 ` [PATCH 00/36] Rid W=1 issues from TTY Greg Kroah-Hartman
  36 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, paulkf

Fixes the following W=1 kernel build warning(s):

 drivers/tty/synclink.c: In function ‘usc_reset’:
 drivers/tty/synclink.c:5571:6: warning: variable ‘readval’ set but not used [-Wunused-but-set-variable]
 drivers/tty/synclink.c: In function ‘mgsl_load_pci_memory’:
 drivers/tty/synclink.c:7267:16: warning: variable ‘Dummy’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: paulkf@microgate.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/synclink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index c8324d58ef564..8ed64b1e7c378 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
@@ -5568,7 +5568,7 @@ static void usc_load_txfifo( struct mgsl_struct *info )
 static void usc_reset( struct mgsl_struct *info )
 {
 	int i;
-	u32 readval;
+	u32 __always_unused readval;
 
 	/* Set BIT30 of Misc Control Register */
 	/* (Local Control Register 0x50) to force reset of USC. */
@@ -7264,7 +7264,7 @@ static void mgsl_load_pci_memory( char* TargetPtr, const char* SourcePtr,
 
 	unsigned short Intervalcount = count / PCI_LOAD_INTERVAL;
 	unsigned short Index;
-	unsigned long Dummy;
+	unsigned long __always_unused Dummy;
 
 	for ( Index = 0 ; Index < Intervalcount ; Index++ )
 	{
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* [PATCH 36/36] tty: synclink: Provide missing description for 'hdlcdev_tx_timeout's 'txqueue' param
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (34 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 35/36] tty: synclink: Mark disposable variables as __always_unused Lee Jones
@ 2020-11-04 19:35 ` Lee Jones
  2020-11-06  9:54 ` [PATCH 00/36] Rid W=1 issues from TTY Greg Kroah-Hartman
  36 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, paulkf

Fixes the following W=1 kernel build warning(s):

 drivers/tty/synclink.c:7708: warning: Function parameter or member 'txqueue' not described in 'hdlcdev_tx_timeout'

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: paulkf@microgate.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/synclink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index 8ed64b1e7c378..cbe9ad0683fc9 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
@@ -7703,6 +7703,7 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  * hdlcdev_tx_timeout - called by network layer when transmit timeout is detected
  *
  * @dev: pointer to network device structure
+ * @txqueue: unused
  */
 static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 84+ messages in thread

* Re: [PATCH 19/36] tty: serial: lpc32xx_hs: Remove unused variable 'tmp'
  2020-11-04 19:35 ` [PATCH 19/36] tty: serial: lpc32xx_hs: Remove unused variable 'tmp' Lee Jones
@ 2020-11-04 20:04   ` Vladimir Zapolskiy
  0 siblings, 0 replies; 84+ messages in thread
From: Vladimir Zapolskiy @ 2020-11-04 20:04 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Sylvain Lemieux,
	Kevin Wells, Roland Stigge, linux-serial

Hi Lee,

On 11/4/20 9:35 PM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/tty/serial/lpc32xx_hs.c: In function ‘__serial_uart_flush’:
>   drivers/tty/serial/lpc32xx_hs.c:244:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Sylvain Lemieux <slemieux.tyco@gmail.com>
> Cc: Kevin Wells <kevin.wells@nxp.com>
> Cc: Roland Stigge <stigge@antcom.de>
> Cc: linux-serial@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/tty/serial/lpc32xx_hs.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c
> index b5898c9320361..1fa098d7aec4b 100644
> --- a/drivers/tty/serial/lpc32xx_hs.c
> +++ b/drivers/tty/serial/lpc32xx_hs.c
> @@ -241,12 +241,11 @@ static unsigned int __serial_get_clock_div(unsigned long uartclk,
>   
>   static void __serial_uart_flush(struct uart_port *port)
>   {
> -	u32 tmp;
>   	int cnt = 0;
>   
>   	while ((readl(LPC32XX_HSUART_LEVEL(port->membase)) > 0) &&
>   	       (cnt++ < FIFO_READ_LIMIT))
> -		tmp = readl(LPC32XX_HSUART_FIFO(port->membase));
> +		readl(LPC32XX_HSUART_FIFO(port->membase));
>   }
>   
>   static void __serial_lpc32xx_rx(struct uart_port *port)
> 

Thank you for the change.

Acked-by: Vladimir Zapolskiy <vz@mleia.com>

I'm sure the change is correct, likely the local variable was introduced
to prevent an unwanted probable optimization by some odd/ancient compiler.

--
Best wishes,
Vladimir

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
  2020-11-04 19:35 ` [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location Lee Jones
@ 2020-11-04 23:36   ` Michael Ellerman
  2020-11-05  8:39     ` Lee Jones
  2020-11-05  7:10   ` Christophe Leroy
  2020-11-26  9:36   ` [PATCH v2 " Lee Jones
  2 siblings, 1 reply; 84+ messages in thread
From: Michael Ellerman @ 2020-11-04 23:36 UTC (permalink / raw)
  To: Lee Jones, lee.jones
  Cc: linux-kernel, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev

Lee Jones <lee.jones@linaro.org> writes:
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/tty/hvc/hvc_vio.c:385:13: warning: no previous prototype for ‘hvc_vio_init_early’ [-Wmissing-prototypes]
>  385 | void __init hvc_vio_init_early(void)
>  | ^~~~~~~~~~~~~~~~~~
>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  arch/powerpc/include/asm/hvconsole.h     | 3 +++
>  arch/powerpc/platforms/pseries/pseries.h | 3 ---
>  arch/powerpc/platforms/pseries/setup.c   | 1 +
>  3 files changed, 4 insertions(+), 3 deletions(-)

Acked-by: Michael Ellerman <mpe@ellerman.id.au>

> diff --git a/arch/powerpc/include/asm/hvconsole.h b/arch/powerpc/include/asm/hvconsole.h
> index 999ed5ac90531..936a1ee1ac786 100644
> --- a/arch/powerpc/include/asm/hvconsole.h
> +++ b/arch/powerpc/include/asm/hvconsole.h
> @@ -24,5 +24,8 @@
>  extern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
>  extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
>  
> +/* Provided by HVC VIO */
> +extern void hvc_vio_init_early(void);

extern isn't needed, but don't feel you need to respin just to drop it.

cheers

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
  2020-11-04 19:35 ` [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused Lee Jones
@ 2020-11-05  7:04   ` Christophe Leroy
  2020-11-05  7:39     ` Jiri Slaby
  0 siblings, 1 reply; 84+ messages in thread
From: Christophe Leroy @ 2020-11-05  7:04 UTC (permalink / raw)
  To: Lee Jones
  Cc: Greg Kroah-Hartman, linuxppc-dev, linux-kernel, Paul Mackerras,
	linux-serial, Jiri Slaby



Le 04/11/2020 à 20:35, Lee Jones a écrit :
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/tty/serial/pmac_zilog.h:365:58: warning: variable ‘garbage’ set but not used [-Wunused-but-set-variable]

Explain how you are fixing this warning.

Setting  __always_unused is usually not the good solution for fixing this warning, but here I guess 
this is likely the good solution. But it should be explained why.

Christophe


> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: linux-serial@vger.kernel.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/tty/serial/pmac_zilog.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/pmac_zilog.h b/drivers/tty/serial/pmac_zilog.h
> index bb874e76810e0..968aec7c1cf82 100644
> --- a/drivers/tty/serial/pmac_zilog.h
> +++ b/drivers/tty/serial/pmac_zilog.h
> @@ -362,7 +362,7 @@ static inline void zssync(struct uart_pmac_port *port)
>   
>   /* Misc macros */
>   #define ZS_CLEARERR(port)    (write_zsreg(port, 0, ERR_RES))
> -#define ZS_CLEARFIFO(port)   do { volatile unsigned char garbage; \
> +#define ZS_CLEARFIFO(port)   do { volatile unsigned char __always_unused garbage; \
>   				     garbage = read_zsdata(port); \
>   				     garbage = read_zsdata(port); \
>   				     garbage = read_zsdata(port); \
> 

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
  2020-11-04 19:35 ` [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location Lee Jones
  2020-11-04 23:36   ` Michael Ellerman
@ 2020-11-05  7:10   ` Christophe Leroy
  2020-11-05  8:38     ` Lee Jones
  2020-11-26  9:36   ` [PATCH v2 " Lee Jones
  2 siblings, 1 reply; 84+ messages in thread
From: Christophe Leroy @ 2020-11-05  7:10 UTC (permalink / raw)
  To: Lee Jones; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel



Le 04/11/2020 à 20:35, Lee Jones a écrit :
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/tty/hvc/hvc_vio.c:385:13: warning: no previous prototype for ‘hvc_vio_init_early’ [-Wmissing-prototypes]
>   385 | void __init hvc_vio_init_early(void)
>   | ^~~~~~~~~~~~~~~~~~
> 
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   arch/powerpc/include/asm/hvconsole.h     | 3 +++
>   arch/powerpc/platforms/pseries/pseries.h | 3 ---
>   arch/powerpc/platforms/pseries/setup.c   | 1 +
>   3 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/hvconsole.h b/arch/powerpc/include/asm/hvconsole.h
> index 999ed5ac90531..936a1ee1ac786 100644
> --- a/arch/powerpc/include/asm/hvconsole.h
> +++ b/arch/powerpc/include/asm/hvconsole.h
> @@ -24,5 +24,8 @@
>   extern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
>   extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
>   
> +/* Provided by HVC VIO */
> +extern void hvc_vio_init_early(void);
> +

Declaring a prototype 'extern' is pointless. Don't add new misuse of 'extern' keyword.


>   #endif /* __KERNEL__ */
>   #endif /* _PPC64_HVCONSOLE_H */
> diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
> index 13fa370a87e4e..7be5b054dfc36 100644
> --- a/arch/powerpc/platforms/pseries/pseries.h
> +++ b/arch/powerpc/platforms/pseries/pseries.h
> @@ -43,9 +43,6 @@ extern void pSeries_final_fixup(void);
>   /* Poweron flag used for enabling auto ups restart */
>   extern unsigned long rtas_poweron_auto;
>   
> -/* Provided by HVC VIO */
> -extern void hvc_vio_init_early(void);
> -
>   /* Dynamic logical Partitioning/Mobility */
>   extern void dlpar_free_cc_nodes(struct device_node *);
>   extern void dlpar_free_cc_property(struct property *);
> diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
> index 633c45ec406da..6999b83f06612 100644
> --- a/arch/powerpc/platforms/pseries/setup.c
> +++ b/arch/powerpc/platforms/pseries/setup.c
> @@ -71,6 +71,7 @@
>   #include <asm/swiotlb.h>
>   #include <asm/svm.h>
>   #include <asm/dtl.h>
> +#include <asm/hvconsole.h>
>   
>   #include "pseries.h"
>   #include "../../../../drivers/pci/pci.h"
> 

Christophe

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
  2020-11-05  7:04   ` Christophe Leroy
@ 2020-11-05  7:39     ` Jiri Slaby
  2020-11-05  8:36       ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05  7:39 UTC (permalink / raw)
  To: Christophe Leroy, Lee Jones
  Cc: Greg Kroah-Hartman, linuxppc-dev, linux-kernel, Paul Mackerras,
	linux-serial

On 05. 11. 20, 8:04, Christophe Leroy wrote:
> 
> 
> Le 04/11/2020 à 20:35, Lee Jones a écrit :
>> Fixes the following W=1 kernel build warning(s):
>>
>>   drivers/tty/serial/pmac_zilog.h:365:58: warning: variable ‘garbage’ 
>> set but not used [-Wunused-but-set-variable]
> 
> Explain how you are fixing this warning.
> 
> Setting  __always_unused is usually not the good solution for fixing 
> this warning, but here I guess this is likely the good solution. But it 
> should be explained why.

Or, why is the "garbage =" needed in the first place? read_zsdata is not 
defined with __warn_unused_result__. And even if it was, would 
(void)!read_zsdata(port) fix it?

>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Jiri Slaby <jirislaby@kernel.org>
>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> Cc: Paul Mackerras <paulus@samba.org>
>> Cc: linux-serial@vger.kernel.org
>> Cc: linuxppc-dev@lists.ozlabs.org
>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>> ---
>>   drivers/tty/serial/pmac_zilog.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/pmac_zilog.h 
>> b/drivers/tty/serial/pmac_zilog.h
>> index bb874e76810e0..968aec7c1cf82 100644
>> --- a/drivers/tty/serial/pmac_zilog.h
>> +++ b/drivers/tty/serial/pmac_zilog.h
>> @@ -362,7 +362,7 @@ static inline void zssync(struct uart_pmac_port 
>> *port)
>>   /* Misc macros */
>>   #define ZS_CLEARERR(port)    (write_zsreg(port, 0, ERR_RES))
>> -#define ZS_CLEARFIFO(port)   do { volatile unsigned char garbage; \
>> +#define ZS_CLEARFIFO(port)   do { volatile unsigned char 
>> __always_unused garbage; \
>>                        garbage = read_zsdata(port); \
>>                        garbage = read_zsdata(port); \
>>                        garbage = read_zsdata(port); \
>>

thanks,
-- 
js

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours
  2020-11-04 19:35 ` [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours Lee Jones
@ 2020-11-05  8:12   ` Jiri Slaby
  2020-11-05  8:54     ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05  8:12 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Greg Kroah-Hartman

On 04. 11. 20, 20:35, Lee Jones wrote:
>   - Functions must follow directly on from their headers
>   - Demote non-conforming kernel-doc header
>   - Ensure notes have unique section names
>   - Provide missing description for 'reinit'
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/tty/tty_ldisc.c:158: warning: cannot understand function prototype: 'int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD); '
>   drivers/tty/tty_ldisc.c:199: warning: Function parameter or member 'ld' not described in 'tty_ldisc_put'
>   drivers/tty/tty_ldisc.c:260: warning: duplicate section name 'Note'
>   drivers/tty/tty_ldisc.c:717: warning: Function parameter or member 'reinit' not described in 'tty_ldisc_hangup'
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/tty/tty_ldisc.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
> index fe37ec331289b..aced2bf6173be 100644
> --- a/drivers/tty/tty_ldisc.c
> +++ b/drivers/tty/tty_ldisc.c
> @@ -190,7 +189,7 @@ static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
>   	return ld;
>   }
>   
> -/**
> +/*
>    *	tty_ldisc_put		-	release the ldisc

Having tty_ldisc_get in kernel-doc, while tty_ldisc_put not doesn't make 
much sense. What's missing to tty_ldisc_put to conform to kernel-doc?

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues
  2020-11-04 19:35 ` [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues Lee Jones
@ 2020-11-05  8:16   ` Jiri Slaby
  2020-11-05  8:53     ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05  8:16 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Greg Kroah-Hartman, Nick Holloway, --,
	Marko Kohtala, Bill Hawes, C. Scott Ananian, Russell King,
	Andrew Morton

On 04. 11. 20, 20:35, Lee Jones wrote:
> Demote non-conformant headers and supply some missing descriptions.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/tty/tty_io.c:218: warning: Function parameter or member 'file' not described in 'tty_free_file'
>   drivers/tty/tty_io.c:566: warning: Function parameter or member 'exit_session' not described in '__tty_hangup'
>   drivers/tty/tty_io.c:1077: warning: Function parameter or member 'tty' not described in 'tty_send_xchar'
>   drivers/tty/tty_io.c:1077: warning: Function parameter or member 'ch' not described in 'tty_send_xchar'
>   drivers/tty/tty_io.c:1155: warning: Function parameter or member 'file' not described in 'tty_driver_lookup_tty'
>   drivers/tty/tty_io.c:1508: warning: Function parameter or member 'tty' not described in 'release_tty'
>   drivers/tty/tty_io.c:1508: warning: Function parameter or member 'idx' not described in 'release_tty'
>   drivers/tty/tty_io.c:2973: warning: Function parameter or member 'driver' not described in 'alloc_tty_struct'
>   drivers/tty/tty_io.c:2973: warning: Function parameter or member 'idx' not described in 'alloc_tty_struct'
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Nick Holloway <alfie@dcs.warwick.ac.uk>
> Cc: -- <julian@uhunix.uhcc.hawaii.edu>
> Cc: Marko Kohtala <Marko.Kohtala@hut.fi>
> Cc: Bill Hawes <whawes@star.net>
> Cc: "C. Scott Ananian" <cananian@alumni.princeton.edu>
> Cc: Russell King <rmk@arm.linux.org.uk>
> Cc: Andrew Morton <andrewm@uow.edu.eu>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/tty/tty_io.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index 88b00c47b606e..f50286fb080da 100644
> --- a/drivers/tty/tty_io.c
> +++ b/drivers/tty/tty_io.c
> @@ -2961,7 +2965,7 @@ static struct device *tty_get_device(struct tty_struct *tty)
>   }
>   
>   
> -/**
> +/*
>    *	alloc_tty_struct
>    *
>    *	This subroutine allocates and initializes a tty structure.

Why do you randomly sometimes fix kernel-doc and sometimes remove 
functions from kernel-doc? What's the rule? For example, 
alloc_tty_struct is among the ones, I would like to see fixed instead of 
removed from kernel-doc.

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-04 19:35 ` [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused Lee Jones
@ 2020-11-05  8:28   ` Jiri Slaby
  2020-11-05  8:43     ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05  8:28 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Greg Kroah-Hartman, paulkf

On 04. 11. 20, 20:35, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/tty/synclinkmp.c: In function ‘init_adapter’:
>   drivers/tty/synclinkmp.c:5167:6: warning: variable ‘readval’ set but not used [-Wunused-but-set-variable]
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: paulkf@microgate.com
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/tty/synclinkmp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
> index 0ca738f61a35b..75f494bfdcbed 100644
> --- a/drivers/tty/synclinkmp.c
> +++ b/drivers/tty/synclinkmp.c
> @@ -5165,7 +5165,7 @@ static bool init_adapter(SLMP_INFO *info)
>   
>   	/* Set BIT30 of Local Control Reg 0x50 to reset SCA */
>   	volatile u32 *MiscCtrl = (u32 *)(info->lcr_base + 0x50);
> -	u32 readval;
> +	u32 __always_unused readval;

Why not just remove readval completely as in other cases?

And the loop can be turned into ndelay:

         /*
          * Force at least 170ns delay before clearing
          * reset bit. Each read from LCR takes at least
          * 30ns so 10 times for 300ns to be safe.
          */
         for(i=0;i<10;i++)
                 readval = *MiscCtrl;


thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 35/36] tty: synclink: Mark disposable variables as __always_unused
  2020-11-04 19:35 ` [PATCH 35/36] tty: synclink: Mark disposable variables as __always_unused Lee Jones
@ 2020-11-05  8:35   ` Jiri Slaby
  2020-11-05  9:00     ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05  8:35 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Greg Kroah-Hartman, paulkf

On 04. 11. 20, 20:35, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/tty/synclink.c: In function ‘usc_reset’:
>   drivers/tty/synclink.c:5571:6: warning: variable ‘readval’ set but not used [-Wunused-but-set-variable]
>   drivers/tty/synclink.c: In function ‘mgsl_load_pci_memory’:
>   drivers/tty/synclink.c:7267:16: warning: variable ‘Dummy’ set but not used [-Wunused-but-set-variable]
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: paulkf@microgate.com
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>   drivers/tty/synclink.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
> index c8324d58ef564..8ed64b1e7c378 100644
> --- a/drivers/tty/synclink.c
> +++ b/drivers/tty/synclink.c
> @@ -5568,7 +5568,7 @@ static void usc_load_txfifo( struct mgsl_struct *info )
>   static void usc_reset( struct mgsl_struct *info )
>   {
>   	int i;
> -	u32 readval;
> +	u32 __always_unused readval;

The same as in synclinkmp.

>   
>   	/* Set BIT30 of Misc Control Register */
>   	/* (Local Control Register 0x50) to force reset of USC. */
> @@ -7264,7 +7264,7 @@ static void mgsl_load_pci_memory( char* TargetPtr, const char* SourcePtr,
>   
>   	unsigned short Intervalcount = count / PCI_LOAD_INTERVAL;
>   	unsigned short Index;
> -	unsigned long Dummy;
> +	unsigned long __always_unused Dummy;

You can kill it completely.

>   
>   	for ( Index = 0 ; Index < Intervalcount ; Index++ )
>   	{
> 

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
  2020-11-05  7:39     ` Jiri Slaby
@ 2020-11-05  8:36       ` Lee Jones
  2020-11-05  8:55         ` Jiri Slaby
  0 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-05  8:36 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Christophe Leroy, Greg Kroah-Hartman, linuxppc-dev, linux-kernel,
	Paul Mackerras, linux-serial

On Thu, 05 Nov 2020, Jiri Slaby wrote:

> On 05. 11. 20, 8:04, Christophe Leroy wrote:
> > 
> > 
> > Le 04/11/2020 à 20:35, Lee Jones a écrit :
> > > Fixes the following W=1 kernel build warning(s):
> > > 
> > >   drivers/tty/serial/pmac_zilog.h:365:58: warning: variable
> > > ‘garbage’ set but not used [-Wunused-but-set-variable]
> > 
> > Explain how you are fixing this warning.
> > 
> > Setting  __always_unused is usually not the good solution for fixing
> > this warning, but here I guess this is likely the good solution. But it
> > should be explained why.

There are normally 3 ways to fix this warning;

 - Start using/checking the variable/result
 - Remove the variable
 - Mark it as __{always,maybe}_unused

The later just tells the compiler that not checking the resultant
value is intentional.  There are some functions (as Jiri mentions
below) which are marked as '__must_check' which *require* a dummy
(garbage) variable to be used.

> Or, why is the "garbage =" needed in the first place? read_zsdata is not
> defined with __warn_unused_result__.

I used '__always_used' here for fear of breaking something.

However, if it's safe to remove it, then all the better.

> And even if it was, would (void)!read_zsdata(port) fix it?

That's hideous. :D

*Much* better to just use '__always_used' in that use-case.

> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > > Cc: Paul Mackerras <paulus@samba.org>
> > > Cc: linux-serial@vger.kernel.org
> > > Cc: linuxppc-dev@lists.ozlabs.org
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > >   drivers/tty/serial/pmac_zilog.h | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/tty/serial/pmac_zilog.h
> > > b/drivers/tty/serial/pmac_zilog.h
> > > index bb874e76810e0..968aec7c1cf82 100644
> > > --- a/drivers/tty/serial/pmac_zilog.h
> > > +++ b/drivers/tty/serial/pmac_zilog.h
> > > @@ -362,7 +362,7 @@ static inline void zssync(struct uart_pmac_port
> > > *port)
> > >   /* Misc macros */
> > >   #define ZS_CLEARERR(port)    (write_zsreg(port, 0, ERR_RES))
> > > -#define ZS_CLEARFIFO(port)   do { volatile unsigned char garbage; \
> > > +#define ZS_CLEARFIFO(port)   do { volatile unsigned char
> > > __always_unused garbage; \
> > >                        garbage = read_zsdata(port); \
> > >                        garbage = read_zsdata(port); \
> > >                        garbage = read_zsdata(port); \
> > > 
> 
> thanks,

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
  2020-11-05  7:10   ` Christophe Leroy
@ 2020-11-05  8:38     ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-05  8:38 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel

On Thu, 05 Nov 2020, Christophe Leroy wrote:

> 
> 
> Le 04/11/2020 à 20:35, Lee Jones a écrit :
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/tty/hvc/hvc_vio.c:385:13: warning: no previous prototype for ‘hvc_vio_init_early’ [-Wmissing-prototypes]
> >   385 | void __init hvc_vio_init_early(void)
> >   | ^~~~~~~~~~~~~~~~~~
> > 
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >   arch/powerpc/include/asm/hvconsole.h     | 3 +++
> >   arch/powerpc/platforms/pseries/pseries.h | 3 ---
> >   arch/powerpc/platforms/pseries/setup.c   | 1 +
> >   3 files changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/powerpc/include/asm/hvconsole.h b/arch/powerpc/include/asm/hvconsole.h
> > index 999ed5ac90531..936a1ee1ac786 100644
> > --- a/arch/powerpc/include/asm/hvconsole.h
> > +++ b/arch/powerpc/include/asm/hvconsole.h
> > @@ -24,5 +24,8 @@
> >   extern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
> >   extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
> > +/* Provided by HVC VIO */
> > +extern void hvc_vio_init_early(void);
> > +
> 
> Declaring a prototype 'extern' is pointless. Don't add new misuse of 'extern' keyword.

No new code (misuse or otherwise) is being added in this patch.

It's just moved from one place to another.

I can also strip out 'extern' if it's preferred.

> >   #endif /* __KERNEL__ */
> >   #endif /* _PPC64_HVCONSOLE_H */
> > diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
> > index 13fa370a87e4e..7be5b054dfc36 100644
> > --- a/arch/powerpc/platforms/pseries/pseries.h
> > +++ b/arch/powerpc/platforms/pseries/pseries.h
> > @@ -43,9 +43,6 @@ extern void pSeries_final_fixup(void);
> >   /* Poweron flag used for enabling auto ups restart */
> >   extern unsigned long rtas_poweron_auto;
> > -/* Provided by HVC VIO */
> > -extern void hvc_vio_init_early(void);
> > -
> >   /* Dynamic logical Partitioning/Mobility */
> >   extern void dlpar_free_cc_nodes(struct device_node *);
> >   extern void dlpar_free_cc_property(struct property *);
> > diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
> > index 633c45ec406da..6999b83f06612 100644
> > --- a/arch/powerpc/platforms/pseries/setup.c
> > +++ b/arch/powerpc/platforms/pseries/setup.c
> > @@ -71,6 +71,7 @@
> >   #include <asm/swiotlb.h>
> >   #include <asm/svm.h>
> >   #include <asm/dtl.h>
> > +#include <asm/hvconsole.h>
> >   #include "pseries.h"
> >   #include "../../../../drivers/pci/pci.h"
> > 
> 
> Christophe

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
  2020-11-04 23:36   ` Michael Ellerman
@ 2020-11-05  8:39     ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-05  8:39 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: linux-kernel, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev

On Thu, 05 Nov 2020, Michael Ellerman wrote:

> Lee Jones <lee.jones@linaro.org> writes:
> > Fixes the following W=1 kernel build warning(s):
> >
> >  drivers/tty/hvc/hvc_vio.c:385:13: warning: no previous prototype for ‘hvc_vio_init_early’ [-Wmissing-prototypes]
> >  385 | void __init hvc_vio_init_early(void)
> >  | ^~~~~~~~~~~~~~~~~~
> >
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  arch/powerpc/include/asm/hvconsole.h     | 3 +++
> >  arch/powerpc/platforms/pseries/pseries.h | 3 ---
> >  arch/powerpc/platforms/pseries/setup.c   | 1 +
> >  3 files changed, 4 insertions(+), 3 deletions(-)
> 
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>

Thanks.

> > diff --git a/arch/powerpc/include/asm/hvconsole.h b/arch/powerpc/include/asm/hvconsole.h
> > index 999ed5ac90531..936a1ee1ac786 100644
> > --- a/arch/powerpc/include/asm/hvconsole.h
> > +++ b/arch/powerpc/include/asm/hvconsole.h
> > @@ -24,5 +24,8 @@
> >  extern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
> >  extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
> >  
> > +/* Provided by HVC VIO */
> > +extern void hvc_vio_init_early(void);
> 
> extern isn't needed, but don't feel you need to respin just to drop it.

That's fine.  I don't mind re-spinning.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05  8:28   ` Jiri Slaby
@ 2020-11-05  8:43     ` Lee Jones
  2020-11-05  9:10       ` Jiri Slaby
  0 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-05  8:43 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, Greg Kroah-Hartman, paulkf

On Thu, 05 Nov 2020, Jiri Slaby wrote:

> On 04. 11. 20, 20:35, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/tty/synclinkmp.c: In function ‘init_adapter’:
> >   drivers/tty/synclinkmp.c:5167:6: warning: variable ‘readval’ set but not used [-Wunused-but-set-variable]
> > 
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Jiri Slaby <jirislaby@kernel.org>
> > Cc: paulkf@microgate.com
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >   drivers/tty/synclinkmp.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
> > index 0ca738f61a35b..75f494bfdcbed 100644
> > --- a/drivers/tty/synclinkmp.c
> > +++ b/drivers/tty/synclinkmp.c
> > @@ -5165,7 +5165,7 @@ static bool init_adapter(SLMP_INFO *info)
> >   	/* Set BIT30 of Local Control Reg 0x50 to reset SCA */
> >   	volatile u32 *MiscCtrl = (u32 *)(info->lcr_base + 0x50);
> > -	u32 readval;
> > +	u32 __always_unused readval;
> 
> Why not just remove readval completely as in other cases?

Because I don't know what the result would be.

Will the read still happen, or will the compiler optimise it away?

My changes should not affect any of the instructions i.e. the register
read must still take place

> And the loop can be turned into ndelay:
> 
>         /*
>          * Force at least 170ns delay before clearing
>          * reset bit. Each read from LCR takes at least
>          * 30ns so 10 times for 300ns to be safe.
>          */
>         for(i=0;i<10;i++)
>                 readval = *MiscCtrl;

Again, since I can't test this, I do not want this patch to contain
any functional changes.  AFAIC, the 10 register reads must still
happen after this patch is applied.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues
  2020-11-05  8:16   ` Jiri Slaby
@ 2020-11-05  8:53     ` Lee Jones
  2020-11-05  9:14       ` Jiri Slaby
  0 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-05  8:53 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: linux-kernel, Greg Kroah-Hartman, Nick Holloway, --,
	Marko Kohtala, Bill Hawes, C. Scott Ananian, Russell King,
	Andrew Morton

On Thu, 05 Nov 2020, Jiri Slaby wrote:

> On 04. 11. 20, 20:35, Lee Jones wrote:
> > Demote non-conformant headers and supply some missing descriptions.
> > 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/tty/tty_io.c:218: warning: Function parameter or member 'file' not described in 'tty_free_file'
> >   drivers/tty/tty_io.c:566: warning: Function parameter or member 'exit_session' not described in '__tty_hangup'
> >   drivers/tty/tty_io.c:1077: warning: Function parameter or member 'tty' not described in 'tty_send_xchar'
> >   drivers/tty/tty_io.c:1077: warning: Function parameter or member 'ch' not described in 'tty_send_xchar'
> >   drivers/tty/tty_io.c:1155: warning: Function parameter or member 'file' not described in 'tty_driver_lookup_tty'
> >   drivers/tty/tty_io.c:1508: warning: Function parameter or member 'tty' not described in 'release_tty'
> >   drivers/tty/tty_io.c:1508: warning: Function parameter or member 'idx' not described in 'release_tty'
> >   drivers/tty/tty_io.c:2973: warning: Function parameter or member 'driver' not described in 'alloc_tty_struct'
> >   drivers/tty/tty_io.c:2973: warning: Function parameter or member 'idx' not described in 'alloc_tty_struct'
> > 
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Jiri Slaby <jirislaby@kernel.org>
> > Cc: Nick Holloway <alfie@dcs.warwick.ac.uk>
> > Cc: -- <julian@uhunix.uhcc.hawaii.edu>
> > Cc: Marko Kohtala <Marko.Kohtala@hut.fi>
> > Cc: Bill Hawes <whawes@star.net>
> > Cc: "C. Scott Ananian" <cananian@alumni.princeton.edu>
> > Cc: Russell King <rmk@arm.linux.org.uk>
> > Cc: Andrew Morton <andrewm@uow.edu.eu>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >   drivers/tty/tty_io.c | 10 +++++++---
> >   1 file changed, 7 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> > index 88b00c47b606e..f50286fb080da 100644
> > --- a/drivers/tty/tty_io.c
> > +++ b/drivers/tty/tty_io.c
> > @@ -2961,7 +2965,7 @@ static struct device *tty_get_device(struct tty_struct *tty)
> >   }
> > -/**
> > +/*
> >    *	alloc_tty_struct
> >    *
> >    *	This subroutine allocates and initializes a tty structure.
> 
> Why do you randomly sometimes fix kernel-doc and sometimes remove functions
> from kernel-doc? What's the rule?

The decision is made quickly (I am fixing literally 1000's of these),
but the process is definitely not random.

If there has been little or no attempt to document the function, it
gets demoted.  If the developer has had a good crack at providing
descriptions and/or the header is just suffering with a little
incompleteness/doc-rot, then I'll fix it up.

Here for example, no attempt was made to provide any proper
documentation.

> For example, alloc_tty_struct is among the
> ones, I would like to see fixed instead of removed from kernel-doc.

There is nothing stopping anyone from providing said descriptions and
promoting it back up to kernel-doc.  If you have good reasons for it
to be properly documented with kernel-doc, then it should also be
referenced from /Documentation using the kernel-doc:: notation.

Also see: scripts/find-unused-docs.sh

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours
  2020-11-05  8:12   ` Jiri Slaby
@ 2020-11-05  8:54     ` Lee Jones
  2020-11-05  8:56       ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-05  8:54 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, Greg Kroah-Hartman

On Thu, 05 Nov 2020, Jiri Slaby wrote:

> On 04. 11. 20, 20:35, Lee Jones wrote:
> >   - Functions must follow directly on from their headers
> >   - Demote non-conforming kernel-doc header
> >   - Ensure notes have unique section names
> >   - Provide missing description for 'reinit'
> > 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/tty/tty_ldisc.c:158: warning: cannot understand function prototype: 'int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD); '
> >   drivers/tty/tty_ldisc.c:199: warning: Function parameter or member 'ld' not described in 'tty_ldisc_put'
> >   drivers/tty/tty_ldisc.c:260: warning: duplicate section name 'Note'
> >   drivers/tty/tty_ldisc.c:717: warning: Function parameter or member 'reinit' not described in 'tty_ldisc_hangup'
> > 
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Jiri Slaby <jirislaby@kernel.org>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >   drivers/tty/tty_ldisc.c | 10 +++++-----
> >   1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
> > index fe37ec331289b..aced2bf6173be 100644
> > --- a/drivers/tty/tty_ldisc.c
> > +++ b/drivers/tty/tty_ldisc.c
> > @@ -190,7 +189,7 @@ static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
> >   	return ld;
> >   }
> > -/**
> > +/*
> >    *	tty_ldisc_put		-	release the ldisc
> 
> Having tty_ldisc_get in kernel-doc, while tty_ldisc_put not doesn't make
> much sense. What's missing to tty_ldisc_put to conform to kernel-doc?

Where are they in kernel-doc?  I don't see any references.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
  2020-11-05  8:36       ` Lee Jones
@ 2020-11-05  8:55         ` Jiri Slaby
  2020-11-05  9:00           ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05  8:55 UTC (permalink / raw)
  To: Lee Jones
  Cc: Christophe Leroy, Greg Kroah-Hartman, linuxppc-dev, linux-kernel,
	Paul Mackerras, linux-serial

On 05. 11. 20, 9:36, Lee Jones wrote:
> On Thu, 05 Nov 2020, Jiri Slaby wrote:
> 
>> On 05. 11. 20, 8:04, Christophe Leroy wrote:
>>>
>>>
>>> Le 04/11/2020 à 20:35, Lee Jones a écrit :
>>>> Fixes the following W=1 kernel build warning(s):
>>>>
>>>>    drivers/tty/serial/pmac_zilog.h:365:58: warning: variable
>>>> ‘garbage’ set but not used [-Wunused-but-set-variable]
>>>
>>> Explain how you are fixing this warning.
>>>
>>> Setting  __always_unused is usually not the good solution for fixing
>>> this warning, but here I guess this is likely the good solution. But it
>>> should be explained why.
> 
> There are normally 3 ways to fix this warning;
> 
>   - Start using/checking the variable/result
>   - Remove the variable
>   - Mark it as __{always,maybe}_unused
> 
> The later just tells the compiler that not checking the resultant
> value is intentional.  There are some functions (as Jiri mentions
> below) which are marked as '__must_check' which *require* a dummy
> (garbage) variable to be used.
> 
>> Or, why is the "garbage =" needed in the first place? read_zsdata is not
>> defined with __warn_unused_result__.
> 
> I used '__always_used' here for fear of breaking something.
> 
> However, if it's safe to remove it, then all the better.

Yes please -- this "garbage" is one of the examples of volatile misuses. 
If readb didn't work on volatile pointer, marking the return variable as 
volatile wouldn't save it.

>> And even if it was, would (void)!read_zsdata(port) fix it?
> 
> That's hideous. :D

Sure, marking reads as must_check would be insane.

> *Much* better to just use '__always_used' in that use-case.

Then using a dummy variable to fool must_check must mean must_check is 
used incorrectly, no :)? But there are always exceptions…

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours
  2020-11-05  8:54     ` Lee Jones
@ 2020-11-05  8:56       ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-05  8:56 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, Greg Kroah-Hartman

On Thu, 05 Nov 2020, Lee Jones wrote:

> On Thu, 05 Nov 2020, Jiri Slaby wrote:
> 
> > On 04. 11. 20, 20:35, Lee Jones wrote:
> > >   - Functions must follow directly on from their headers
> > >   - Demote non-conforming kernel-doc header
> > >   - Ensure notes have unique section names
> > >   - Provide missing description for 'reinit'
> > > 
> > > Fixes the following W=1 kernel build warning(s):
> > > 
> > >   drivers/tty/tty_ldisc.c:158: warning: cannot understand function prototype: 'int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD); '
> > >   drivers/tty/tty_ldisc.c:199: warning: Function parameter or member 'ld' not described in 'tty_ldisc_put'
> > >   drivers/tty/tty_ldisc.c:260: warning: duplicate section name 'Note'
> > >   drivers/tty/tty_ldisc.c:717: warning: Function parameter or member 'reinit' not described in 'tty_ldisc_hangup'
> > > 
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > >   drivers/tty/tty_ldisc.c | 10 +++++-----
> > >   1 file changed, 5 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
> > > index fe37ec331289b..aced2bf6173be 100644
> > > --- a/drivers/tty/tty_ldisc.c
> > > +++ b/drivers/tty/tty_ldisc.c
> > > @@ -190,7 +189,7 @@ static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
> > >   	return ld;
> > >   }
> > > -/**
> > > +/*
> > >    *	tty_ldisc_put		-	release the ldisc
> > 
> > Having tty_ldisc_get in kernel-doc, while tty_ldisc_put not doesn't make
> > much sense. What's missing to tty_ldisc_put to conform to kernel-doc?
> 
> Where are they in kernel-doc?  I don't see any references.

Also:

 $ ./scripts/find-unused-docs.sh drivers/tty/
 The following files contain kerneldoc comments for exported functions that are not used in the formatted documentation
 drivers/tty/n_tracesink.c
 drivers/tty/tty_baudrate.c
 drivers/tty/serial/8250/8250_port.c
 drivers/tty/serdev/core.c
 drivers/tty/vt/keyboard.c
 drivers/tty/vt/selection.c
 drivers/tty/vt/consolemap.c
 drivers/tty/vt/vt.c
 drivers/tty/tty_jobctrl.c
 drivers/tty/tty_buffer.c
 drivers/tty/n_tty.c
 drivers/tty/hvc/hvc_console.c
 drivers/tty/tty_ioctl.c
 drivers/tty/sysrq.c
 drivers/tty/tty_ldisc.c                    <---------
 drivers/tty/tty_io.c
 drivers/tty/tty_port.c

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
  2020-11-05  8:55         ` Jiri Slaby
@ 2020-11-05  9:00           ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-05  9:00 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Christophe Leroy, Greg Kroah-Hartman, linuxppc-dev, linux-kernel,
	Paul Mackerras, linux-serial

On Thu, 05 Nov 2020, Jiri Slaby wrote:

> On 05. 11. 20, 9:36, Lee Jones wrote:
> > On Thu, 05 Nov 2020, Jiri Slaby wrote:
> > 
> > > On 05. 11. 20, 8:04, Christophe Leroy wrote:
> > > > 
> > > > 
> > > > Le 04/11/2020 à 20:35, Lee Jones a écrit :
> > > > > Fixes the following W=1 kernel build warning(s):
> > > > > 
> > > > >    drivers/tty/serial/pmac_zilog.h:365:58: warning: variable
> > > > > ‘garbage’ set but not used [-Wunused-but-set-variable]
> > > > 
> > > > Explain how you are fixing this warning.
> > > > 
> > > > Setting  __always_unused is usually not the good solution for fixing
> > > > this warning, but here I guess this is likely the good solution. But it
> > > > should be explained why.
> > 
> > There are normally 3 ways to fix this warning;
> > 
> >   - Start using/checking the variable/result
> >   - Remove the variable
> >   - Mark it as __{always,maybe}_unused
> > 
> > The later just tells the compiler that not checking the resultant
> > value is intentional.  There are some functions (as Jiri mentions
> > below) which are marked as '__must_check' which *require* a dummy
> > (garbage) variable to be used.
> > 
> > > Or, why is the "garbage =" needed in the first place? read_zsdata is not
> > > defined with __warn_unused_result__.
> > 
> > I used '__always_used' here for fear of breaking something.
> > 
> > However, if it's safe to remove it, then all the better.
> 
> Yes please -- this "garbage" is one of the examples of volatile misuses. If
> readb didn't work on volatile pointer, marking the return variable as
> volatile wouldn't save it.
> 
> > > And even if it was, would (void)!read_zsdata(port) fix it?
> > 
> > That's hideous. :D
> 
> Sure, marking reads as must_check would be insane.
> 
> > *Much* better to just use '__always_used' in that use-case.
> 
> Then using a dummy variable to fool must_check must mean must_check is used
> incorrectly, no :)? But there are always exceptions…

Agreed on all points.

Will fix.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 35/36] tty: synclink: Mark disposable variables as __always_unused
  2020-11-05  8:35   ` Jiri Slaby
@ 2020-11-05  9:00     ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-05  9:00 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, Greg Kroah-Hartman, paulkf

On Thu, 05 Nov 2020, Jiri Slaby wrote:

> On 04. 11. 20, 20:35, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/tty/synclink.c: In function ‘usc_reset’:
> >   drivers/tty/synclink.c:5571:6: warning: variable ‘readval’ set but not used [-Wunused-but-set-variable]
> >   drivers/tty/synclink.c: In function ‘mgsl_load_pci_memory’:
> >   drivers/tty/synclink.c:7267:16: warning: variable ‘Dummy’ set but not used [-Wunused-but-set-variable]
> > 
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Jiri Slaby <jirislaby@kernel.org>
> > Cc: paulkf@microgate.com
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >   drivers/tty/synclink.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
> > index c8324d58ef564..8ed64b1e7c378 100644
> > --- a/drivers/tty/synclink.c
> > +++ b/drivers/tty/synclink.c
> > @@ -5568,7 +5568,7 @@ static void usc_load_txfifo( struct mgsl_struct *info )
> >   static void usc_reset( struct mgsl_struct *info )
> >   {
> >   	int i;
> > -	u32 readval;
> > +	u32 __always_unused readval;
> 
> The same as in synclinkmp.
> 
> >   	/* Set BIT30 of Misc Control Register */
> >   	/* (Local Control Register 0x50) to force reset of USC. */
> > @@ -7264,7 +7264,7 @@ static void mgsl_load_pci_memory( char* TargetPtr, const char* SourcePtr,
> >   	unsigned short Intervalcount = count / PCI_LOAD_INTERVAL;
> >   	unsigned short Index;
> > -	unsigned long Dummy;
> > +	unsigned long __always_unused Dummy;
> 
> You can kill it completely.

Great.  Will fix.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05  8:43     ` Lee Jones
@ 2020-11-05  9:10       ` Jiri Slaby
  2020-11-05  9:39         ` Paul Fulghum
  2020-11-05 11:04         ` David Laight
  0 siblings, 2 replies; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05  9:10 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Greg Kroah-Hartman, paulkf

On 05. 11. 20, 9:43, Lee Jones wrote:
> On Thu, 05 Nov 2020, Jiri Slaby wrote:
> 
>> On 04. 11. 20, 20:35, Lee Jones wrote:
>>> Fixes the following W=1 kernel build warning(s):
>>>
>>>    drivers/tty/synclinkmp.c: In function ‘init_adapter’:
>>>    drivers/tty/synclinkmp.c:5167:6: warning: variable ‘readval’ set but not used [-Wunused-but-set-variable]
>>>
>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>> Cc: Jiri Slaby <jirislaby@kernel.org>
>>> Cc: paulkf@microgate.com
>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>>> ---
>>>    drivers/tty/synclinkmp.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
>>> index 0ca738f61a35b..75f494bfdcbed 100644
>>> --- a/drivers/tty/synclinkmp.c
>>> +++ b/drivers/tty/synclinkmp.c
>>> @@ -5165,7 +5165,7 @@ static bool init_adapter(SLMP_INFO *info)
>>>    	/* Set BIT30 of Local Control Reg 0x50 to reset SCA */
>>>    	volatile u32 *MiscCtrl = (u32 *)(info->lcr_base + 0x50);
>>> -	u32 readval;
>>> +	u32 __always_unused readval;
>>
>> Why not just remove readval completely as in other cases?
> 
> Because I don't know what the result would be.
> 
> Will the read still happen, or will the compiler optimise it away?

The compiler will eliminate this dead store anyway. However given the 
MiscCtrl pointer is volatile, the read proper must remain.

> My changes should not affect any of the instructions i.e. the register
> read must still take place

I understand. But the C specification helps here.

>> And the loop can be turned into ndelay:
>>
>>          /*
>>           * Force at least 170ns delay before clearing
>>           * reset bit. Each read from LCR takes at least
>>           * 30ns so 10 times for 300ns to be safe.
>>           */
>>          for(i=0;i<10;i++)
>>                  readval = *MiscCtrl;
> 
> Again, since I can't test this, I do not want this patch to contain
> any functional changes.  AFAIC, the 10 register reads must still
> happen after this patch is applied.

OK, let the loop alone. I would bet a half a pig that noone is able to 
test this driver. But one has to write this for someone to raise and 
admit they are still using it. In fact, there are _4_ google replies to 
"Microgate Corporation" "SyncLink Multiport Adapter" "lspci".

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues
  2020-11-05  8:53     ` Lee Jones
@ 2020-11-05  9:14       ` Jiri Slaby
  0 siblings, 0 replies; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05  9:14 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Greg Kroah-Hartman, Nick Holloway, --,
	Marko Kohtala, Bill Hawes, C. Scott Ananian, Russell King,
	Andrew Morton

On 05. 11. 20, 9:53, Lee Jones wrote:
>> For example, alloc_tty_struct is among the
>> ones, I would like to see fixed instead of removed from kernel-doc.
> 
> There is nothing stopping anyone from providing said descriptions and
> promoting it back up to kernel-doc.  If you have good reasons for it
> to be properly documented with kernel-doc, then it should also be
> referenced from /Documentation using the kernel-doc:: notation.
> 
> Also see: scripts/find-unused-docs.sh

Thanks for this. I must admit, I haven't managed to get familiar with 
this stuff yet.

-- 
js
suse labs

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05  9:10       ` Jiri Slaby
@ 2020-11-05  9:39         ` Paul Fulghum
  2020-11-05  9:55           ` Greg Kroah-Hartman
  2020-11-05 10:54           ` Jiri Slaby
  2020-11-05 11:04         ` David Laight
  1 sibling, 2 replies; 84+ messages in thread
From: Paul Fulghum @ 2020-11-05  9:39 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Lee Jones, linux-kernel@vger.kernel.org Mailing List, Greg Kroah-Hartman



> On Nov 5, 2020, at 1:10 AM, Jiri Slaby <jirislaby@kernel.org> wrote:
> 
> OK, let the loop alone. I would bet a half a pig that noone is able to test this driver. But one has to write this for someone to raise and admit they are still using it. In fact, there are _4_ google replies to "Microgate Corporation" "SyncLink Multiport Adapter" "lspci".



The hardware used with synclink.c and synclinkmp.c has not been manufactured for 15 years and was low volume. The chances of either driver still being in use is very low. Not even Microgate (me) has the ability to test either anymore (no hardware). I don’t know the policy about driver removal, but I think both could be removed without upsetting anyone.

synclink_gt.c is still in production and the driver still actively used.

If there are no objections to removing the the old drivers (synclink.c/synclink_mp.c) I could make a patch to do so tomorrow (it is 1:30am here now). Nothing eliminates niggling warnings like removing dead code.










^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05  9:39         ` Paul Fulghum
@ 2020-11-05  9:55           ` Greg Kroah-Hartman
  2020-11-05 10:05             ` Lee Jones
  2020-11-05 10:54           ` Jiri Slaby
  1 sibling, 1 reply; 84+ messages in thread
From: Greg Kroah-Hartman @ 2020-11-05  9:55 UTC (permalink / raw)
  To: Paul Fulghum
  Cc: Jiri Slaby, Lee Jones, linux-kernel@vger.kernel.org Mailing List

On Thu, Nov 05, 2020 at 01:39:36AM -0800, Paul Fulghum wrote:
> 
> 
> > On Nov 5, 2020, at 1:10 AM, Jiri Slaby <jirislaby@kernel.org> wrote:
> > 
> > OK, let the loop alone. I would bet a half a pig that noone is able to test this driver. But one has to write this for someone to raise and admit they are still using it. In fact, there are _4_ google replies to "Microgate Corporation" "SyncLink Multiport Adapter" "lspci".
> 
> 
> 
> The hardware used with synclink.c and synclinkmp.c has not been manufactured for 15 years and was low volume. The chances of either driver still being in use is very low. Not even Microgate (me) has the ability to test either anymore (no hardware). I don’t know the policy about driver removal, but I think both could be removed without upsetting anyone.
> 
> synclink_gt.c is still in production and the driver still actively used.
> 
> If there are no objections to removing the the old drivers (synclink.c/synclink_mp.c) I could make a patch to do so tomorrow (it is 1:30am here now). Nothing eliminates niggling warnings like removing dead code.

Great, please submit a patch to remove these, I will always take patches
to delete lines :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05  9:55           ` Greg Kroah-Hartman
@ 2020-11-05 10:05             ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-05 10:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Paul Fulghum, Jiri Slaby, linux-kernel@vger.kernel.org Mailing List

On Thu, 05 Nov 2020, Greg Kroah-Hartman wrote:

> On Thu, Nov 05, 2020 at 01:39:36AM -0800, Paul Fulghum wrote:
> > 
> > 
> > > On Nov 5, 2020, at 1:10 AM, Jiri Slaby <jirislaby@kernel.org> wrote:
> > > 
> > > OK, let the loop alone. I would bet a half a pig that noone is able to test this driver. But one has to write this for someone to raise and admit they are still using it. In fact, there are _4_ google replies to "Microgate Corporation" "SyncLink Multiport Adapter" "lspci".
> > 
> > 
> > 
> > The hardware used with synclink.c and synclinkmp.c has not been
> manufactured for 15 years and was low volume. The chances of either
> driver still being in use is very low. Not even Microgate (me) has
> the ability to test either anymore (no hardware). I don’t know the
> policy about driver removal, but I think both could be removed
> without upsetting anyone.
> > 
> > synclink_gt.c is still in production and the driver still actively used.
> > 
> > If there are no objections to removing the the old drivers
> > (synclink.c/synclink_mp.c) I could make a patch to do so tomorrow
> > (it is 1:30am here now). Nothing eliminates niggling warnings like
> > removing dead code. 
> 
> Great, please submit a patch to remove these, I will always take patches
> to delete lines :)

Good resolution.  I'm happy to do this.  Bear with me.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05  9:39         ` Paul Fulghum
  2020-11-05  9:55           ` Greg Kroah-Hartman
@ 2020-11-05 10:54           ` Jiri Slaby
  1 sibling, 0 replies; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05 10:54 UTC (permalink / raw)
  To: Paul Fulghum
  Cc: Lee Jones, linux-kernel@vger.kernel.org Mailing List, Greg Kroah-Hartman

On 05. 11. 20, 10:39, Paul Fulghum wrote:
> If there are no objections to removing the the old drivers (synclink.c/synclink_mp.c) I could make a patch to do so tomorrow (it is 1:30am here now). Nothing eliminates niggling warnings like removing dead code.

\o/ Thanks a lot.

-- 
js
suse labs

^ permalink raw reply	[flat|nested] 84+ messages in thread

* RE: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05  9:10       ` Jiri Slaby
  2020-11-05  9:39         ` Paul Fulghum
@ 2020-11-05 11:04         ` David Laight
  2020-11-05 11:27           ` Lee Jones
  2020-11-05 16:41           ` Jiri Slaby
  1 sibling, 2 replies; 84+ messages in thread
From: David Laight @ 2020-11-05 11:04 UTC (permalink / raw)
  To: 'Jiri Slaby', Lee Jones; +Cc: linux-kernel, Greg Kroah-Hartman, paulkf

> >> And the loop can be turned into ndelay:
> >>
> >>          /*
> >>           * Force at least 170ns delay before clearing
> >>           * reset bit. Each read from LCR takes at least
> >>           * 30ns so 10 times for 300ns to be safe.
> >>           */
> >>          for(i=0;i<10;i++)
> >>                  readval = *MiscCtrl;
> >
> > Again, since I can't test this, I do not want this patch to contain
> > any functional changes.  AFAIC, the 10 register reads must still
> > happen after this patch is applied.

You can't use ndelay(); the writes can get posted so can appear
much closer together by the time they get to the actual hardware.
Multiple volatile reads don't need a target variable.
(Shouldn't they also real readl()?)

Deleting the driver works...

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05 11:04         ` David Laight
@ 2020-11-05 11:27           ` Lee Jones
       [not found]             ` <54D08301-C89F-4AEB-B9A0-6CED6D5EEDA6@microgate.com>
  2020-11-05 16:41           ` Jiri Slaby
  1 sibling, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-05 11:27 UTC (permalink / raw)
  To: David Laight
  Cc: 'Jiri Slaby', linux-kernel, Greg Kroah-Hartman, paulkf

On Thu, 05 Nov 2020, David Laight wrote:

> > >> And the loop can be turned into ndelay:
> > >>
> > >>          /*
> > >>           * Force at least 170ns delay before clearing
> > >>           * reset bit. Each read from LCR takes at least
> > >>           * 30ns so 10 times for 300ns to be safe.
> > >>           */
> > >>          for(i=0;i<10;i++)
> > >>                  readval = *MiscCtrl;
> > >
> > > Again, since I can't test this, I do not want this patch to contain
> > > any functional changes.  AFAIC, the 10 register reads must still
> > > happen after this patch is applied.
> 
> You can't use ndelay(); the writes can get posted so can appear
> much closer together by the time they get to the actual hardware.
> Multiple volatile reads don't need a target variable.
> (Shouldn't they also real readl()?)
> 
> Deleting the driver works...

Will post the removal patches when my tests finish.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 20/36] tty: serial: msm_serial: Remove set but unused variable 'status'
  2020-11-04 19:35 ` [PATCH 20/36] tty: serial: msm_serial: Remove set but unused variable 'status' Lee Jones
@ 2020-11-05 16:09   ` Jeffrey Hugo
  0 siblings, 0 replies; 84+ messages in thread
From: Jeffrey Hugo @ 2020-11-05 16:09 UTC (permalink / raw)
  To: Lee Jones
  Cc: lkml, Andy Gross, Bjorn Andersson, Greg Kroah-Hartman,
	Jiri Slaby, Robert Love, MSM, linux-serial

On Wed, Nov 4, 2020 at 12:38 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/tty/serial/msm_serial.c: In function ‘msm_complete_tx_dma’:
>  drivers/tty/serial/msm_serial.c:429:18: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Robert Love <rlove@google.com>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05 11:04         ` David Laight
  2020-11-05 11:27           ` Lee Jones
@ 2020-11-05 16:41           ` Jiri Slaby
  1 sibling, 0 replies; 84+ messages in thread
From: Jiri Slaby @ 2020-11-05 16:41 UTC (permalink / raw)
  To: David Laight, Lee Jones; +Cc: linux-kernel, Greg Kroah-Hartman, paulkf

On 05. 11. 20, 12:04, David Laight wrote:
>>>> And the loop can be turned into ndelay:
>>>>
>>>>           /*
>>>>            * Force at least 170ns delay before clearing
>>>>            * reset bit. Each read from LCR takes at least
>>>>            * 30ns so 10 times for 300ns to be safe.
>>>>            */
>>>>           for(i=0;i<10;i++)
>>>>                   readval = *MiscCtrl;
>>>
>>> Again, since I can't test this, I do not want this patch to contain
>>> any functional changes.  AFAIC, the 10 register reads must still
>>> happen after this patch is applied.
> 
> You can't use ndelay(); the writes can get posted so can appear
> much closer together by the time they get to the actual hardware.

Ah, indeed, this is on PCI. One read would need to stay before ndelay 
then. But given it completely goes away, no need to worry. Thanks for 
heads up.

-- 
js
suse labs

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
       [not found]             ` <54D08301-C89F-4AEB-B9A0-6CED6D5EEDA6@microgate.com>
@ 2020-11-05 17:04               ` Paul Fulghum
  2020-11-05 18:05                 ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Paul Fulghum @ 2020-11-05 17:04 UTC (permalink / raw)
  To: Lee Jones; +Cc: David Laight, Jiri Slaby, linux-kernel, Greg Kroah-Hartman


Another candidate for removal is drivers/char/pcmcia/synclink_cs.c

Everything I said about synclink.c/synclinkmp.c is true of that as well: the hardware stopped being manufactured decades ago and is not available for testing. The possibility of these cards still being around/functional for use with the latest kernel is about zero.

If Lee Jones does wants to add that to his patch, great. If not then I can do so.

(I resent this message in plain text after it was rejected for HTML, sorry if anyone got a duplicate.)


> On Nov 5, 2020, at 3:27 AM, Lee Jones <lee.jones@linaro.org> wrote:
> 
> Will post the removal patches when my tests finish.

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
  2020-11-05 17:04               ` Paul Fulghum
@ 2020-11-05 18:05                 ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-05 18:05 UTC (permalink / raw)
  To: Paul Fulghum; +Cc: David Laight, Jiri Slaby, linux-kernel, Greg Kroah-Hartman

On Thu, 05 Nov 2020, Paul Fulghum wrote:

> 
> Another candidate for removal is drivers/char/pcmcia/synclink_cs.c
> 
> Everything I said about synclink.c/synclinkmp.c is true of that as well: the hardware stopped being manufactured decades ago and is not available for testing. The possibility of these cards still being around/functional for use with the latest kernel is about zero.
> 
> If Lee Jones does wants to add that to his patch, great. If not then I can do so.

I'll probably send this as a follow-up, as it's easier to get merged
into a different subsystem if they patches are separate and
orthogonal.

Will submit them on the morrow.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 25/36] tty: serial: sifive: Struct headers should start with 'struct <name>'
  2020-11-04 19:35 ` [PATCH 25/36] tty: serial: sifive: " Lee Jones
@ 2020-11-06  8:11   ` Palmer Dabbelt
  0 siblings, 0 replies; 84+ messages in thread
From: Palmer Dabbelt @ 2020-11-06  8:11 UTC (permalink / raw)
  To: lee.jones
  Cc: lee.jones, linux-kernel, Greg KH, jirislaby, Paul Walmsley,
	linux-serial, linux-riscv

On Wed, 04 Nov 2020 11:35:38 PST (-0800), lee.jones@linaro.org wrote:
> Also supply a missing member description.
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/tty/serial/sifive.c:157: warning: cannot understand function prototype: 'struct sifive_serial_port '
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: linux-serial@vger.kernel.org
> Cc: linux-riscv@lists.infradead.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/tty/serial/sifive.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
> index 13eadcb8aec4e..1066eebe3b28b 100644
> --- a/drivers/tty/serial/sifive.c
> +++ b/drivers/tty/serial/sifive.c
> @@ -144,12 +144,13 @@
>   */
>
>  /**
> - * sifive_serial_port - driver-specific data extension to struct uart_port
> + * struct sifive_serial_port - driver-specific data extension to struct uart_port
>   * @port: struct uart_port embedded in this struct
>   * @dev: struct device *
>   * @ier: shadowed copy of the interrupt enable register
>   * @clkin_rate: input clock to the UART IP block.
>   * @baud_rate: UART serial line rate (e.g., 115200 baud)
> + * @clk: reference to this device's clock
>   * @clk_notifier: clock rate change notifier for upstream clock changes
>   *
>   * Configuration data specific to this SiFive UART.

Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>

Thanks!

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-04 19:35 ` [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers Lee Jones
@ 2020-11-06  9:53   ` Greg Kroah-Hartman
  2020-11-06 10:05     ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Greg Kroah-Hartman @ 2020-11-06  9:53 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Jiri Slaby, Mike Hudson, linux-serial

On Wed, Nov 04, 2020 at 07:35:26PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
>  drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Mike Hudson <Exoray@isys.ca>
> Cc: linux-serial@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/tty/serial/8250/8250_port.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

And now I get build errors of:
	ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
	8250_early.c:(.init.text+0x7): undefined reference to `au_serial_in'
	ld: 8250_early.c:(.init.text+0xf): undefined reference to `au_serial_out'
	make: *** [Makefile:1164: vmlinux] Error 1

Always test-build your patches, perhaps W=1 was wrong here...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 00/36] Rid W=1 issues from TTY
  2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
                   ` (35 preceding siblings ...)
  2020-11-04 19:35 ` [PATCH 36/36] tty: synclink: Provide missing description for 'hdlcdev_tx_timeout's 'txqueue' param Lee Jones
@ 2020-11-06  9:54 ` Greg Kroah-Hartman
  36 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2020-11-06  9:54 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Alexandre Torgue, Andrew J. Kroll, Andrew Morton,
	Andy Gross, Benjamin Herrenschmidt, Bill Hawes, Bjorn Andersson,
	Christian König, Colin Ian King, C. Scott Ananian,
	David A. Hinds, dri-devel, Filip Aben, Gerald Baeza,
	Jakub Jelinek, Jan Dumon, Jiri Slaby, Jonathan Hunter,
	Joseph Barrow, --,
	Kevin Wells, Laxman Dewangan, linaro-mm-sig, linux-arm-msm,
	linux-media, linuxppc-dev, linux-riscv, linux-serial,
	linux-stm32, linux-tegra, Marko Kohtala, Maxime Coquelin,
	Michael Ellerman, Michal Simek, Mike Hudson, Miloslav Trmac,
	Nick Holloway, Palmer Dabbelt, paulkf, Paul Mackerras,
	Paul Walmsley, Philipp Zabel, processes-Sapan Bhatia,
	Robert Love, Rob Herring, Roland Stigge, Russell King,
	Russell King, Russ Gorby, Stanislav Voronyi, Sumit Semwal,
	Sylvain Lemieux, Thierry Reding, Vladimir Zapolskiy

On Wed, Nov 04, 2020 at 07:35:13PM +0000, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.

Many of these now applied, please update the series against my
tty-testing branch and resend the rest.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06  9:53   ` Greg Kroah-Hartman
@ 2020-11-06 10:05     ` Lee Jones
  2020-11-06 10:16       ` Lee Jones
  2020-11-06 10:20       ` Greg Kroah-Hartman
  0 siblings, 2 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-06 10:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Jiri Slaby, Mike Hudson, linux-serial

On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:

> On Wed, Nov 04, 2020 at 07:35:26PM +0000, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
> >  drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]
> > 
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Jiri Slaby <jirislaby@kernel.org>
> > Cc: Mike Hudson <Exoray@isys.ca>
> > Cc: linux-serial@vger.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  drivers/tty/serial/8250/8250_port.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> And now I get build errors of:
> 	ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
> 	8250_early.c:(.init.text+0x7): undefined reference to `au_serial_in'
> 	ld: 8250_early.c:(.init.text+0xf): undefined reference to `au_serial_out'
> 	make: *** [Makefile:1164: vmlinux] Error 1
> 
> Always test-build your patches, perhaps W=1 was wrong here...

I *always* test build my sets before posting.

/investigating

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06 10:05     ` Lee Jones
@ 2020-11-06 10:16       ` Lee Jones
  2020-11-06 10:39         ` Greg Kroah-Hartman
  2020-11-06 10:20       ` Greg Kroah-Hartman
  1 sibling, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-06 10:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Jiri Slaby, Mike Hudson, linux-serial

On Fri, 06 Nov 2020, Lee Jones wrote:

> On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:
> 
> > On Wed, Nov 04, 2020 at 07:35:26PM +0000, Lee Jones wrote:
> > > Fixes the following W=1 kernel build warning(s):
> > > 
> > >  drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
> > >  drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]
> > > 
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > Cc: Mike Hudson <Exoray@isys.ca>
> > > Cc: linux-serial@vger.kernel.org
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > >  drivers/tty/serial/8250/8250_port.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > And now I get build errors of:
> > 	ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
> > 	8250_early.c:(.init.text+0x7): undefined reference to `au_serial_in'
> > 	ld: 8250_early.c:(.init.text+0xf): undefined reference to `au_serial_out'
> > 	make: *** [Makefile:1164: vmlinux] Error 1
> > 
> 
> I *always* test build my sets before posting.
> 
> /investigating

What config failed for you?

It looks as though SERIAL_8250_CONSOLE is a bool and doesn't appear to
be compiled with allmodconfig builds for any architecture that I test
against (Arm, Arm64, MIPS, PPC, x86).

> > perhaps W=1 was wrong here...

NEVER! ;)

The prototype just needs moving is all.

I'll fix the issue and re-post an alternative patch.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06 10:05     ` Lee Jones
  2020-11-06 10:16       ` Lee Jones
@ 2020-11-06 10:20       ` Greg Kroah-Hartman
  2020-11-06 10:47         ` Lee Jones
  1 sibling, 1 reply; 84+ messages in thread
From: Greg Kroah-Hartman @ 2020-11-06 10:20 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Jiri Slaby, Mike Hudson, linux-serial

On Fri, Nov 06, 2020 at 10:05:52AM +0000, Lee Jones wrote:
> On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:
> 
> > On Wed, Nov 04, 2020 at 07:35:26PM +0000, Lee Jones wrote:
> > > Fixes the following W=1 kernel build warning(s):
> > > 
> > >  drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
> > >  drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]
> > > 
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > Cc: Mike Hudson <Exoray@isys.ca>
> > > Cc: linux-serial@vger.kernel.org
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > >  drivers/tty/serial/8250/8250_port.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > And now I get build errors of:
> > 	ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
> > 	8250_early.c:(.init.text+0x7): undefined reference to `au_serial_in'
> > 	ld: 8250_early.c:(.init.text+0xf): undefined reference to `au_serial_out'
> > 	make: *** [Makefile:1164: vmlinux] Error 1
> > 
> > Always test-build your patches, perhaps W=1 was wrong here...
> 
> I *always* test build my sets before posting.

Great, then I should have rephrased it as:
	Always test-build your patches and fix the error found in them
	before sending.

:)


^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06 10:16       ` Lee Jones
@ 2020-11-06 10:39         ` Greg Kroah-Hartman
  2020-11-06 10:48           ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Greg Kroah-Hartman @ 2020-11-06 10:39 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Jiri Slaby, Mike Hudson, linux-serial

On Fri, Nov 06, 2020 at 10:16:46AM +0000, Lee Jones wrote:
> On Fri, 06 Nov 2020, Lee Jones wrote:
> 
> > On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:
> > 
> > > On Wed, Nov 04, 2020 at 07:35:26PM +0000, Lee Jones wrote:
> > > > Fixes the following W=1 kernel build warning(s):
> > > > 
> > > >  drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
> > > >  drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]
> > > > 
> > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > > Cc: Mike Hudson <Exoray@isys.ca>
> > > > Cc: linux-serial@vger.kernel.org
> > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > > ---
> > > >  drivers/tty/serial/8250/8250_port.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > And now I get build errors of:
> > > 	ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
> > > 	8250_early.c:(.init.text+0x7): undefined reference to `au_serial_in'
> > > 	ld: 8250_early.c:(.init.text+0xf): undefined reference to `au_serial_out'
> > > 	make: *** [Makefile:1164: vmlinux] Error 1
> > > 
> > 
> > I *always* test build my sets before posting.
> > 
> > /investigating
> 
> What config failed for you?
> 
> It looks as though SERIAL_8250_CONSOLE is a bool and doesn't appear to
> be compiled with allmodconfig builds for any architecture that I test
> against (Arm, Arm64, MIPS, PPC, x86).

I build on x86, and here's what I have set:

CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_16550A_VARIANTS=y
CONFIG_SERIAL_8250_FINTEK=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_DMA=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_EXAR=y
CONFIG_SERIAL_8250_NR_UARTS=16
CONFIG_SERIAL_8250_RUNTIME_UARTS=8
CONFIG_SERIAL_8250_EXTENDED=y
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_RSA is not set
CONFIG_SERIAL_8250_DWLIB=y
CONFIG_SERIAL_8250_DW=m
CONFIG_SERIAL_8250_RT288X=y
CONFIG_SERIAL_8250_UNIPHIER=m
CONFIG_SERIAL_8250_LPSS=y
CONFIG_SERIAL_8250_MID=y
CONFIG_SERIAL_8250_TEGRA=m



^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06 10:20       ` Greg Kroah-Hartman
@ 2020-11-06 10:47         ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-06 10:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Jiri Slaby, Mike Hudson, linux-serial

On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:

> On Fri, Nov 06, 2020 at 10:05:52AM +0000, Lee Jones wrote:
> > On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:
> > 
> > > On Wed, Nov 04, 2020 at 07:35:26PM +0000, Lee Jones wrote:
> > > > Fixes the following W=1 kernel build warning(s):
> > > > 
> > > >  drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
> > > >  drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]
> > > > 
> > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > > Cc: Mike Hudson <Exoray@isys.ca>
> > > > Cc: linux-serial@vger.kernel.org
> > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > > ---
> > > >  drivers/tty/serial/8250/8250_port.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > And now I get build errors of:
> > > 	ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
> > > 	8250_early.c:(.init.text+0x7): undefined reference to `au_serial_in'
> > > 	ld: 8250_early.c:(.init.text+0xf): undefined reference to `au_serial_out'
> > > 	make: *** [Makefile:1164: vmlinux] Error 1
> > > 
> > > Always test-build your patches, perhaps W=1 was wrong here...
> > 
> > I *always* test build my sets before posting.
> 
> Great, then I should have rephrased it as:
> 	Always test-build your patches and fix the error found in them
> 	before sending.

Yes, very funny! ;)

Obviously, all of that was implied in my first reply.

The problem is not a lack of testing, it's the testing method.

I thought allmodconfig would be enough, but it appears not.

Currently investigating with allyesconfig as a drop-in replacement.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06 10:39         ` Greg Kroah-Hartman
@ 2020-11-06 10:48           ` Lee Jones
  2020-11-06 10:55             ` Greg Kroah-Hartman
  0 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-06 10:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Jiri Slaby, Mike Hudson, linux-serial

On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:

> On Fri, Nov 06, 2020 at 10:16:46AM +0000, Lee Jones wrote:
> > On Fri, 06 Nov 2020, Lee Jones wrote:
> > 
> > > On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:
> > > 
> > > > On Wed, Nov 04, 2020 at 07:35:26PM +0000, Lee Jones wrote:
> > > > > Fixes the following W=1 kernel build warning(s):
> > > > > 
> > > > >  drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
> > > > >  drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]
> > > > > 
> > > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > > > Cc: Mike Hudson <Exoray@isys.ca>
> > > > > Cc: linux-serial@vger.kernel.org
> > > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > > > ---
> > > > >  drivers/tty/serial/8250/8250_port.c | 4 ++--
> > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > 
> > > > And now I get build errors of:
> > > > 	ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
> > > > 	8250_early.c:(.init.text+0x7): undefined reference to `au_serial_in'
> > > > 	ld: 8250_early.c:(.init.text+0xf): undefined reference to `au_serial_out'
> > > > 	make: *** [Makefile:1164: vmlinux] Error 1
> > > > 
> > > 
> > > I *always* test build my sets before posting.
> > > 
> > > /investigating
> > 
> > What config failed for you?
> > 
> > It looks as though SERIAL_8250_CONSOLE is a bool and doesn't appear to
> > be compiled with allmodconfig builds for any architecture that I test
> > against (Arm, Arm64, MIPS, PPC, x86).
> 
> I build on x86, and here's what I have set:
> 
> CONFIG_SERIAL_EARLYCON=y
> CONFIG_SERIAL_8250=y
> CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
> CONFIG_SERIAL_8250_PNP=y
> CONFIG_SERIAL_8250_16550A_VARIANTS=y
> CONFIG_SERIAL_8250_FINTEK=y
> CONFIG_SERIAL_8250_CONSOLE=y
> CONFIG_SERIAL_8250_DMA=y
> CONFIG_SERIAL_8250_PCI=y
> CONFIG_SERIAL_8250_EXAR=y
> CONFIG_SERIAL_8250_NR_UARTS=16
> CONFIG_SERIAL_8250_RUNTIME_UARTS=8
> CONFIG_SERIAL_8250_EXTENDED=y
> # CONFIG_SERIAL_8250_MANY_PORTS is not set
> # CONFIG_SERIAL_8250_SHARE_IRQ is not set
> # CONFIG_SERIAL_8250_DETECT_IRQ is not set
> # CONFIG_SERIAL_8250_RSA is not set
> CONFIG_SERIAL_8250_DWLIB=y
> CONFIG_SERIAL_8250_DW=m
> CONFIG_SERIAL_8250_RT288X=y
> CONFIG_SERIAL_8250_UNIPHIER=m
> CONFIG_SERIAL_8250_LPSS=y
> CONFIG_SERIAL_8250_MID=y
> CONFIG_SERIAL_8250_TEGRA=m

Is that from the default defconfig?  Or something bespoke?

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06 10:48           ` Lee Jones
@ 2020-11-06 10:55             ` Greg Kroah-Hartman
  2020-11-06 11:12               ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Greg Kroah-Hartman @ 2020-11-06 10:55 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Jiri Slaby, Mike Hudson, linux-serial

On Fri, Nov 06, 2020 at 10:48:10AM +0000, Lee Jones wrote:
> On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:
> 
> > On Fri, Nov 06, 2020 at 10:16:46AM +0000, Lee Jones wrote:
> > > On Fri, 06 Nov 2020, Lee Jones wrote:
> > > 
> > > > On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:
> > > > 
> > > > > On Wed, Nov 04, 2020 at 07:35:26PM +0000, Lee Jones wrote:
> > > > > > Fixes the following W=1 kernel build warning(s):
> > > > > > 
> > > > > >  drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
> > > > > >  drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]
> > > > > > 
> > > > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > > > > Cc: Mike Hudson <Exoray@isys.ca>
> > > > > > Cc: linux-serial@vger.kernel.org
> > > > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > > > > ---
> > > > > >  drivers/tty/serial/8250/8250_port.c | 4 ++--
> > > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > 
> > > > > And now I get build errors of:
> > > > > 	ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
> > > > > 	8250_early.c:(.init.text+0x7): undefined reference to `au_serial_in'
> > > > > 	ld: 8250_early.c:(.init.text+0xf): undefined reference to `au_serial_out'
> > > > > 	make: *** [Makefile:1164: vmlinux] Error 1
> > > > > 
> > > > 
> > > > I *always* test build my sets before posting.
> > > > 
> > > > /investigating
> > > 
> > > What config failed for you?
> > > 
> > > It looks as though SERIAL_8250_CONSOLE is a bool and doesn't appear to
> > > be compiled with allmodconfig builds for any architecture that I test
> > > against (Arm, Arm64, MIPS, PPC, x86).
> > 
> > I build on x86, and here's what I have set:
> > 
> > CONFIG_SERIAL_EARLYCON=y
> > CONFIG_SERIAL_8250=y
> > CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
> > CONFIG_SERIAL_8250_PNP=y
> > CONFIG_SERIAL_8250_16550A_VARIANTS=y
> > CONFIG_SERIAL_8250_FINTEK=y
> > CONFIG_SERIAL_8250_CONSOLE=y
> > CONFIG_SERIAL_8250_DMA=y
> > CONFIG_SERIAL_8250_PCI=y
> > CONFIG_SERIAL_8250_EXAR=y
> > CONFIG_SERIAL_8250_NR_UARTS=16
> > CONFIG_SERIAL_8250_RUNTIME_UARTS=8
> > CONFIG_SERIAL_8250_EXTENDED=y
> > # CONFIG_SERIAL_8250_MANY_PORTS is not set
> > # CONFIG_SERIAL_8250_SHARE_IRQ is not set
> > # CONFIG_SERIAL_8250_DETECT_IRQ is not set
> > # CONFIG_SERIAL_8250_RSA is not set
> > CONFIG_SERIAL_8250_DWLIB=y
> > CONFIG_SERIAL_8250_DW=m
> > CONFIG_SERIAL_8250_RT288X=y
> > CONFIG_SERIAL_8250_UNIPHIER=m
> > CONFIG_SERIAL_8250_LPSS=y
> > CONFIG_SERIAL_8250_MID=y
> > CONFIG_SERIAL_8250_TEGRA=m
> 
> Is that from the default defconfig?  Or something bespoke?

No idea, bespoke I guess, it's grown over the years as what I use for
testing the tty.git tree.  Odd that I have some 8250 options turned off,
no idea why that is...

greg k-h

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06 10:55             ` Greg Kroah-Hartman
@ 2020-11-06 11:12               ` Lee Jones
  2020-11-06 11:19                 ` Jiri Slaby
  0 siblings, 1 reply; 84+ messages in thread
From: Lee Jones @ 2020-11-06 11:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Jiri Slaby, Mike Hudson, linux-serial

On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:

> On Fri, Nov 06, 2020 at 10:48:10AM +0000, Lee Jones wrote:
> > On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:
> > 
> > > On Fri, Nov 06, 2020 at 10:16:46AM +0000, Lee Jones wrote:
> > > > On Fri, 06 Nov 2020, Lee Jones wrote:
> > > > 
> > > > > On Fri, 06 Nov 2020, Greg Kroah-Hartman wrote:
> > > > > 
> > > > > > On Wed, Nov 04, 2020 at 07:35:26PM +0000, Lee Jones wrote:
> > > > > > > Fixes the following W=1 kernel build warning(s):
> > > > > > > 
> > > > > > >  drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes]
> > > > > > >  drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes]
> > > > > > > 
> > > > > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > > > > > Cc: Mike Hudson <Exoray@isys.ca>
> > > > > > > Cc: linux-serial@vger.kernel.org
> > > > > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > > > > > ---
> > > > > > >  drivers/tty/serial/8250/8250_port.c | 4 ++--
> > > > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > > 
> > > > > > And now I get build errors of:
> > > > > > 	ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
> > > > > > 	8250_early.c:(.init.text+0x7): undefined reference to `au_serial_in'
> > > > > > 	ld: 8250_early.c:(.init.text+0xf): undefined reference to `au_serial_out'
> > > > > > 	make: *** [Makefile:1164: vmlinux] Error 1
> > > > > > 
> > > > > 
> > > > > I *always* test build my sets before posting.
> > > > > 
> > > > > /investigating
> > > > 
> > > > What config failed for you?
> > > > 
> > > > It looks as though SERIAL_8250_CONSOLE is a bool and doesn't appear to
> > > > be compiled with allmodconfig builds for any architecture that I test
> > > > against (Arm, Arm64, MIPS, PPC, x86).
> > > 
> > > I build on x86, and here's what I have set:
> > > 
> > > CONFIG_SERIAL_EARLYCON=y
> > > CONFIG_SERIAL_8250=y
> > > CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
> > > CONFIG_SERIAL_8250_PNP=y
> > > CONFIG_SERIAL_8250_16550A_VARIANTS=y
> > > CONFIG_SERIAL_8250_FINTEK=y
> > > CONFIG_SERIAL_8250_CONSOLE=y
> > > CONFIG_SERIAL_8250_DMA=y
> > > CONFIG_SERIAL_8250_PCI=y
> > > CONFIG_SERIAL_8250_EXAR=y
> > > CONFIG_SERIAL_8250_NR_UARTS=16
> > > CONFIG_SERIAL_8250_RUNTIME_UARTS=8
> > > CONFIG_SERIAL_8250_EXTENDED=y
> > > # CONFIG_SERIAL_8250_MANY_PORTS is not set
> > > # CONFIG_SERIAL_8250_SHARE_IRQ is not set
> > > # CONFIG_SERIAL_8250_DETECT_IRQ is not set
> > > # CONFIG_SERIAL_8250_RSA is not set
> > > CONFIG_SERIAL_8250_DWLIB=y
> > > CONFIG_SERIAL_8250_DW=m
> > > CONFIG_SERIAL_8250_RT288X=y
> > > CONFIG_SERIAL_8250_UNIPHIER=m
> > > CONFIG_SERIAL_8250_LPSS=y
> > > CONFIG_SERIAL_8250_MID=y
> > > CONFIG_SERIAL_8250_TEGRA=m
> > 
> > Is that from the default defconfig?  Or something bespoke?
> 
> No idea, bespoke I guess, it's grown over the years as what I use for
> testing the tty.git tree.  Odd that I have some 8250 options turned off,
> no idea why that is...

Not as strange as this.

I cannot recreate the issue or work out why:

# THE OUTPUT
#   *_port.o and *_early.o were both built

$ ls -l ../builds/build-x86/drivers/tty/serial/8250/
total 1196
-rw-rw-r-- 1 lee lee  36376 Nov  6 10:52 8250_aspeed_vuart.o
-rw-rw-r-- 1 lee lee  17696 Nov  6 10:52 8250_bcm2835aux.o
-rw-rw-r-- 1 lee lee  90896 Nov  6 10:52 8250_core.o
-rw-rw-r-- 1 lee lee  34184 Nov  6 10:52 8250_dma.o
-rw-rw-r-- 1 lee lee  11840 Nov  6 10:52 8250_dwlib.o
-rw-rw-r-- 1 lee lee  50472 Nov  6 10:52 8250_dw.o
-rw-rw-r-- 1 lee lee  16496 Nov  6 10:52 8250_early.o
-rw-rw-r-- 1 lee lee  49376 Nov  6 10:52 8250_exar.o
-rw-rw-r-- 1 lee lee  20256 Nov  6 10:52 8250_fintek.o
-rw-rw-r-- 1 lee lee  26976 Nov  6 10:52 8250_ingenic.o
-rw-rw-r-- 1 lee lee  18904 Nov  6 10:52 8250_lpc18xx.o
-rw-rw-r-- 1 lee lee  21712 Nov  6 10:52 8250_lpss.o
-rw-rw-r-- 1 lee lee  18768 Nov  6 10:52 8250_men_mcb.o
-rw-rw-r-- 1 lee lee  25880 Nov  6 10:52 8250_mid.o
-rw-rw-r-- 1 lee lee  30880 Nov  6 10:52 8250_of.o
-rw-rw-r-- 1 lee lee 142776 Nov  6 10:52 8250_pci.o
-rw-rw-r-- 1 lee lee  23240 Nov  6 10:52 8250_pnp.o
-rw-rw-r-- 1 lee lee 214088 Nov  6 10:52 8250_port.o
-rw-rw-r-- 1 lee lee  18992 Nov  6 10:52 8250_tegra.o
-rw-rw-r-- 1 lee lee  23736 Nov  6 10:52 8250_uniphier.o
-rw-rw-r-- 1 lee lee   1626 Nov  6 10:52 built-in.a
-rw-rw-r-- 1 lee lee      0 Nov  6 10:52 modules.order
-rw-rw-r-- 1 lee lee  94280 Nov  6 10:52 serial_cs.o

# THE BUILD

 locally noclean x86 w1 drivers/tty debug
 
 Running locally
 
 ********************
 * Building for X86 *
 ********************
 
 rm -rf ../builds/build-x86/drivers/tty/
 
 make -f Makefile -j24 KBUILD_OUTPUT=../builds/build-x86 allyesconfig
 make -f Makefile -j24 KBUILD_OUTPUT=../builds/build-x86  W=1  drivers/tty/
 
 make[1]: Entering directory '/home/lee/projects/linux/builds/build-x86'
   SYNC    include/config/auto.conf.cmd
   GEN     Makefile
   GEN     Makefile
   DESCEND  objtool
   CALL    scripts/atomic/check-atomics.sh
   CALL    scripts/checksyscalls.sh
   CC      drivers/tty/tty_io.o
   CC      drivers/tty/n_tty.o
   CC      drivers/tty/tty_ioctl.o
   CC      drivers/tty/tty_ldisc.o
   CC      drivers/tty/tty_buffer.o
   CC      drivers/tty/tty_port.o
   CC      drivers/tty/vt/vt_ioctl.o
   CC      drivers/tty/tty_mutex.o
   CC      drivers/tty/hvc/hvc_console.o
   CC      drivers/tty/vt/selection.o
   CC      drivers/tty/vt/vc_screen.o
   CC      drivers/tty/hvc/hvc_irq.o
   CC      drivers/tty/ipwireless/hardware.o
   CC      drivers/tty/serdev/core.o
   CC      drivers/tty/tty_ldsem.o
   CC      drivers/tty/vt/keyboard.o
   CC      drivers/tty/serdev/serdev-ttyport.o
   CC      drivers/tty/hvc/hvc_xen.o
   CC      drivers/tty/tty_baudrate.o
   CC      drivers/tty/ipwireless/main.o
   CC      drivers/tty/serial/serial_core.o
   CC      drivers/tty/serial/8250/8250_core.o
   CC      drivers/tty/serial/8250/8250_pnp.o
   CC      drivers/tty/serial/jsm/jsm_driver.o
   CC      drivers/tty/ipwireless/network.o
   CC      drivers/tty/ipwireless/tty.o
   CC      drivers/tty/serial/8250/8250_port.o
   CC      drivers/tty/vt/consolemap.o
   CC      drivers/tty/serial/jsm/jsm_neo.o
   CC      drivers/tty/serial/8250/8250_dma.o
   HOSTCC  drivers/tty/vt/conmakehash
   CC      drivers/tty/tty_jobctrl.o
   CC      drivers/tty/n_null.o
   CC      drivers/tty/serial/8250/8250_dwlib.o
   CC      drivers/tty/vt/vt.o
   AR      drivers/tty/ipwireless/built-in.a
   CC      drivers/tty/serial/jsm/jsm_tty.o
   CC      drivers/tty/serial/jsm/jsm_cls.o
   CC      drivers/tty/serial/earlycon.o
   CC      drivers/tty/pty.o
   SHIPPED drivers/tty/vt/defkeymap.c
   CC      drivers/tty/tty_audit.o
   CC      drivers/tty/vt/defkeymap.o
   CONMK   drivers/tty/vt/consolemap_deftbl.c
   CC      drivers/tty/vt/consolemap_deftbl.o
   CC      drivers/tty/serial/clps711x.o
   CC      drivers/tty/serial/8250/8250_fintek.o
   AR      drivers/tty/serial/jsm/built-in.a
   AR      drivers/tty/hvc/built-in.a
   CC      drivers/tty/serial/bcm63xx_uart.o
   CC      drivers/tty/serial/8250/8250_pci.o
   CC      drivers/tty/serial/samsung_tty.o
   CC      drivers/tty/serial/8250/8250_exar.o
   CC      drivers/tty/serial/max3100.o
   CC      drivers/tty/serial/max310x.o
   CC      drivers/tty/serial/lpc32xx_hs.o
   AR      drivers/tty/serdev/built-in.a
   CC      drivers/tty/serial/8250/serial_cs.o
   CC      drivers/tty/serial/8250/8250_aspeed_vuart.o
   CC      drivers/tty/sysrq.o
   CC      drivers/tty/n_hdlc.o
   CC      drivers/tty/n_gsm.o
   CC      drivers/tty/n_tracerouter.o
   CC      drivers/tty/n_tracesink.o
   CC      drivers/tty/serial/8250/8250_bcm2835aux.o
   CC      drivers/tty/serial/sh-sci.o
   CC      drivers/tty/cyclades.o
   CC      drivers/tty/serial/imx.o
   CC      drivers/tty/serial/imx_earlycon.o
   CC      drivers/tty/serial/8250/8250_early.o
   CC      drivers/tty/serial/8250/8250_men_mcb.o
   CC      drivers/tty/isicom.o
   CC      drivers/tty/moxa.o
   CC      drivers/tty/serial/8250/8250_dw.o
   AR      drivers/tty/vt/built-in.a
   CC      drivers/tty/mxser.o
   CC      drivers/tty/serial/sccnxp.o
   CC      drivers/tty/serial/8250/8250_lpc18xx.o
   CC      drivers/tty/serial/sc16is7xx.o
   CC      drivers/tty/serial/8250/8250_uniphier.o
   CC      drivers/tty/serial/atmel_serial.o
   CC      drivers/tty/serial/uartlite.o
   CC      drivers/tty/serial/8250/8250_ingenic.o
   CC      drivers/tty/serial/qcom_geni_serial.o
   CC      drivers/tty/serial/8250/8250_lpss.o
   CC      drivers/tty/serial/8250/8250_mid.o
   CC      drivers/tty/nozomi.o
   CC      drivers/tty/ttynull.o
   CC      drivers/tty/rocket.o
   CC      drivers/tty/synclink_gt.o
   CC      drivers/tty/serial/8250/8250_tegra.o
   CC      drivers/tty/serial/8250/8250_of.o
   CC      drivers/tty/goldfish.o
   CC      drivers/tty/serial/altera_uart.o
   CC      drivers/tty/serial/st-asc.o
   CC      drivers/tty/serial/ucc_uart.o
   CC      drivers/tty/serial/timbuart.o
   CC      drivers/tty/serial/altera_jtaguart.o
   CC      drivers/tty/serial/ifx6x60.o
   CC      drivers/tty/serial/pch_uart.o
   CC      drivers/tty/serial/mxs-auart.o
   CC      drivers/tty/serial/lantiq.o
   AR      drivers/tty/serial/8250/built-in.a
   CC      drivers/tty/serial/xilinx_uartps.o
   CC      drivers/tty/serial/arc_uart.o
   CC      drivers/tty/serial/rp2.o
   CC      drivers/tty/serial/fsl_lpuart.o
   CC      drivers/tty/serial/fsl_linflexuart.o
   CC      drivers/tty/serial/digicolor-usart.o
   CC      drivers/tty/serial/men_z135_uart.o
   CC      drivers/tty/serial/sprd_serial.o
   CC      drivers/tty/serial/stm32-usart.o
   CC      drivers/tty/serial/mvebu-uart.o
   CC      drivers/tty/serial/mps2-uart.o
   CC      drivers/tty/serial/owl-uart.o
   CC      drivers/tty/serial/rda-uart.o
   CC      drivers/tty/serial/milbeaut_usio.o
   CC      drivers/tty/serial/sifive.o
   CC      drivers/tty/serial/serial_mctrl_gpio.o
   CC      drivers/tty/serial/kgdb_nmi.o
   CC      drivers/tty/serial/kgdboc.o
   AR      drivers/tty/serial/built-in.a
   AR      drivers/tty/built-in.a
 make[1]: Leaving directory '/home/lee/projects/linux/builds/build-x86'
 
 ******************************
 * Checking for SPARSE errors *
 ******************************
 
 make -f Makefile -j24 KBUILD_OUTPUT=../builds/build-x86 C=1 W=1  drivers/tty/
 
 make[1]: Entering directory '/home/lee/projects/linux/builds/build-x86'
   GEN     Makefile
   DESCEND  objtool
   CALL    scripts/atomic/check-atomics.sh
   CALL    scripts/checksyscalls.sh
 make[1]: Leaving directory '/home/lee/projects/linux/builds/build-x86'
 
 ******************************
 * Checking for SMATCH errors *
 *   TODO: stdout => stderr   *
 ******************************
 
 make -f Makefile -j24 KBUILD_OUTPUT=../builds/build-x86 C=1 CHECK='smatch --no-data -p=kernel' W=1  drivers/tty/
 
 make[1]: Entering directory '/home/lee/projects/linux/builds/build-x86'
   GEN     Makefile
   DESCEND  objtool
   CALL    scripts/atomic/check-atomics.sh
   CALL    scripts/checksyscalls.sh
 make[1]: Leaving directory '/home/lee/projects/linux/builds/build-x86'

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06 11:12               ` Lee Jones
@ 2020-11-06 11:19                 ` Jiri Slaby
  2020-11-06 14:47                   ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Jiri Slaby @ 2020-11-06 11:19 UTC (permalink / raw)
  To: Lee Jones, Greg Kroah-Hartman; +Cc: linux-kernel, Mike Hudson, linux-serial

On 06. 11. 20, 12:12, Lee Jones wrote:
> I cannot recreate the issue or work out why:
> 
> # THE OUTPUT
> #   *_port.o and *_early.o were both built
You have to _link_ to see linker errors ;).

Like make vmlinux


-- 
js

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
  2020-11-06 11:19                 ` Jiri Slaby
@ 2020-11-06 14:47                   ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-06 14:47 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: Greg Kroah-Hartman, linux-kernel, Mike Hudson, linux-serial

On Fri, 06 Nov 2020, Jiri Slaby wrote:

> On 06. 11. 20, 12:12, Lee Jones wrote:
> > I cannot recreate the issue or work out why:
> > 
> > # THE OUTPUT
> > #   *_port.o and *_early.o were both built

> You have to _link_ to see linker errors ;).
> 
> Like make vmlinux

The default make that I am using does link:

  make -f Makefile -j24 KBUILD_OUTPUT=../builds/build-x86
  
But I do see what's happening now (thanks for the nudge).

The issue is being masked because I'm specifying a specific directory
to build.  I would have hoped that it would at least link into a
subsystem type object file, but it looks as though it's only being
*-ar'ed into an archive.

It appears linking is only done once at the very end of the compile,
which is kind of frustrating for my use-case.

This confused me because I know that I'd received linking errors
before.  However this must have been for files compiled as modules
(these are linked on-the-fly) rather than built-ins, which are only
linked once everything else has finished.

Not sure how I'm going to fix this yet, since compiling everything is
very time consuming, but I'll work something out.

Thanks again.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override'
  2020-11-04 19:35 ` [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override' Lee Jones
@ 2020-11-16 10:55   ` Maarten Brock
  2020-11-16 12:38     ` Lee Jones
  0 siblings, 1 reply; 84+ messages in thread
From: Maarten Brock @ 2020-11-16 10:55 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Michal Simek, linux-serial

On 2020-11-04 20:35, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/tty/serial/xilinx_uartps.c:205: warning: Function parameter
> or member 'cts_override' not described in 'cdns_uart'
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: linux-serial@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/tty/serial/xilinx_uartps.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/xilinx_uartps.c
> b/drivers/tty/serial/xilinx_uartps.c
> index a9b1ee27183a7..a14c5d9964739 100644
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@ -192,6 +192,7 @@ MODULE_PARM_DESC(rx_timeout, "Rx timeout, 1-255");
>   * @baud:		Current baud rate
>   * @clk_rate_change_nb:	Notifier block for clock changes
>   * @quirks:		Flags for RXBS support.
> + * @cts_override:	Modem control state override
>   */
>  struct cdns_uart {
>  	struct uart_port	*port;

While you are at it, would you consider to also fix the indentation of 
the
cts_override flag at line 208?

Maarten


^ permalink raw reply	[flat|nested] 84+ messages in thread

* Re: [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override'
  2020-11-16 10:55   ` Maarten Brock
@ 2020-11-16 12:38     ` Lee Jones
  0 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-16 12:38 UTC (permalink / raw)
  To: Maarten Brock
  Cc: linux-kernel, Greg Kroah-Hartman, Jiri Slaby, Michal Simek, linux-serial

On Mon, 16 Nov 2020, Maarten Brock wrote:

> On 2020-11-04 20:35, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/tty/serial/xilinx_uartps.c:205: warning: Function parameter
> > or member 'cts_override' not described in 'cdns_uart'
> > 
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Jiri Slaby <jirislaby@kernel.org>
> > Cc: Michal Simek <michal.simek@xilinx.com>
> > Cc: linux-serial@vger.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  drivers/tty/serial/xilinx_uartps.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/tty/serial/xilinx_uartps.c
> > b/drivers/tty/serial/xilinx_uartps.c
> > index a9b1ee27183a7..a14c5d9964739 100644
> > --- a/drivers/tty/serial/xilinx_uartps.c
> > +++ b/drivers/tty/serial/xilinx_uartps.c
> > @@ -192,6 +192,7 @@ MODULE_PARM_DESC(rx_timeout, "Rx timeout, 1-255");
> >   * @baud:		Current baud rate
> >   * @clk_rate_change_nb:	Notifier block for clock changes
> >   * @quirks:		Flags for RXBS support.
> > + * @cts_override:	Modem control state override
> >   */
> >  struct cdns_uart {
> >  	struct uart_port	*port;
> 
> While you are at it, would you consider to also fix the indentation of the
> cts_override flag at line 208?

This set has already been merged sadly.

Please feel free to submit a patch of your own.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 84+ messages in thread

* [PATCH v2 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
  2020-11-04 19:35 ` [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location Lee Jones
  2020-11-04 23:36   ` Michael Ellerman
  2020-11-05  7:10   ` Christophe Leroy
@ 2020-11-26  9:36   ` Lee Jones
  2 siblings, 0 replies; 84+ messages in thread
From: Lee Jones @ 2020-11-26  9:36 UTC (permalink / raw)
  To: linux-kernel, Michael Ellerman, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev

Fixes the following W=1 kernel build warning(s):

 drivers/tty/hvc/hvc_vio.c:385:13: warning: no previous prototype for ‘hvc_vio_init_early’ [-Wmissing-prototypes]
 385 | void __init hvc_vio_init_early(void)
 | ^~~~~~~~~~~~~~~~~~

Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
---

v2:
- Removed 'extern' keyword

 arch/powerpc/include/asm/hvconsole.h     | 3 +++
 arch/powerpc/platforms/pseries/pseries.h | 3 ---
 arch/powerpc/platforms/pseries/setup.c   | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/include/asm/hvconsole.h b/arch/powerpc/include/asm/hvconsole.h
index 999ed5ac90531..ccb2034506f0f 100644
--- a/arch/powerpc/include/asm/hvconsole.h
+++ b/arch/powerpc/include/asm/hvconsole.h
@@ -24,5 +24,8 @@
 extern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
 extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
 
+/* Provided by HVC VIO */
+void hvc_vio_init_early(void);
+
 #endif /* __KERNEL__ */
 #endif /* _PPC64_HVCONSOLE_H */
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 593840847cd3d..693f58d784b5b 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -43,9 +43,6 @@ extern void pSeries_final_fixup(void);
 /* Poweron flag used for enabling auto ups restart */
 extern unsigned long rtas_poweron_auto;
 
-/* Provided by HVC VIO */
-extern void hvc_vio_init_early(void);
-
 /* Dynamic logical Partitioning/Mobility */
 extern void dlpar_free_cc_nodes(struct device_node *);
 extern void dlpar_free_cc_property(struct property *);
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 090c13f6c8815..b5513eefd12c9 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -71,6 +71,7 @@
 #include <asm/swiotlb.h>
 #include <asm/svm.h>
 #include <asm/dtl.h>
+#include <asm/hvconsole.h>
 
 #include "pseries.h"
 #include "../../../../drivers/pci/pci.h"
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 84+ messages in thread

end of thread, other threads:[~2020-11-26  9:36 UTC | newest]

Thread overview: 84+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
2020-11-04 19:35 ` [PATCH 01/36] tty: serdev: core: Remove unused variable 'dummy' Lee Jones
2020-11-04 19:35 ` [PATCH 02/36] tty: serdev: core: Provide missing description for 'owner' Lee Jones
2020-11-04 19:35 ` [PATCH 03/36] tty: tty_baudrate: Add missing description for 'tty' Lee Jones
2020-11-04 19:35 ` [PATCH 04/36] tty: tty_io: Move 'tty_sysctl_init's prototype to shared space Lee Jones
2020-11-04 19:35 ` [PATCH 05/36] tty: tty_buffer: Add missing description for 'limit' Lee Jones
2020-11-04 19:35 ` [PATCH 06/36] tty: tty_port: Demote obvious abuse of kernel-doc formatting Lee Jones
2020-11-04 19:35 ` [PATCH 07/36] tty: tty_jobctrl: Add missing function parameter descriptions Lee Jones
2020-11-04 19:35 ` [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours Lee Jones
2020-11-05  8:12   ` Jiri Slaby
2020-11-05  8:54     ` Lee Jones
2020-11-05  8:56       ` Lee Jones
2020-11-04 19:35 ` [PATCH 09/36] tty: vt: consolemap: Demote weakly documented function header Lee Jones
2020-11-04 19:35 ` [PATCH 10/36] tty: n_tty: Add 2 missing parameter descriptions Lee Jones
2020-11-04 19:35 ` [PATCH 11/36] tty: serial: jsm: jsm_cls: Remove unused variable 'discard' Lee Jones
2020-11-04 19:35 ` [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues Lee Jones
2020-11-05  8:16   ` Jiri Slaby
2020-11-05  8:53     ` Lee Jones
2020-11-05  9:14       ` Jiri Slaby
2020-11-04 19:35 ` [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers Lee Jones
2020-11-06  9:53   ` Greg Kroah-Hartman
2020-11-06 10:05     ` Lee Jones
2020-11-06 10:16       ` Lee Jones
2020-11-06 10:39         ` Greg Kroah-Hartman
2020-11-06 10:48           ` Lee Jones
2020-11-06 10:55             ` Greg Kroah-Hartman
2020-11-06 11:12               ` Lee Jones
2020-11-06 11:19                 ` Jiri Slaby
2020-11-06 14:47                   ` Lee Jones
2020-11-06 10:20       ` Greg Kroah-Hartman
2020-11-06 10:47         ` Lee Jones
2020-11-04 19:35 ` [PATCH 14/36] tty: serial: 8250: serial_cs: Remove unused/unchecked variable 'err' Lee Jones
2020-11-04 19:35 ` [PATCH 15/36] tty: tty_audit: Demote non-conformant kernel-doc headers Lee Jones
2020-11-04 19:35 ` [PATCH 16/36] tty: pty: Provide descriptions for the 'file' parameters Lee Jones
2020-11-04 19:35 ` [PATCH 17/36] tty: serial: amba-pl011: Mark 'sbsa_uart_acpi_match' as __maybe_unused Lee Jones
2020-11-04 19:35 ` [PATCH 18/36] tty: n_gsm: Demote obvious abuse of kernel-doc and supply other missing docss Lee Jones
2020-11-04 19:35 ` [PATCH 19/36] tty: serial: lpc32xx_hs: Remove unused variable 'tmp' Lee Jones
2020-11-04 20:04   ` Vladimir Zapolskiy
2020-11-04 19:35 ` [PATCH 20/36] tty: serial: msm_serial: Remove set but unused variable 'status' Lee Jones
2020-11-05 16:09   ` Jeffrey Hugo
2020-11-04 19:35 ` [PATCH 21/36] tty: serial: ifx6x60: Fix function documentation headers Lee Jones
2020-11-04 19:35 ` [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override' Lee Jones
2020-11-16 10:55   ` Maarten Brock
2020-11-16 12:38     ` Lee Jones
2020-11-04 19:35 ` [PATCH 23/36] tty: synclink_gt: Demote one kernel-doc header and repair another Lee Jones
2020-11-04 19:35 ` [PATCH 24/36] tty: serial: serial-tegra: Struct headers should start with 'struct <name>' Lee Jones
2020-11-04 19:35 ` [PATCH 25/36] tty: serial: sifive: " Lee Jones
2020-11-06  8:11   ` Palmer Dabbelt
2020-11-04 19:35 ` [PATCH 26/36] tty: synclinkmp: Add missing description for function param 'txqueue' Lee Jones
2020-11-04 19:35 ` [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused Lee Jones
2020-11-05  8:28   ` Jiri Slaby
2020-11-05  8:43     ` Lee Jones
2020-11-05  9:10       ` Jiri Slaby
2020-11-05  9:39         ` Paul Fulghum
2020-11-05  9:55           ` Greg Kroah-Hartman
2020-11-05 10:05             ` Lee Jones
2020-11-05 10:54           ` Jiri Slaby
2020-11-05 11:04         ` David Laight
2020-11-05 11:27           ` Lee Jones
     [not found]             ` <54D08301-C89F-4AEB-B9A0-6CED6D5EEDA6@microgate.com>
2020-11-05 17:04               ` Paul Fulghum
2020-11-05 18:05                 ` Lee Jones
2020-11-05 16:41           ` Jiri Slaby
2020-11-04 19:35 ` [PATCH 28/36] tty: serial: stm32-usart: Remove set but unused 'cookie' variables Lee Jones
2020-11-04 19:35 ` [PATCH 29/36] tty: tty_ldisc: Supply missing description for 'tty_ldisc_get's 'tty' param Lee Jones
2020-11-04 19:35 ` [PATCH 30/36] tty: serial: serial-tegra: Provide some missing struct member descriptions Lee Jones
2020-11-04 19:35 ` [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location Lee Jones
2020-11-04 23:36   ` Michael Ellerman
2020-11-05  8:39     ` Lee Jones
2020-11-05  7:10   ` Christophe Leroy
2020-11-05  8:38     ` Lee Jones
2020-11-26  9:36   ` [PATCH v2 " Lee Jones
2020-11-04 19:35 ` [PATCH 32/36] tty: hvc: hvc_vio: Staticify function invoked only by reference Lee Jones
2020-11-04 19:35 ` [PATCH 33/36] tty: hvc: hvc_opal: Staticify function invoked " Lee Jones
2020-11-04 19:35 ` [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused Lee Jones
2020-11-05  7:04   ` Christophe Leroy
2020-11-05  7:39     ` Jiri Slaby
2020-11-05  8:36       ` Lee Jones
2020-11-05  8:55         ` Jiri Slaby
2020-11-05  9:00           ` Lee Jones
2020-11-04 19:35 ` [PATCH 35/36] tty: synclink: Mark disposable variables as __always_unused Lee Jones
2020-11-05  8:35   ` Jiri Slaby
2020-11-05  9:00     ` Lee Jones
2020-11-04 19:35 ` [PATCH 36/36] tty: synclink: Provide missing description for 'hdlcdev_tx_timeout's 'txqueue' param Lee Jones
2020-11-06  9:54 ` [PATCH 00/36] Rid W=1 issues from TTY Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).