From: Jiri Slaby <jirislaby@kernel.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Lee Jones <lee.jones@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Paul Mackerras <paulus@samba.org>,
linux-serial@vger.kernel.org
Subject: Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused
Date: Thu, 5 Nov 2020 08:39:56 +0100 [thread overview]
Message-ID: <e027b620-56f8-7d8b-84ff-54839f94a4c7@kernel.org> (raw)
In-Reply-To: <445a6440-b4c8-4536-891b-0cefc78e5f57@csgroup.eu>
On 05. 11. 20, 8:04, Christophe Leroy wrote:
>
>
> Le 04/11/2020 à 20:35, Lee Jones a écrit :
>> Fixes the following W=1 kernel build warning(s):
>>
>> drivers/tty/serial/pmac_zilog.h:365:58: warning: variable ‘garbage’
>> set but not used [-Wunused-but-set-variable]
>
> Explain how you are fixing this warning.
>
> Setting __always_unused is usually not the good solution for fixing
> this warning, but here I guess this is likely the good solution. But it
> should be explained why.
Or, why is the "garbage =" needed in the first place? read_zsdata is not
defined with __warn_unused_result__. And even if it was, would
(void)!read_zsdata(port) fix it?
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Jiri Slaby <jirislaby@kernel.org>
>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> Cc: Paul Mackerras <paulus@samba.org>
>> Cc: linux-serial@vger.kernel.org
>> Cc: linuxppc-dev@lists.ozlabs.org
>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>> ---
>> drivers/tty/serial/pmac_zilog.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/pmac_zilog.h
>> b/drivers/tty/serial/pmac_zilog.h
>> index bb874e76810e0..968aec7c1cf82 100644
>> --- a/drivers/tty/serial/pmac_zilog.h
>> +++ b/drivers/tty/serial/pmac_zilog.h
>> @@ -362,7 +362,7 @@ static inline void zssync(struct uart_pmac_port
>> *port)
>> /* Misc macros */
>> #define ZS_CLEARERR(port) (write_zsreg(port, 0, ERR_RES))
>> -#define ZS_CLEARFIFO(port) do { volatile unsigned char garbage; \
>> +#define ZS_CLEARFIFO(port) do { volatile unsigned char
>> __always_unused garbage; \
>> garbage = read_zsdata(port); \
>> garbage = read_zsdata(port); \
>> garbage = read_zsdata(port); \
>>
thanks,
--
js
next prev parent reply other threads:[~2020-11-05 7:40 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 19:35 [PATCH 00/36] Rid W=1 issues from TTY Lee Jones
2020-11-04 19:35 ` [PATCH 01/36] tty: serdev: core: Remove unused variable 'dummy' Lee Jones
2020-11-04 19:35 ` [PATCH 02/36] tty: serdev: core: Provide missing description for 'owner' Lee Jones
2020-11-04 19:35 ` [PATCH 11/36] tty: serial: jsm: jsm_cls: Remove unused variable 'discard' Lee Jones
2020-11-04 19:35 ` [PATCH 13/36] tty: serial: 8250: 8250_port: Staticify functions referenced by pointers Lee Jones
2020-11-06 9:53 ` Greg Kroah-Hartman
2020-11-06 10:05 ` Lee Jones
2020-11-06 10:16 ` Lee Jones
2020-11-06 10:39 ` Greg Kroah-Hartman
2020-11-06 10:48 ` Lee Jones
2020-11-06 10:55 ` Greg Kroah-Hartman
2020-11-06 11:12 ` Lee Jones
2020-11-06 11:19 ` Jiri Slaby
2020-11-06 14:47 ` Lee Jones
2020-11-06 10:20 ` Greg Kroah-Hartman
2020-11-06 10:47 ` Lee Jones
2020-11-04 19:35 ` [PATCH 14/36] tty: serial: 8250: serial_cs: Remove unused/unchecked variable 'err' Lee Jones
2020-11-04 19:35 ` [PATCH 17/36] tty: serial: amba-pl011: Mark 'sbsa_uart_acpi_match' as __maybe_unused Lee Jones
2020-11-04 19:35 ` [PATCH 19/36] tty: serial: lpc32xx_hs: Remove unused variable 'tmp' Lee Jones
2020-11-04 20:04 ` Vladimir Zapolskiy
2020-11-04 19:35 ` [PATCH 20/36] tty: serial: msm_serial: Remove set but unused variable 'status' Lee Jones
2020-11-05 16:09 ` Jeffrey Hugo
2020-11-04 19:35 ` [PATCH 21/36] tty: serial: ifx6x60: Fix function documentation headers Lee Jones
2020-11-04 19:35 ` [PATCH 22/36] tty: serial: xilinx_uartps: Supply description for missing member 'cts_override' Lee Jones
2020-11-16 10:55 ` Maarten Brock
2020-11-16 12:38 ` Lee Jones
2020-11-04 19:35 ` [PATCH 24/36] tty: serial: serial-tegra: Struct headers should start with 'struct <name>' Lee Jones
2020-11-04 19:35 ` [PATCH 25/36] tty: serial: sifive: " Lee Jones
2020-11-06 8:11 ` Palmer Dabbelt
2020-11-04 19:35 ` [PATCH 28/36] tty: serial: stm32-usart: Remove set but unused 'cookie' variables Lee Jones
2020-11-04 19:35 ` [PATCH 30/36] tty: serial: serial-tegra: Provide some missing struct member descriptions Lee Jones
2020-11-04 19:35 ` [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused Lee Jones
2020-11-05 7:04 ` Christophe Leroy
2020-11-05 7:39 ` Jiri Slaby [this message]
2020-11-05 8:36 ` Lee Jones
2020-11-05 8:55 ` Jiri Slaby
2020-11-05 9:00 ` Lee Jones
2020-11-06 9:54 ` [PATCH 00/36] Rid W=1 issues from TTY Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e027b620-56f8-7d8b-84ff-54839f94a4c7@kernel.org \
--to=jirislaby@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=gregkh@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox