* [PATCH 00/36] Rid W=1 issues from TTY
@ 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
` (4 more replies)
0 siblings, 5 replies; 16+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
To: lee.jones
Cc: Robert Love, Nick Holloway, Russ Gorby, C. Scott Ananian, --,
Andrew Morton, Laxman Dewangan, Paul Mackerras, David A. Hinds,
linux-riscv, Jiri Slaby, linux-stm32, Bill Hawes, Roland Stigge,
Rob Herring, Russell King, Michal Simek, Jonathan Hunter,
Jan Dumon, Andy Gross, linux-serial, Sylvain Lemieux,
Gerald Baeza, Sumit Semwal, Marko Kohtala, linux-media,
Philipp Zabel, Alexandre Torgue, linux-arm-msm,
Vladimir Zapolskiy, linaro-mm-sig, Stanislav Voronyi, dri-devel,
Paul Walmsley, linux-tegra, Bjorn Andersson, Andrew J. Kroll,
processes-Sapan Bhatia, Kevin Wells, Miloslav Trmac, Mike Hudson,
Joseph Barrow, linux-kernel, paulkf, Filip Aben, Palmer Dabbelt,
Maxime Coquelin, Greg Kroah-Hartman, Thierry Reding,
Colin Ian King, Jakub Jelinek, linuxppc-dev,
Christian König, Russell King
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] 16+ 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
@ 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
` (3 subsequent siblings)
4 siblings, 3 replies; 16+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
To: lee.jones; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
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] 16+ 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
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
` (2 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
To: lee.jones; +Cc: Greg Kroah-Hartman, linuxppc-dev, Jiri Slaby, linux-kernel
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] 16+ 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
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 ` [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
2020-11-06 9:54 ` [PATCH 00/36] Rid W=1 issues from TTY Greg Kroah-Hartman
4 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
To: lee.jones
Cc: linuxppc-dev, linux-kernel, Paul Mackerras, Greg Kroah-Hartman,
Jiri Slaby
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] 16+ 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
` (2 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-06 9:54 ` [PATCH 00/36] Rid W=1 issues from TTY Greg Kroah-Hartman
4 siblings, 1 reply; 16+ messages in thread
From: Lee Jones @ 2020-11-04 19:35 UTC (permalink / raw)
To: lee.jones
Cc: Greg Kroah-Hartman, linuxppc-dev, linux-kernel, Paul Mackerras,
linux-serial, Jiri Slaby
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] 16+ 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; 16+ messages in thread
From: Michael Ellerman @ 2020-11-04 23:36 UTC (permalink / raw)
To: Lee Jones, lee.jones; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
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] 16+ 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; 16+ 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] 16+ 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; 16+ messages in thread
From: Christophe Leroy @ 2020-11-05 7:10 UTC (permalink / raw)
To: Lee Jones; +Cc: Paul Mackerras, linuxppc-dev, 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] 16+ 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; 16+ 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] 16+ 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; 16+ messages in thread
From: Lee Jones @ 2020-11-05 8:36 UTC (permalink / raw)
To: Jiri Slaby
Cc: Greg Kroah-Hartman, linux-kernel, Paul Mackerras, linux-serial,
linuxppc-dev
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] 16+ 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; 16+ messages in thread
From: Lee Jones @ 2020-11-05 8:38 UTC (permalink / raw)
To: Christophe Leroy; +Cc: Paul Mackerras, linuxppc-dev, 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] 16+ 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; 16+ messages in thread
From: Lee Jones @ 2020-11-05 8:39 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
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] 16+ 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; 16+ messages in thread
From: Jiri Slaby @ 2020-11-05 8:55 UTC (permalink / raw)
To: Lee Jones
Cc: Greg Kroah-Hartman, linux-kernel, Paul Mackerras, linux-serial,
linuxppc-dev
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] 16+ 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; 16+ messages in thread
From: Lee Jones @ 2020-11-05 9:00 UTC (permalink / raw)
To: Jiri Slaby
Cc: Greg Kroah-Hartman, linux-kernel, Paul Mackerras, linux-serial,
linuxppc-dev
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] 16+ 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
` (3 preceding siblings ...)
2020-11-04 19:35 ` [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused Lee Jones
@ 2020-11-06 9:54 ` Greg Kroah-Hartman
4 siblings, 0 replies; 16+ messages in thread
From: Greg Kroah-Hartman @ 2020-11-06 9:54 UTC (permalink / raw)
To: Lee Jones
Cc: Robert Love, Nick Holloway, Russ Gorby, Kevin Wells, --,
Andrew Morton, Laxman Dewangan, Paul Mackerras, David A. Hinds,
linux-riscv, Jiri Slaby, linux-stm32, Bill Hawes, Roland Stigge,
Rob Herring, Russell King, Michal Simek, Jonathan Hunter,
Jan Dumon, Andy Gross, linux-serial, Sylvain Lemieux,
Gerald Baeza, Sumit Semwal, Marko Kohtala, linux-media,
Philipp Zabel, Alexandre Torgue, linux-arm-msm,
Vladimir Zapolskiy, linaro-mm-sig, Stanislav Voronyi,
C. Scott Ananian, Paul Walmsley, linux-tegra, Bjorn Andersson,
Andrew J. Kroll, processes-Sapan Bhatia, Miloslav Trmac,
Mike Hudson, Joseph Barrow, dri-devel, linux-kernel, paulkf,
Filip Aben, Palmer Dabbelt, Maxime Coquelin, Thierry Reding,
Colin Ian King, Jakub Jelinek, linuxppc-dev,
Christian König, Russell King
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] 16+ 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; 16+ 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] 16+ messages in thread
end of thread, other threads:[~2020-11-26 9:39 UTC | newest]
Thread overview: 16+ 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 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-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).