linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes
@ 2021-11-30 20:38 Florian Fainelli
  2021-11-30 20:38 ` [PATCH v2 1/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting Florian Fainelli
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Florian Fainelli @ 2021-11-30 20:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Nilesh Javali, Manish Rangankar,
	supporter:QLOGIC QL41xxx ISCSI DRIVER, James E.J. Bottomley,
	Martin K. Petersen, open list:QLOGIC QL41xxx ISCSI DRIVER

Hi Martin, Manish,

This patch series aligns the formatting of SYSFS_FLAG_FW_SEL_BOOT
between qedi and qla4xxx.

Changes in v2:

- fixed incorrect format in second hunk of qla4xxx

Florian Fainelli (2):
  scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting
  scsi: qla4xxx: Format SYSFS_FLAG_FW_SEL_BOOT as byte

 drivers/scsi/qedi/qedi_main.c | 5 ++---
 drivers/scsi/qla4xxx/ql4_os.c | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting
  2021-11-30 20:38 [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes Florian Fainelli
@ 2021-11-30 20:38 ` Florian Fainelli
  2021-11-30 20:38 ` [PATCH v2 2/2] scsi: qla4xxx: Format SYSFS_FLAG_FW_SEL_BOOT as byte Florian Fainelli
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2021-11-30 20:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, kernel test robot, Nilesh Javali,
	Manish Rangankar, supporter:QLOGIC QL41xxx ISCSI DRIVER,
	James E.J. Bottomley, Martin K. Petersen,
	open list:QLOGIC QL41xxx ISCSI DRIVER

The format used for formatting SYSFS_FLAG_FW_SEL_BOOT creates the
following warning:

drivers/scsi/qedi/qedi_main.c:2259:35: warning: format specifies type
'char' but the argument has type 'int' [-Wformat]
                   rc = snprintf(buf, 3, "%hhd\n",
SYSFS_FLAG_FW_SEL_BOOT);

Fix this to cast the constant as a char since the intention is to print
it via sysfs as a byte.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/scsi/qedi/qedi_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index f1c933070884..e7d2bc9026f8 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -2086,8 +2086,7 @@ static ssize_t qedi_show_boot_eth_info(void *data, int type, char *buf)
 		rc = snprintf(buf, ip_len, fmt, gw);
 		break;
 	case ISCSI_BOOT_ETH_FLAGS:
-		rc = snprintf(buf, 3, "%hhd\n",
-			      SYSFS_FLAG_FW_SEL_BOOT);
+		rc = snprintf(buf, 3, "%hhd\n", (char)SYSFS_FLAG_FW_SEL_BOOT);
 		break;
 	case ISCSI_BOOT_ETH_INDEX:
 		rc = snprintf(buf, 3, "0\n");
@@ -2254,7 +2253,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type,
 			     mchap_secret);
 		break;
 	case ISCSI_BOOT_TGT_FLAGS:
-		rc = snprintf(buf, 3, "%hhd\n", SYSFS_FLAG_FW_SEL_BOOT);
+		rc = snprintf(buf, 3, "%hhd\n", (char)SYSFS_FLAG_FW_SEL_BOOT);
 		break;
 	case ISCSI_BOOT_TGT_NIC_ASSOC:
 		rc = snprintf(buf, 3, "0\n");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] scsi: qla4xxx: Format SYSFS_FLAG_FW_SEL_BOOT as byte
  2021-11-30 20:38 [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes Florian Fainelli
  2021-11-30 20:38 ` [PATCH v2 1/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting Florian Fainelli
@ 2021-11-30 20:38 ` Florian Fainelli
  2021-12-01  4:20 ` [EXT] [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes Manish Rangankar
  2021-12-14  4:40 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2021-11-30 20:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Martin K . Petersen, Nilesh Javali,
	Manish Rangankar, supporter:QLOGIC QL41xxx ISCSI DRIVER,
	James E.J. Bottomley, open list:QLOGIC QL41xxx ISCSI DRIVER

qedi formats SYSFS_FLAG_FW_SEL_BOOT as a byte, and the qla4xxx driver
does exactly the same thing, align them for consistency.

Suggested-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 8987acc24dac..8b2aac49782c 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -5734,7 +5734,7 @@ static ssize_t qla4xxx_show_boot_eth_info(void *data, int type, char *buf)
 
 	switch (type) {
 	case ISCSI_BOOT_ETH_FLAGS:
-		rc = sprintf(str, "%d\n", SYSFS_FLAG_FW_SEL_BOOT);
+		rc = sprintf(str, "%hhd\n", (char)SYSFS_FLAG_FW_SEL_BOOT);
 		break;
 	case ISCSI_BOOT_ETH_INDEX:
 		rc = sprintf(str, "0\n");
@@ -5843,7 +5843,7 @@ qla4xxx_show_boot_tgt_info(struct ql4_boot_session_info *boot_sess, int type,
 			     (char *)&boot_conn->chap.intr_secret);
 		break;
 	case ISCSI_BOOT_TGT_FLAGS:
-		rc = sprintf(str, "%d\n", SYSFS_FLAG_FW_SEL_BOOT);
+		rc = sprintf(str, "%hhd\n", (char)SYSFS_FLAG_FW_SEL_BOOT);
 		break;
 	case ISCSI_BOOT_TGT_NIC_ASSOC:
 		rc = sprintf(str, "0\n");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [EXT] [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes
  2021-11-30 20:38 [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes Florian Fainelli
  2021-11-30 20:38 ` [PATCH v2 1/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting Florian Fainelli
  2021-11-30 20:38 ` [PATCH v2 2/2] scsi: qla4xxx: Format SYSFS_FLAG_FW_SEL_BOOT as byte Florian Fainelli
@ 2021-12-01  4:20 ` Manish Rangankar
  2021-12-14  4:40 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Manish Rangankar @ 2021-12-01  4:20 UTC (permalink / raw)
  To: Florian Fainelli, linux-kernel
  Cc: Nilesh Javali, GR-QLogic-Storage-Upstream, James E.J. Bottomley,
	Martin K. Petersen, open list:QLOGIC QL41xxx ISCSI DRIVER


> -----Original Message-----
> From: Florian Fainelli <f.fainelli@gmail.com>
> Sent: Wednesday, December 1, 2021 2:08 AM
> To: linux-kernel@vger.kernel.org
> Cc: Florian Fainelli <f.fainelli@gmail.com>; Nilesh Javali <njavali@marvell.com>;
> Manish Rangankar <mrangankar@marvell.com>; GR-QLogic-Storage-Upstream
> <GR-QLogic-Storage-Upstream@marvell.com>; James E.J. Bottomley
> <jejb@linux.ibm.com>; Martin K. Petersen <martin.petersen@oracle.com>;
> open list:QLOGIC QL41xxx ISCSI DRIVER <linux-scsi@vger.kernel.org>
> Subject: [EXT] [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes
> 
> External Email
> 
> ----------------------------------------------------------------------
> Hi Martin, Manish,
> 
> This patch series aligns the formatting of SYSFS_FLAG_FW_SEL_BOOT between
> qedi and qla4xxx.
> 
> Changes in v2:
> 
> - fixed incorrect format in second hunk of qla4xxx
> 
> Florian Fainelli (2):
>   scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting
>   scsi: qla4xxx: Format SYSFS_FLAG_FW_SEL_BOOT as byte
> 
>  drivers/scsi/qedi/qedi_main.c | 5 ++---  drivers/scsi/qla4xxx/ql4_os.c | 4 ++--
>  2 files changed, 4 insertions(+), 5 deletions(-)
> 
> --
> 2.25.1

Thanks,

Acked-by: Manish Rangankar <mrangankar@marvell.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes
  2021-11-30 20:38 [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes Florian Fainelli
                   ` (2 preceding siblings ...)
  2021-12-01  4:20 ` [EXT] [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes Manish Rangankar
@ 2021-12-14  4:40 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-12-14  4:40 UTC (permalink / raw)
  To: Florian Fainelli, linux-kernel
  Cc: Martin K . Petersen, supporter:QLOGIC QL41xxx ISCSI DRIVER,
	Manish Rangankar, open list:QLOGIC QL41xxx ISCSI DRIVER,
	Nilesh Javali, James E.J. Bottomley

On Tue, 30 Nov 2021 12:38:11 -0800, Florian Fainelli wrote:

> This patch series aligns the formatting of SYSFS_FLAG_FW_SEL_BOOT
> between qedi and qla4xxx.
> 
> Changes in v2:
> 
> - fixed incorrect format in second hunk of qla4xxx
> 
> [...]

Applied to 5.17/scsi-queue, thanks!

[1/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting
      https://git.kernel.org/mkp/scsi/c/9f9b7fa946be
[2/2] scsi: qla4xxx: Format SYSFS_FLAG_FW_SEL_BOOT as byte
      https://git.kernel.org/mkp/scsi/c/74d801525385

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-14  4:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 20:38 [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes Florian Fainelli
2021-11-30 20:38 ` [PATCH v2 1/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting Florian Fainelli
2021-11-30 20:38 ` [PATCH v2 2/2] scsi: qla4xxx: Format SYSFS_FLAG_FW_SEL_BOOT as byte Florian Fainelli
2021-12-01  4:20 ` [EXT] [PATCH v2 0/2] SYSFS_FLAG_FW_SEL_BOOT formatting fixes Manish Rangankar
2021-12-14  4:40 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).