mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RESEND PATCH 0/2] Clean up the hisi_sas driver source code
@ 2026-03-05  6:46 Yihang Li
  2026-03-05  6:46 ` [RESEND PATCH 1/2] scsi: hisi_sas: Correct the printing format issues Yihang Li
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Yihang Li @ 2026-03-05  6:46 UTC (permalink / raw)
  To: martin.petersen, James.Bottomley
  Cc: linux-scsi, linux-kernel, yangxingui, linuxarm, prime.zeng,
	liyihang9, liuyonglong

This series mainly consists of some minor cleanups, printing format issue
and risk of overflow in bitwise logical. No functional changes overall.

Yihang Li (2):
  scsi: hisi_sas: Correct the printing format issues
  scsi: hisi_sas: Fixed the risk of overflow in bitwise logical
    operations

 drivers/scsi/hisi_sas/hisi_sas_main.c  |  2 +-
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.33.0


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

* [RESEND PATCH 1/2] scsi: hisi_sas: Correct the printing format issues
  2026-03-05  6:46 [RESEND PATCH 0/2] Clean up the hisi_sas driver source code Yihang Li
@ 2026-03-05  6:46 ` Yihang Li
  2026-03-05  6:47 ` [RESEND PATCH 2/2] scsi: hisi_sas: Fixed the risk of overflow in bitwise logical operations Yihang Li
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Yihang Li @ 2026-03-05  6:46 UTC (permalink / raw)
  To: martin.petersen, James.Bottomley
  Cc: linux-scsi, linux-kernel, yangxingui, linuxarm, prime.zeng,
	liyihang9, liuyonglong

There are some print format errors, fix them.

Signed-off-by: Yihang Li <liyihang9@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c  | 2 +-
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 30a9c6612651..00e4b59ff711 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1326,7 +1326,7 @@ static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func,
 
 	if (sts && !wait_for_completion_timeout(&completion,
 		HISI_SAS_WAIT_PHYUP_TIMEOUT)) {
-		dev_warn(dev, "phy%d wait phyup timed out for func %d\n",
+		dev_warn(dev, "phy%d wait phyup timed out for func %u\n",
 			 phy_no, func);
 		if (phy->in_reset)
 			ret = -ETIMEDOUT;
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 2f9e01717ef3..6a841d53bb10 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -896,7 +896,7 @@ static void setup_itct_v3_hw(struct hisi_hba *hisi_hba,
 			qw0 = HISI_SAS_DEV_TYPE_SATA << ITCT_HDR_DEV_TYPE_OFF;
 		break;
 	default:
-		dev_warn(dev, "setup itct: unsupported dev type (%d)\n",
+		dev_warn(dev, "setup itct: unsupported dev type (%u)\n",
 			 sas_dev->dev_type);
 	}
 
@@ -2847,7 +2847,7 @@ static void wait_cmds_complete_timeout_v3_hw(struct hisi_hba *hisi_hba,
 static ssize_t intr_conv_v3_hw_show(struct device *dev,
 				    struct device_attribute *attr, char *buf)
 {
-	return scnprintf(buf, PAGE_SIZE, "%u\n", hisi_sas_intr_conv);
+	return scnprintf(buf, PAGE_SIZE, "%d\n", hisi_sas_intr_conv);
 }
 static DEVICE_ATTR_RO(intr_conv_v3_hw);
 
@@ -3293,7 +3293,7 @@ static int debugfs_set_bist_v3_hw(struct hisi_hba *hisi_hba, bool enable)
 	u32 *fix_code = &hisi_hba->debugfs_bist_fixed_code[0];
 	struct device *dev = hisi_hba->dev;
 
-	dev_info(dev, "BIST info:phy%d link_rate=%d code_mode=%d path_mode=%d ffe={0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x} fixed_code={0x%x, 0x%x}\n",
+	dev_info(dev, "BIST info:phy%u link_rate=%u code_mode=%u path_mode=%u ffe={0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x} fixed_code={0x%x, 0x%x}\n",
 		 phy_no, linkrate, code_mode, path_mode,
 		 ffe[FFE_SAS_1_5_GBPS], ffe[FFE_SAS_3_0_GBPS],
 		 ffe[FFE_SAS_6_0_GBPS], ffe[FFE_SAS_12_0_GBPS],
@@ -3650,7 +3650,7 @@ static void debugfs_print_reg_v3_hw(u32 *regs_val, struct seq_file *s,
 	int i;
 
 	for (i = 0; i < reg->count; i++) {
-		int off = i * HISI_SAS_REG_MEM_SIZE;
+		u32 off = i * HISI_SAS_REG_MEM_SIZE;
 		const char *name;
 
 		name = debugfs_to_reg_name_v3_hw(off, reg->base_off,
-- 
2.33.0


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

* [RESEND PATCH 2/2] scsi: hisi_sas: Fixed the risk of overflow in bitwise logical operations
  2026-03-05  6:46 [RESEND PATCH 0/2] Clean up the hisi_sas driver source code Yihang Li
  2026-03-05  6:46 ` [RESEND PATCH 1/2] scsi: hisi_sas: Correct the printing format issues Yihang Li
