* [PATCH v2 0/4] Rid W=1 issues from TTY
@ 2020-11-12 10:58 Lee Jones
2020-11-12 10:58 ` [PATCH v2 1/4] tty: tty_ldisc: Fix some kernel-doc related misdemeanours Lee Jones
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Lee Jones @ 2020-11-12 10:58 UTC (permalink / raw)
To: lee.jones
Cc: linux-kernel, Benjamin Herrenschmidt, Greg Kroah-Hartman,
Jiri Slaby, linuxppc-dev, linux-serial, Michael Ellerman,
Mike Hudson, Paul Mackerras
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.
v2:
- Remove unused variable completely
- Remove unnecessary 'extern' keyword
Lee Jones (4):
tty: tty_ldisc: Fix some kernel-doc related misdemeanours
tty: serial: 8250: 8250_port: Move prototypes to shared location
powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to
shared location
tty: serial: pmac_zilog: Remove unused disposable variable 'garbage'
arch/powerpc/include/asm/hvconsole.h | 3 +++
arch/powerpc/platforms/pseries/pseries.h | 3 ---
arch/powerpc/platforms/pseries/setup.c | 1 +
drivers/tty/serial/8250/8250_early.c | 3 ---
drivers/tty/serial/pmac_zilog.h | 8 ++++----
drivers/tty/tty_ldisc.c | 10 +++++-----
include/linux/serial_8250.h | 5 +++++
7 files changed, 18 insertions(+), 15 deletions(-)
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-serial@vger.kernel.org
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Mike Hudson <Exoray@isys.ca>
Cc: Paul Mackerras <paulus@samba.org>
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/4] tty: tty_ldisc: Fix some kernel-doc related misdemeanours
2020-11-12 10:58 [PATCH v2 0/4] Rid W=1 issues from TTY Lee Jones
@ 2020-11-12 10:58 ` Lee Jones
2020-11-12 10:58 ` [PATCH v2 2/4] tty: serial: 8250: 8250_port: Move prototypes to shared location Lee Jones
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2020-11-12 10:58 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 e813808b27a7f..1ba74d6f5e5cd 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
* @tty: tty device
@@ -156,8 +157,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;
@@ -191,7 +190,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().
@@ -251,12 +250,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.
*/
@@ -702,6 +701,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] 5+ messages in thread
* [PATCH v2 2/4] tty: serial: 8250: 8250_port: Move prototypes to shared location
2020-11-12 10:58 [PATCH v2 0/4] Rid W=1 issues from TTY Lee Jones
2020-11-12 10:58 ` [PATCH v2 1/4] tty: tty_ldisc: Fix some kernel-doc related misdemeanours Lee Jones
@ 2020-11-12 10:58 ` Lee Jones
2020-11-12 10:58 ` [PATCH v2 3/4] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype " Lee Jones
2020-11-12 10:58 ` [PATCH v2 4/4] tty: serial: pmac_zilog: Remove unused disposable variable 'garbage' Lee Jones
3 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2020-11-12 10:58 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_early.c | 3 ---
include/linux/serial_8250.h | 5 +++++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index 70d7826788f53..c171ce6db6910 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -204,9 +204,6 @@ OF_EARLYCON_DECLARE(omap8250, "ti,omap4-uart", early_omap8250_setup);
#ifdef CONFIG_SERIAL_8250_RT288X
-unsigned int au_serial_in(struct uart_port *p, int offset);
-void au_serial_out(struct uart_port *p, int offset, int value);
-
static int __init early_au_setup(struct earlycon_device *dev, const char *opt)
{
dev->port.serial_in = au_serial_in;
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index 2b70f736b091d..9e655055112d9 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -187,4 +187,9 @@ extern void serial8250_set_isa_configurator(void (*v)
(int port, struct uart_port *up,
u32 *capabilities));
+#ifdef CONFIG_SERIAL_8250_RT288X
+unsigned int au_serial_in(struct uart_port *p, int offset);
+void au_serial_out(struct uart_port *p, int offset, int value);
+#endif
+
#endif
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/4] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
2020-11-12 10:58 [PATCH v2 0/4] Rid W=1 issues from TTY Lee Jones
2020-11-12 10:58 ` [PATCH v2 1/4] tty: tty_ldisc: Fix some kernel-doc related misdemeanours Lee Jones
2020-11-12 10:58 ` [PATCH v2 2/4] tty: serial: 8250: 8250_port: Move prototypes to shared location Lee Jones
@ 2020-11-12 10:58 ` Lee Jones
2020-11-12 10:58 ` [PATCH v2 4/4] tty: serial: pmac_zilog: Remove unused disposable variable 'garbage' Lee Jones
3 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2020-11-12 10:58 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>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
---
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 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] 5+ messages in thread
* [PATCH v2 4/4] tty: serial: pmac_zilog: Remove unused disposable variable 'garbage'
2020-11-12 10:58 [PATCH v2 0/4] Rid W=1 issues from TTY Lee Jones
` (2 preceding siblings ...)
2020-11-12 10:58 ` [PATCH v2 3/4] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype " Lee Jones
@ 2020-11-12 10:58 ` Lee Jones
3 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2020-11-12 10:58 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 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/pmac_zilog.h b/drivers/tty/serial/pmac_zilog.h
index bb874e76810e0..fa85b0de5c2fd 100644
--- a/drivers/tty/serial/pmac_zilog.h
+++ b/drivers/tty/serial/pmac_zilog.h
@@ -362,10 +362,10 @@ 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; \
- garbage = read_zsdata(port); \
- garbage = read_zsdata(port); \
- garbage = read_zsdata(port); \
+#define ZS_CLEARFIFO(port) do { \
+ read_zsdata(port); \
+ read_zsdata(port); \
+ read_zsdata(port); \
} while(0)
#define ZS_IS_CONS(UP) ((UP)->flags & PMACZILOG_FLAG_IS_CONS)
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-12 11:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 10:58 [PATCH v2 0/4] Rid W=1 issues from TTY Lee Jones
2020-11-12 10:58 ` [PATCH v2 1/4] tty: tty_ldisc: Fix some kernel-doc related misdemeanours Lee Jones
2020-11-12 10:58 ` [PATCH v2 2/4] tty: serial: 8250: 8250_port: Move prototypes to shared location Lee Jones
2020-11-12 10:58 ` [PATCH v2 3/4] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype " Lee Jones
2020-11-12 10:58 ` [PATCH v2 4/4] tty: serial: pmac_zilog: Remove unused disposable variable 'garbage' Lee Jones
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).