Rid W=1 issues from TTY
Subsystems (15)
cover Rid W=1 issues from TTY
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(-)
Signature · 1 line
2.25.1
PATCH 1/36 tty: serdev: core: Remove unused variable 'dummy'
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]
--- drivers/tty/serdev/core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/tty/serdev/core.c +1 -4
@@ -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); }
Signature · 1 line
2.25.1
PATCH 2/36 tty: serdev: core: Provide missing description for 'owner'
In reply to Lee JonesFixes 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'
--- drivers/tty/serdev/core.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serdev/core.c +1 -0
@@ -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.
Signature · 1 line
2.25.1
PATCH 3/36 tty: tty_baudrate: Add missing description for 'tty'
In reply to Lee JonesFixes 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'
--- drivers/tty/tty_baudrate.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/tty_baudrate.c +1 -0
@@ -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 *
Signature · 1 line
2.25.1
PATCH 4/36 tty: tty_io: Move 'tty_sysctl_init's prototype to shared space
In reply to Lee JonesFixes 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)
| ^~~~~~~~~~~~~~~
--- drivers/tty/tty_io.c | 2 -- include/linux/tty.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/tty/tty_io.c +0 -2
@@ -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
include/linux/tty.h +1 -0
@@ -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);
Signature · 1 line
2.25.1
PATCH 5/36 tty: tty_buffer: Add missing description for 'limit'
In reply to Lee JonesFixes 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'
--- drivers/tty/tty_buffer.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/tty_buffer.c +1 -0
@@ -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.
Signature · 1 line
2.25.1
PATCH 6/36 tty: tty_port: Demote obvious abuse of kernel-doc formatting
In reply to Lee JonesFixes 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'
--- drivers/tty/tty_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/tty_port.c +2 -2
@@ -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.
Signature · 1 line
2.25.1
PATCH 7/36 tty: tty_jobctrl: Add missing function parameter descriptions
In reply to Lee JonesFixes 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'
--- drivers/tty/tty_jobctrl.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/tty/tty_jobctrl.c +3 -0
@@ -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
Signature · 1 line
2.25.1
PATCH 8/36 tty: tty_ldisc: Fix some kernel-doc related misdemeanours
In reply to Lee Jones - 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'
--- drivers/tty/tty_ldisc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/tty/tty_ldisc.c +5 -5
@@ -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
Signature · 1 line
2.25.1
Jiri Slaby
maintainerRe: [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours
Quoted 24 lines · Lee Jones
- 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: 'inttty_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 <[email protected]>Cc Jiri Slaby <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/tty_ldisc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/tty/tty_ldisc.c +0
-0
drivers/tty/tty_ldisc.c static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc) · line 193
Quoted 6 lines
drivers/tty/tty_ldisc.c +1
-1@@ -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,
Signature · 2 lines
js suse labs
Re: [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours
Quoted 20 lines · Jiri Slaby
Quoted 19 lines · Lee Jones
- 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: 'inttty_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 <[email protected]>Cc Jiri Slaby <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/tty_ldisc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Quoted 13 lines
drivers/tty/tty_ldisc.c static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc) · line 192
Quoted 10 lines
drivers/tty/tty_ldisc.c +1
-1@@ -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_getin kernel-doc, whiletty_ldisc_putnot doesn't make much sense. What's missing totty_ldisc_putto conform to kernel-doc?
Where are they in kernel-doc? I don't see any references.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 08/36] tty: tty_ldisc: Fix some kernel-doc related misdemeanours
Quoted 36 lines · Lee Jones
Quoted 20 lines · Jiri Slaby
Quoted 19 lines · Lee Jones
- 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: 'inttty_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 <[email protected]>Cc Jiri Slaby <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/tty_ldisc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)Quoted 13 lines
drivers/tty/tty_ldisc.c static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc) · line 192
Quoted 10 lines
drivers/tty/tty_ldisc.c +1
-1@@ -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_getin kernel-doc, whiletty_ldisc_putnot doesn't make much sense. What's missing totty_ldisc_putto conform to kernel-doc?
Quoted 1 line
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
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 9/36 tty: vt: consolemap: Demote weakly documented function header
In reply to Lee JonesFixes 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'
--- drivers/tty/vt/consolemap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/vt/consolemap.c +1 -2
@@ -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.
Signature · 1 line
2.25.1
PATCH 10/36 tty: n_tty: Add 2 missing parameter descriptions
In reply to Lee JonesFixes 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'
--- drivers/tty/n_tty.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/n_tty.c +2 -0
@@ -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
Signature · 1 line
2.25.1
PATCH 11/36 tty: serial: jsm: jsm_cls: Remove unused variable 'discard'
In reply to Lee JonesFixes 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]
--- drivers/tty/serial/jsm/jsm_cls.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/jsm/jsm_cls.c +1 -3
@@ -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 ; }
Signature · 1 line
2.25.1
PATCH 12/36 tty: tty_io: Fix some kernel-doc issues
In reply to Lee JonesDemote 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'
--- drivers/tty/tty_io.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/tty/tty_io.c +7 -3
@@ -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.
Signature · 1 line
2.25.1
Jiri Slaby
maintainerRe: [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues
Quoted 33 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Cc Nick Holloway <[email protected]>Cc -- <[email protected]>Cc Marko Kohtala <[email protected]>Cc Bill Hawes <[email protected]>Cc "C. Scott Ananian" <[email protected]>Cc Russell King <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/tty_io.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/tty/tty_io.c +0
-0
drivers/tty/tty_io.c static struct device *tty_get_device(struct tty_struct *tty) · line 2971
Quoted 8 lines
drivers/tty/tty_io.c +1
-1@@ -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,
Signature · 2 lines
js suse labs
Re: [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues
Quoted 29 lines · Jiri Slaby
Quoted 28 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Cc Nick Holloway <[email protected]>Cc -- <[email protected]>Cc Marko Kohtala <[email protected]>Cc Bill Hawes <[email protected]>Cc "C. Scott Ananian" <[email protected]>Cc Russell King <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/tty_io.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Quoted 14 lines
drivers/tty/tty_io.c static struct device *tty_get_device(struct tty_struct *tty) · line 2969
Quoted 11 lines
drivers/tty/tty_io.c +1
-1@@ -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.
Quoted 2 lines
For example,
alloc_tty_structis 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
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Jiri Slaby
maintainerRe: [PATCH 12/36] tty: tty_io: Fix some kernel-doc issues
Quoted 9 lines · Lee Jones
Quoted 2 lines
For example,
alloc_tty_structis 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.
Signature · 2 lines
js suse labs
PATCH 13/36 tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
In reply to Lee JonesFixes 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]
--- drivers/tty/serial/8250/8250_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/8250/8250_port.c +2 -2
@@ -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 ;
Signature · 1 line
2.25.1
kernel test robot
build botRe: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
I love your patch! Yet something to improve:
Hi Lee,
I love your patch! Yet something to improve:
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on powerpc/next v5.10-rc2 next-20201104] [cannot apply to tegra/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Lee-Jones/Rid-W-1-issues-from-TTY/20201105-034119 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing config: arm-tango4_defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/da6a4f2e574eae4d2923eaa4cd186657f45d495e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lee-Jones/Rid-W-1-issues-from-TTY/20201105-034119 git checkout da6a4f2e574eae4d2923eaa4cd186657f45d495e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
arm-linux-gnueabi-ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
8250_early.c:(.init.text+0x4): undefined reference to `au_serial_in'
arm-linux-gnueabi-ld: 8250_early.c:(.init.text+0x8): undefined reference to `au_serial_out'
>> arm-linux-gnueabi-ld: 8250_early.c:(.init.text+0xc): undefined reference to `au_serial_in'
arm-linux-gnueabi-ld: 8250_early.c:(.init.text+0x10): undefined reference to `au_serial_out'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kernel test robot
build botRe: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
In reply to Lee JonesI love your patch! Yet something to improve:
Hi Lee,
I love your patch! Yet something to improve:
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on powerpc/next v5.10-rc2 next-20201104] [cannot apply to tegra/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Lee-Jones/Rid-W-1-issues-from-TTY/20201105-034119 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing config: mips-db1xxx_defconfig (attached as .config) compiler: mipsel-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/da6a4f2e574eae4d2923eaa4cd186657f45d495e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lee-Jones/Rid-W-1-issues-from-TTY/20201105-034119 git checkout da6a4f2e574eae4d2923eaa4cd186657f45d495e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
mipsel-linux-ld: drivers/tty/serial/8250/8250_early.o: in function `early_au_setup':
8250_early.c:(.init.text+0x0): undefined reference to `au_serial_in'
>> mipsel-linux-ld: 8250_early.c:(.init.text+0x4): undefined reference to `au_serial_in' >> mipsel-linux-ld: 8250_early.c:(.init.text+0xc): undefined reference to `au_serial_out'
mipsel-linux-ld: 8250_early.c:(.init.text+0x14): undefined reference to `au_serial_out'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Greg Kroah-Hartman
maintainerRe: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
In reply to Lee JonesQuoted 5 lines · Lee Jones
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]
Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Mike Hudson <[email protected]>Signed-off-by Lee Jones <[email protected]>--- 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
Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
Quoted 15 lines · Greg Kroah-Hartman
Quoted 5 lines · Lee Jones
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]Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Mike Hudson <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/8250/8250_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 7 lines
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 1Always test-build your patches, perhaps W=1 was wrong here...
I *always* test build my sets before posting.
/investigating
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
Quoted 24 lines · Lee Jones
Quoted 15 lines · Greg Kroah-Hartman
Quoted 5 lines · Lee Jones
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]Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Mike Hudson <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/8250/8250_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Quoted 6 lines
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
Quoted 3 lines
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).
Quoted 1 line
Quoted 1 line
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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Greg Kroah-Hartman
maintainerRe: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
Quoted 28 lines · Lee Jones
Quoted 26 lines · Lee Jones
Quoted 15 lines · Greg Kroah-Hartman
Quoted 5 lines · Lee Jones
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]Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Mike Hudson <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/8250/8250_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Quoted 6 lines
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 1I *always* test build my sets before posting.
Quoted 7 lines
Quoted 1 line
/investigating
What config failed for you?
It looks as though
SERIAL_8250_CONSOLEis 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=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=yCONFIG_SERIAL_8250_PNP=yCONFIG_SERIAL_8250_16550A_VARIANTS=yCONFIG_SERIAL_8250_FINTEK=yCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_DMA=yCONFIG_SERIAL_8250_PCI=yCONFIG_SERIAL_8250_EXAR=yCONFIG_SERIAL_8250_NR_UARTS=16CONFIG_SERIAL_8250_RUNTIME_UARTS=8CONFIG_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 setCONFIG_SERIAL_8250_DWLIB=yCONFIG_SERIAL_8250_DW=mCONFIG_SERIAL_8250_RT288X=yCONFIG_SERIAL_8250_UNIPHIER=mCONFIG_SERIAL_8250_LPSS=yCONFIG_SERIAL_8250_MID=yCONFIG_SERIAL_8250_TEGRA=m
Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
Quoted 55 lines · Greg Kroah-Hartman
Quoted 28 lines · Lee Jones
Quoted 26 lines · Lee Jones
Quoted 15 lines · Greg Kroah-Hartman
Quoted 5 lines · Lee Jones
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]Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Mike Hudson <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/8250/8250_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Quoted 6 lines
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 1I *always* test build my sets before posting.
Quoted 7 lines
Quoted 1 line
/investigating
What config failed for you?
It looks as though
SERIAL_8250_CONSOLEis 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=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=yCONFIG_SERIAL_8250_PNP=yCONFIG_SERIAL_8250_16550A_VARIANTS=yCONFIG_SERIAL_8250_FINTEK=yCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_DMA=yCONFIG_SERIAL_8250_PCI=yCONFIG_SERIAL_8250_EXAR=yCONFIG_SERIAL_8250_NR_UARTS=16CONFIG_SERIAL_8250_RUNTIME_UARTS=8CONFIG_SERIAL_8250_EXTENDED=y
#CONFIG_SERIAL_8250_MANY_PORTSis not set
#CONFIG_SERIAL_8250_SHARE_IRQis not set
#CONFIG_SERIAL_8250_DETECT_IRQis not set
Quoted 8 lines
#
CONFIG_SERIAL_8250_RSAis not setCONFIG_SERIAL_8250_DWLIB=yCONFIG_SERIAL_8250_DW=mCONFIG_SERIAL_8250_RT288X=yCONFIG_SERIAL_8250_UNIPHIER=mCONFIG_SERIAL_8250_LPSS=yCONFIG_SERIAL_8250_MID=yCONFIG_SERIAL_8250_TEGRA=m
Is that from the default defconfig? Or something bespoke?
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Greg Kroah-Hartman
maintainerRe: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
Quoted 66 lines · Lee Jones
Quoted 55 lines · Greg Kroah-Hartman
Quoted 28 lines · Lee Jones
Quoted 26 lines · Lee Jones
Quoted 15 lines · Greg Kroah-Hartman
Quoted 5 lines · Lee Jones
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]Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Mike Hudson <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/8250/8250_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Quoted 6 lines
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 1I *always* test build my sets before posting.
Quoted 7 lines
Quoted 1 line
/investigating
What config failed for you?
It looks as though
SERIAL_8250_CONSOLEis 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=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=yCONFIG_SERIAL_8250_PNP=yCONFIG_SERIAL_8250_16550A_VARIANTS=yCONFIG_SERIAL_8250_FINTEK=yCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_DMA=yCONFIG_SERIAL_8250_PCI=yCONFIG_SERIAL_8250_EXAR=yCONFIG_SERIAL_8250_NR_UARTS=16CONFIG_SERIAL_8250_RUNTIME_UARTS=8CONFIG_SERIAL_8250_EXTENDED=y
#CONFIG_SERIAL_8250_MANY_PORTSis not set
#CONFIG_SERIAL_8250_SHARE_IRQis not set
#CONFIG_SERIAL_8250_DETECT_IRQis not setQuoted 8 lines
#
CONFIG_SERIAL_8250_RSAis not setCONFIG_SERIAL_8250_DWLIB=yCONFIG_SERIAL_8250_DW=mCONFIG_SERIAL_8250_RT288X=yCONFIG_SERIAL_8250_UNIPHIER=mCONFIG_SERIAL_8250_LPSS=yCONFIG_SERIAL_8250_MID=yCONFIG_SERIAL_8250_TEGRA=m
Quoted 1 line
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
Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
Quoted 67 lines · Greg Kroah-Hartman
Quoted 66 lines · Lee Jones
Quoted 63 lines · Greg Kroah-Hartman
Quoted 28 lines · Lee Jones
Quoted 26 lines · Lee Jones
Quoted 15 lines · Greg Kroah-Hartman
Quoted 5 lines · Lee Jones
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]Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Mike Hudson <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/8250/8250_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Quoted 6 lines
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 1I *always* test build my sets before posting.
Quoted 7 lines
Quoted 1 line
/investigating
What config failed for you?
It looks as though
SERIAL_8250_CONSOLEis 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=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=yCONFIG_SERIAL_8250_PNP=yCONFIG_SERIAL_8250_16550A_VARIANTS=yCONFIG_SERIAL_8250_FINTEK=yCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_DMA=yCONFIG_SERIAL_8250_PCI=yCONFIG_SERIAL_8250_EXAR=yCONFIG_SERIAL_8250_NR_UARTS=16CONFIG_SERIAL_8250_RUNTIME_UARTS=8CONFIG_SERIAL_8250_EXTENDED=y
#CONFIG_SERIAL_8250_MANY_PORTSis not set
#CONFIG_SERIAL_8250_SHARE_IRQis not set
#CONFIG_SERIAL_8250_DETECT_IRQis not set
#CONFIG_SERIAL_8250_RSAis not setCONFIG_SERIAL_8250_DWLIB=yCONFIG_SERIAL_8250_DW=mCONFIG_SERIAL_8250_RT288X=yCONFIG_SERIAL_8250_UNIPHIER=mCONFIG_SERIAL_8250_LPSS=yCONFIG_SERIAL_8250_MID=yCONFIG_SERIAL_8250_TEGRA=m
Quoted 5 lines
Quoted 1 line
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'
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Jiri Slaby
maintainerRe: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
Quoted 4 lines · Lee Jones
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
Signature · 1 line
js
Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
Quoted 9 lines · Jiri Slaby
Quoted 4 lines · Lee Jones
I cannot recreate the issue or work out why:
# THE OUTPUT
# *_port.o and *_early.o were both builtYou 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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Greg Kroah-Hartman
maintainerRe: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
In reply to Lee JonesQuoted 23 lines · Lee Jones
Quoted 21 lines · Greg Kroah-Hartman
Quoted 5 lines · Lee Jones
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]Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Mike Hudson <[email protected]>Signed-off-by Lee Jones <[email protected]>--- 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
Quoted 3 lines
Quoted 1 line
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.
:)
Re: [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers
Quoted 24 lines · Greg Kroah-Hartman
Quoted 23 lines · Lee Jones
Quoted 21 lines · Greg Kroah-Hartman
Quoted 5 lines · Lee Jones
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]Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Mike Hudson <[email protected]>Signed-off-by Lee Jones <[email protected]>--- 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
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 14/36 tty: serial: 8250: serial_cs: Remove unused/unchecked variable 'err'
In reply to Lee JonesFixes 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]
--- drivers/tty/serial/8250/serial_cs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/tty/serial/8250/serial_cs.c +3 -6
@@ -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;
Signature · 1 line
2.25.1
PATCH 15/36 tty: tty_audit: Demote non-conformant kernel-doc headers
In reply to Lee JonesFixes 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'
--- drivers/tty/tty_audit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/tty/tty_audit.c +6 -6
@@ -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.
Signature · 1 line
2.25.1
PATCH 16/36 tty: pty: Provide descriptions for the 'file' parameters
In reply to Lee JonesFixes 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'
--- drivers/tty/pty.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/pty.c +2 -0
@@ -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.
Signature · 1 line
2.25.1
PATCH 17/36 tty: serial: amba-pl011: Mark 'sbsa_uart_acpi_match' as __maybe_unused
In reply to Lee JonesWhen !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=]
--- drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/amba-pl011.c +1 -1
@@ -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 }, {}, };
Signature · 1 line
2.25.1
PATCH 18/36 tty: n_gsm: Demote obvious abuse of kernel-doc and supply other missing docss
In reply to Lee JonesFixes 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'
--- drivers/tty/n_gsm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/tty/n_gsm.c +3 -1
@@ -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
Signature · 1 line
2.25.1
PATCH 19/36 tty: serial: lpc32xx_hs: Remove unused variable 'tmp'
In reply to Lee JonesFixes 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]
--- drivers/tty/serial/lpc32xx_hs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/serial/lpc32xx_hs.c +1 -2
@@ -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)
Signature · 1 line
2.25.1
Re: [PATCH 19/36] tty: serial: lpc32xx_hs: Remove unused variable 'tmp'
Hi Lee,
Quoted 26 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Cc Vladimir Zapolskiy <[email protected]>Cc Sylvain Lemieux <[email protected]>Cc Kevin Wells <[email protected]>Cc Roland Stigge <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/lpc32xx_hs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/tty/serial/lpc32xx_hs.c +0
-0@@ -241,12 +241,11 @@ static unsigned int __serial_get_clock_div(unsigned long uartclk,static void __serial_uart_flush (struct uart_port *port) {
drivers/tty/serial/lpc32xx_hs.c static unsigned int __serial_get_clock_div(unsigned long uartclk, · line 251
Quoted 10 lines
drivers/tty/serial/lpc32xx_hs.c +1
-2-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.
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
PATCH 20/36 tty: serial: msm_serial: Remove set but unused variable 'status'
In reply to Lee JonesFixes 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]
--- drivers/tty/serial/msm_serial.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/serial/msm_serial.c +1 -2
@@ -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);
Signature · 1 line
2.25.1
Re: [PATCH 20/36] tty: serial: msm_serial: Remove set but unused variable 'status'
Quoted 6 lines · Lee Jones
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]
Quoted 8 lines
Cc Andy Gross <[email protected]>Cc Bjorn Andersson <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Robert Love <[email protected]>Signed-off-by Lee Jones <[email protected]>
PATCH 21/36 tty: serial: ifx6x60: Fix function documentation headers
In reply to Lee JonesFixes 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'
--- drivers/tty/serial/ifx6x60.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/ifx6x60.c +2 -1
@@ -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.
Signature · 1 line
2.25.1
PATCH 22/36 tty: serial: xilinx_uartps: Supply description for missing member 'cts_override'
In reply to Lee JonesFixes 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'
--- drivers/tty/serial/xilinx_uartps.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serial/xilinx_uartps.c +1 -0
@@ -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;
Signature · 1 line
2.25.1
Re: [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override'
Quoted 20 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Cc Michal Simek <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/xilinx_uartps.c | 1 + 1 file changed, 1 insertion(+)drivers/tty/serial/xilinx_uartps.c +0
-0
drivers/tty/serial/xilinx_uartps.c MODULE_PARM_DESC(rx_timeout, "Rx timeout, 1-255"); · line 198
Quoted 7 lines
drivers/tty/serial/xilinx_uartps.c +1
-0@@ -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
Re: [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override'
Quoted 15 lines · Maarten Brock
Quoted 14 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Cc Michal Simek <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/xilinx_uartps.c | 1 + 1 file changed, 1 insertion(+)
Quoted 16 lines
drivers/tty/serial/xilinx_uartps.c MODULE_PARM_DESC(rx_timeout, "Rx timeout, 1-255"); · line 198
Quoted 13 lines
drivers/tty/serial/xilinx_uartps.c +1
-0@@ -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_overrideflag at line 208?
This set has already been merged sadly.
Please feel free to submit a patch of your own.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 23/36 tty: synclink_gt: Demote one kernel-doc header and repair another
In reply to Lee JonesFixes 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'
--- drivers/tty/synclink_gt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/synclink_gt.c +2 -1
@@ -620,7 +620,7 @@ static inline int sanity_check(struct slgt_info *info, char *devname, const charreturn 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) {
Signature · 1 line
2.25.1
PATCH 24/36 tty: serial: serial-tegra: Struct headers should start with 'struct <name>'
In reply to Lee JonesFixes 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 '
--- drivers/tty/serial/serial-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/serial-tegra.c +1 -1
@@ -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.
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 25/36 tty: serial: sifive: Struct headers should start with 'struct <name>'
In reply to Lee JonesAlso 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 '
--- drivers/tty/serial/sifive.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/sifive.c +2 -1
@@ -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.
Signature · 7 lines
2.25.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH 25/36] tty: serial: sifive: Struct headers should start with 'struct <name>'
Quoted 26 lines · On Wed, 04 Nov 2020 11:35:38 PST (-0800), [email protected] 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: 'structsifive_serial_port'Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Palmer Dabbelt <[email protected]>Cc Paul Walmsley <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/sifive.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/tty/serial/sifive.c +0
-1@@ -144,12 +144,13 @@*/ /** -* sifive_serial_port - driver-specific data extension to struct uart_port
drivers/tty/serial/sifive.c line 156
Quoted 10 lines
drivers/tty/serial/sifive.c +2
-0+* 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.
Thanks!
PATCH 26/36 tty: synclinkmp: Add missing description for function param 'txqueue'
In reply to Lee JonesFixes 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'
--- drivers/tty/synclinkmp.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/synclinkmp.c +1 -0
@@ -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) {
Signature · 1 line
2.25.1
PATCH 27/36 tty: synclinkmp: Mark never checked 'readval' as __always_unused
In reply to Lee JonesFixes 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]
--- drivers/tty/synclinkmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/synclinkmp.c +1 -1
@@ -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;
Signature · 1 line
2.25.1
Jiri Slaby
maintainerRe: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
Quoted 18 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/synclinkmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/synclinkmp.c +0
-0
drivers/tty/synclinkmp.c static bool init_adapter(SLMP_INFO *info) · line 5168
Quoted 5 lines
drivers/tty/synclinkmp.c +1
-1@@ -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,
Signature · 2 lines
js suse labs
Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
Quoted 14 lines · Jiri Slaby
Quoted 13 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/synclinkmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines
drivers/tty/synclinkmp.c static bool init_adapter(SLMP_INFO *info) · line 5167
Quoted 9 lines
drivers/tty/synclinkmp.c +1
-1@@ -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
Quoted 9 lines
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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Jiri Slaby
maintainerRe: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
Quoted 28 lines · Lee Jones
Quoted 14 lines · Jiri Slaby
Quoted 13 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/synclinkmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 11 lines
drivers/tty/synclinkmp.c static bool init_adapter(SLMP_INFO *info) · line 5167
Quoted 9 lines
drivers/tty/synclinkmp.c +1
-1@@ -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?
Quoted 3 lines
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.
Quoted 2 lines
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.
Quoted 10 lines
Quoted 9 lines
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;
Quoted 3 lines
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,
Signature · 2 lines
js suse labs
Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
Quoted 5 lines · Jiri Slaby
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.
Greg Kroah-Hartman
maintainerRe: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
Quoted 8 lines · Paul Fulghum
Quoted 5 lines · Jiri Slaby
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".
Quoted 5 lines
The hardware used with
synclink.candsynclinkmp.chas 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.cis 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
Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
Quoted 18 lines · Greg Kroah-Hartman
Quoted 9 lines · Paul Fulghum
Quoted 5 lines · Jiri Slaby
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.candsynclinkmp.chas not beenmanufactured 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.
Quoted 3 lines
synclink_gt.cis still in production and the driver still actively used.
Quoted 7 lines
Quoted 4 lines
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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Jiri Slaby
maintainerRe: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
In reply to Paul FulghumQuoted 1 line · Paul Fulghum
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.
Signature · 2 lines
js suse labs
RE: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
In reply to Jiri SlabyQuoted 10 lines
Quoted 10 lines
Quoted 9 lines
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;
Quoted 3 lines
Quoted 3 lines
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)
Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
Quoted 14 lines · David Laight
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
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;Quoted 3 lines
Quoted 3 lines
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.
Quoted 6 lines
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 realreadl()?)Deleting the driver works...
Will post the removal patches when my tests finish.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
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.)
Quoted 3 lines · Lee Jones
Will post the removal patches when my tests finish.
Re: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
Quoted 6 lines · Paul Fulghum
Another candidate for removal is
drivers/char/pcmcia/synclink_cs.cEverything I said about
synclink.c/synclinkmp.cis 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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Jiri Slaby
maintainerRe: [PATCH 27/36] tty: synclinkmp: Mark never checked 'readval' as __always_unused
In reply to David LaightQuoted 10 lines · David Laight
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
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;
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
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.
Signature · 2 lines
js suse labs
PATCH 28/36 tty: serial: stm32-usart: Remove set but unused 'cookie' variables
In reply to Lee JonesFixes 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]
--- drivers/tty/serial/stm32-usart.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/tty/serial/stm32-usart.c +2 -4
@@ -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);
Signature · 1 line
2.25.1
PATCH 29/36 tty: tty_ldisc: Supply missing description for 'tty_ldisc_get's 'tty' param
In reply to Lee JonesFixes 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'
--- drivers/tty/tty_ldisc.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/tty_ldisc.c +1 -0
@@ -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
Signature · 1 line
2.25.1
PATCH 30/36 tty: serial: serial-tegra: Provide some missing struct member descriptions
In reply to Lee JonesFixes 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'
--- drivers/tty/serial/serial-tegra.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/tty/serial/serial-tegra.c +5 -0
@@ -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;
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 31/36 powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
In reply to Lee JonesFixes 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)
| ^~~~~~~~~~~~~~~~~~
--- 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(-)
arch/powerpc/include/asm/hvconsole.h +3 -0
@@ -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 */
arch/powerpc/platforms/pseries/pseries.h +0 -3
@@ -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 *);
arch/powerpc/platforms/pseries/setup.c +1 -0
@@ -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"
Signature · 1 line
2.25.1
Re: [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
Quoted 11 lines · Lee Jones
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__inithvc_vio_init_early(void)
| ^~~~~~~~~~~~~~~~~~Cc Michael Ellerman <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Signed-off-by Lee Jones <[email protected]>
Quoted 5 lines
--- 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(-)
arch/powerpc/include/asm/hvconsole.h line 28
Quoted 10 lines
arch/powerpc/include/asm/hvconsole.h +2
-0@@ -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
Re: [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
Quoted 18 lines · Michael Ellerman
Quoted 11 lines · Lee Jones
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__inithvc_vio_init_early(void)
| ^~~~~~~~~~~~~~~~~~Cc Michael Ellerman <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Signed-off-by Lee Jones <[email protected]>Quoted 5 lines
--- 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(-)
Quoted 1 line
Acked-by Michael Ellerman <[email protected]>
Thanks.
Quoted 8 lines
Quoted 8 lines
arch/powerpc/include/asm/hvconsole.h +0
-0@@ -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);
Quoted 4 lines
arch/powerpc/include/asm/hvconsole.h line 28
Quoted 2 lines
arch/powerpc/include/asm/hvconsole.h +2
-0+/* 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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
In reply to Lee JonesLe 04/11/2020 à 20:35, Lee Jones a écrit :
Quoted 22 lines
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__inithvc_vio_init_early(void)
| ^~~~~~~~~~~~~~~~~~Cc Michael Ellerman <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Signed-off-by Lee Jones <[email protected]>--- 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(-)arch/powerpc/include/asm/hvconsole.h +0
-0
arch/powerpc/include/asm/hvconsole.h line 29
Quoted 6 lines
arch/powerpc/include/asm/hvconsole.h +3
-0@@ -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.
Quoted 22 lines
arch/powerpc/include/asm/hvconsole.h +0
-0#endif /* __KERNEL__ */ #endif /* _PPC64_HVCONSOLE_H */ arch/powerpc/platforms/pseries/pseries.h +0
-3@@ -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 *);arch/powerpc/platforms/pseries/setup.c +0
-0
arch/powerpc/platforms/pseries/setup.c line 77
Quoted 7 lines
arch/powerpc/platforms/pseries/setup.c +1
-0@@ -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
Re: [PATCH 31/36] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
Quoted 20 lines · Christophe Leroy
Le 04/11/2020 à 20:35, Lee Jones a écrit :
Quoted 17 lines
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__inithvc_vio_init_early(void)
| ^~~~~~~~~~~~~~~~~~Cc Michael Ellerman <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Signed-off-by Lee Jones <[email protected]>--- 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(-)
Quoted 12 lines
arch/powerpc/include/asm/hvconsole.h line 28
Quoted 10 lines
arch/powerpc/include/asm/hvconsole.h +3
-0@@ -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.
Quoted 29 lines
Quoted 20 lines
arch/powerpc/include/asm/hvconsole.h +0
-0#endif /* __KERNEL__ */ #endif /* _PPC64_HVCONSOLE_H */ arch/powerpc/platforms/pseries/pseries.h +0
-3@@ -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 *);arch/powerpc/platforms/pseries/setup.c +0
-0arch/powerpc/platforms/pseries/setup.c line 77
Quoted 7 lines
arch/powerpc/platforms/pseries/setup.c +1
-0@@ -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
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v2 31/36 powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location
In reply to Lee JonesFixes 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)
| ^~~~~~~~~~~~~~~~~~
---
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(-)
arch/powerpc/include/asm/hvconsole.h +3 -0
@@ -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 */
arch/powerpc/platforms/pseries/pseries.h +0 -3
@@ -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 *);
arch/powerpc/platforms/pseries/setup.c +1 -0
@@ -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"
Signature · 1 line
2.25.1
PATCH 32/36 tty: hvc: hvc_vio: Staticify function invoked only by reference
In reply to Lee JonesFixes 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)
| ^~~~~~~~~~~~~~~~~~
--- drivers/tty/hvc/hvc_vio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/hvc/hvc_vio.c +1 -1
@@ -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];
Signature · 1 line
2.25.1
PATCH 33/36 tty: hvc: hvc_opal: Staticify function invoked by reference
In reply to Lee JonesFixes 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]
--- drivers/tty/hvc/hvc_opal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/hvc/hvc_opal.c +1 -1
@@ -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];
Signature · 1 line
2.25.1
PATCH 34/36 tty: serial: pmac_zilog: Make disposable variable __always_unused
In reply to Lee JonesFixes 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]
--- drivers/tty/serial/pmac_zilog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/pmac_zilog.h +1 -1
@@ -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); \
Signature · 1 line
2.25.1
Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
Le 04/11/2020 à 20:35, Lee Jones a écrit :
Quoted 3 lines
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
Quoted 27 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Michael Ellerman <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/serial/pmac_zilog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/serial/pmac_zilog.h +1
-1@@ -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); \
Jiri Slaby
maintainerRe: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
Quoted 10 lines · Christophe Leroy
Le 04/11/2020 à 20:35, Lee Jones a écrit :
Quoted 3 lines
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_unusedis 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?
Quoted 12 lines
Quoted 12 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Michael Ellerman <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Signed-off-by Lee Jones <[email protected]>---
drivers/tty/serial/pmac_zilog.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
Quoted 13 lines
drivers/tty/serial/pmac_zilog.h +1
-1@@ -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); \Quoted 2 lines
garbage =
read_zsdata(port); \
thanks,
Signature · 1 line
js
Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
Quoted 6 lines · Jiri Slaby
Quoted 5 lines · Christophe Leroy
Le 04/11/2020 à 20:35, Lee Jones a écrit :
Quoted 2 lines
Fixes the following W=1 kernel build warning(s):
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
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_unusedis 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.
Quoted 2 lines
Or, why is the "garbage =" needed in the first place?
read_zsdatais 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.
Quoted 1 line
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.
Quoted 30 lines
Quoted 12 lines
Quoted 12 lines
Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Michael Ellerman <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Signed-off-by Lee Jones <[email protected]>---
drivers/tty/serial/pmac_zilog.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
Quoted 14 lines
drivers/tty/serial/pmac_zilog.h +1
-1@@ -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); \Quoted 2 lines
garbage =
read_zsdata(port); \thanks,
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Jiri Slaby
maintainerRe: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
Quoted 28 lines · Lee Jones
Quoted 6 lines · Jiri Slaby
Quoted 5 lines · Christophe Leroy
Le 04/11/2020 à 20:35, Lee Jones a écrit :
Quoted 2 lines
Fixes the following W=1 kernel build warning(s):
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
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_unusedis 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}_unusedThe 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.
Quoted 6 lines
Quoted 2 lines
Or, why is the "garbage =" needed in the first place?
read_zsdatais 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.
Quoted 3 lines
Quoted 1 line
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.
Quoted 1 line
*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,
Signature · 2 lines
js suse labs
Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
Quoted 42 lines · Jiri Slaby
Quoted 28 lines · Lee Jones
Quoted 6 lines · Jiri Slaby
Quoted 5 lines · Christophe Leroy
Le 04/11/2020 à 20:35, Lee Jones a écrit :
Quoted 2 lines
Fixes the following W=1 kernel build warning(s):
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
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_unusedis 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}_unusedThe 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.Quoted 6 lines
Quoted 2 lines
Or, why is the "garbage =" needed in the first place?
read_zsdatais 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.
Quoted 2 lines
Quoted 1 line
And even if it was, would (void)!read_zsdata(port) fix it?
Quoted 8 lines
Quoted 1 line
That's hideous. :D
Sure, marking reads as
must_checkwould be insane.Quoted 1 line
*Much* better to just use '
__always_used' in that use-case.Then using a dummy variable to fool
must_checkmust meanmust_checkis used incorrectly, no :)? But there are always exceptions…
Agreed on all points.
Will fix.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 35/36 tty: synclink: Mark disposable variables as __always_unused
In reply to Lee JonesFixes 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]
--- drivers/tty/synclink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/synclink.c +2 -2
@@ -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++ ) {
Signature · 1 line
2.25.1
Jiri Slaby
maintainerRe: [PATCH 35/36] tty: synclink: Mark disposable variables as __always_unused
Quoted 20 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/synclink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/tty/synclink.c +0
-0
drivers/tty/synclink.c static void usc_load_txfifo( struct mgsl_struct *info ) · line 5571
Quoted 5 lines
drivers/tty/synclink.c +1
-1@@ -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.
drivers/tty/synclink.c static void mgsl_load_pci_memory( char* TargetPtr, const char* SourcePtr, · line 7267
Quoted 9 lines
drivers/tty/synclink.c +1
-1/* 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.
drivers/tty/synclink.c static void mgsl_load_pci_memory( char* TargetPtr, const char* SourcePtr,
Quoted 4 lines
drivers/tty/synclink.c +0
-0for ( Index =0 ; Index < Intervalcount ; Index++ ) {
thanks,
Signature · 2 lines
js suse labs
Re: [PATCH 35/36] tty: synclink: Mark disposable variables as __always_unused
Quoted 29 lines · Jiri Slaby
Quoted 20 lines · Lee Jones
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 <[email protected]>Cc Jiri Slaby <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/tty/synclink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/tty/synclink.c +0
-0drivers/tty/synclink.c static void usc_load_txfifo( struct mgsl_struct *info ) · line 5571
Quoted 5 lines
drivers/tty/synclink.c +1
-1@@ -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.
Quoted 9 lines
drivers/tty/synclink.c static void mgsl_load_pci_memory( char* TargetPtr, const char* SourcePtr, · line 7266
Quoted 7 lines
drivers/tty/synclink.c +1
-1/* 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.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 36/36 tty: synclink: Provide missing description for 'hdlcdev_tx_timeout's 'txqueue' param
In reply to Lee JonesFixes 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'
--- drivers/tty/synclink.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/synclink.c +1 -0
@@ -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) {
Signature · 1 line
2.25.1
Greg Kroah-Hartman
maintainerQuoted 3 lines · Lee Jones
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