@ 2026-03-05  6:47 ` Yihang Li
  2026-03-07 16:20 ` [RESEND PATCH 0/2] Clean up the hisi_sas driver source code Martin K. Petersen
  2026-03-16  1:41 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Yihang Li @ 2026-03-05  6:47 UTC (permalink / raw)
  To: martin.petersen, James.Bottomley
  Cc: linux-scsi, linux-kernel, yangxingui, linuxarm, prime.zeng,
	liyihang9, liuyonglong

Fixed a few constants defined via macros that had overflow risks.

Signed-off-by: Yihang Li <liyihang9@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 6a841d53bb10..ba9d6877483a 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -432,7 +432,7 @@
 #define CMPLT_HDR_IPTT_OFF		0
 #define CMPLT_HDR_IPTT_MSK		(0xffff << CMPLT_HDR_IPTT_OFF)
 #define CMPLT_HDR_DEV_ID_OFF		16
-#define CMPLT_HDR_DEV_ID_MSK		(0xffff << CMPLT_HDR_DEV_ID_OFF)
+#define CMPLT_HDR_DEV_ID_MSK		(0xffffU << CMPLT_HDR_DEV_ID_OFF)
 /* dw3 */
 #define SATA_DISK_IN_ERROR_STATUS_OFF	8
 #define SATA_DISK_IN_ERROR_STATUS_MSK	(0x1 << SATA_DISK_IN_ERROR_STATUS_OFF)
@@ -444,7 +444,7 @@
 #define FIS_ATA_STATUS_ERR_OFF		18
 #define FIS_ATA_STATUS_ERR_MSK		(0x1 << FIS_ATA_STATUS_ERR_OFF)
 #define FIS_TYPE_SDB_OFF		31
-#define FIS_TYPE_SDB_MSK		(0x1 << FIS_TYPE_SDB_OFF)
+#define FIS_TYPE_SDB_MSK		(0x1U << FIS_TYPE_SDB_OFF)
 
 /* ITCT header */
 /* qw0 */
-- 
2.33.0


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

* Re: [RESEND PATCH 0/2] Clean up the hisi_sas driver source code
  2026-03-05  6:46 [RESEND PATCH 0/2] Clean up the hisi_sas driver source code Yihang Li
  2026-03-05  6:46 ` [RESEND PATCH 1/2] scsi: hisi_sas: Correct the printing format issues Yihang Li
  2026-03-05  6:47 ` [RESEND PATCH 2/2] scsi: hisi_sas: Fixed the risk of overflow in bitwise logical operations Yihang Li
@ 2026-03-07 16:20 ` Martin K. Petersen
  2026-03-16  1:41 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2026-03-07 16:20 UTC (permalink / raw)
  To: Yihang Li
  Cc: martin.petersen, James.Bottomley, linux-scsi, linux-kernel,
	yangxingui, linuxarm, prime.zeng, liyihang9, liuyonglong


Yihang,

> This series mainly consists of some minor cleanups, printing format
> issue and risk of overflow in bitwise logical. No functional changes
> overall.

Applied to 7.1/scsi-staging, thanks!

-- 
Martin K. Petersen

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

* Re: [RESEND PATCH 0/2] Clean up the hisi_sas driver source code
  2026-03-05  6:46 [RESEND PATCH 0/2] Clean up the hisi_sas driver source code Yihang Li
                   ` (2 preceding siblings ...)
  2026-03-07 16:20 ` [RESEND PATCH 0/2] Clean up the hisi_sas driver source code Martin K. Petersen
@ 2026-03-16  1:41 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2026-03-16  1:41 UTC (permalink / raw)
  To: James.Bottomley, Yihang Li
  Cc: Martin K . Petersen, linux-scsi, linux-kernel, yangxingui,
	linuxarm, prime.zeng, liyihang9, liuyonglong

On Thu, 05 Mar 2026 14:46:58 +0800, Yihang Li wrote:

> This series mainly consists of some minor cleanups, printing format issue
> and risk of overflow in bitwise logical. No functional changes overall.
> 
> Yihang Li (2):
>   scsi: hisi_sas: Correct the printing format issues
>   scsi: hisi_sas: Fixed the risk of overflow in bitwise logical
>     operations
> 
> [...]

Applied to 7.1/scsi-queue, thanks!

[1/2] scsi: hisi_sas: Correct the printing format issues
      https://git.kernel.org/mkp/scsi/c/87a629fd5e37
[2/2] scsi: hisi_sas: Fixed the risk of overflow in bitwise logical operations
      https://git.kernel.org/mkp/scsi/c/c420f7c4ac7e

-- 
Martin K. Petersen

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

end of thread, other threads:[~2026-03-16  1:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-05  6:46 [RESEND PATCH 0/2] Clean up the hisi_sas driver source code Yihang Li
2026-03-05  6:46 ` [RESEND PATCH 1/2] scsi: hisi_sas: Correct the printing format issues Yihang Li
2026-03-05  6:47 ` [RESEND PATCH 2/2] scsi: hisi_sas: Fixed the risk of overflow in bitwise logical operations Yihang Li
2026-03-07 16:20 ` [RESEND PATCH 0/2] Clean up the hisi_sas driver source code Martin K. Petersen
2026-03-16  1:41 ` 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

all inboxes | Powered by JetHome®