[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <161f9440-0b75-cd11-d9b5-5315721e44f4@nvidia.com>
Date: Mon, 18 Jul 2022 21:35:27 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Justin Stitt <justinstitt@...gle.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
Max Gurtovoy <mgurtovoy@...dia.com>,
"michael.christie@...cle.com" <michael.christie@...cle.com>,
"mingzhe.zou@...ystack.cn" <mingzhe.zou@...ystack.cn>,
"nathan@...nel.org" <nathan@...nel.org>,
"ndesaulniers@...gle.com" <ndesaulniers@...gle.com>,
"target-devel@...r.kernel.org" <target-devel@...r.kernel.org>,
"trix@...hat.com" <trix@...hat.com>
Subject: Re: [PATCH v2] target: iscsi: fix clang -Wformat warnings
On 7/18/22 11:04, Justin Stitt wrote:
> When building with Clang we encounter these warnings:
> | drivers/target/iscsi/iscsi_target_login.c:719:24: error: format
> | specifies type 'unsigned short' but the argument has type 'int'
> | [-Werror,-Wformat] " from node: %s\n", atomic_read(&sess->nconn),
> -
> | drivers/target/iscsi/iscsi_target_login.c:767:12: error: format
> | specifies type 'unsigned short' but the argument has type 'int'
> | [-Werror,-Wformat] " %s\n", atomic_read(&sess->nconn),
> -
> | drivers/target/iscsi/iscsi_target.c:4365:12: error: format specifies
> | type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
> | " %s\n", atomic_read(&sess->nconn)
>
> For all warnings, the format specifier is `%hu` which describes an
> unsigned short. The resulting type of atomic_read is an int. The
> proposed fix is to listen to Clang and swap the format specifier.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/378
> Signed-off-by: Justin Stitt <justinstitt@...gle.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>
-ck
Powered by blists - more mailing lists