Skip to contentSkip to conversation

scsi: fix sparse warning

PATCH New Dolev Raviv 1 participant 2 messages Sep 29, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 scsi: fix sparse warning

This patch fixes newly introduced sparse warning, introduced by "scis: fixing the "type" for well known LUs".

Sparse warning:

Quoted 1 line
Quoted 1 line

drivers/scsi/scsi_scan.c:825: warning: format '%16p' expects type

'void *', but argument 6 has type 'u64'

drivers/scsi/scsi_scan.c +2 -2
index c6c5716..74b28c9 100644
@@ -813,8 +813,8 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
 		 */
 		if (scsi_is_wlun(sdev->lun) && sdev->type != TYPE_WLUN) {
 			sdev_printk(KERN_WARNING, sdev,
-				"%s: correcting incorrect peripheral device type 0x%x for W-LUN 0x%16phN\n",
-				__func__, sdev->type, sdev->lun);
+				"%s: correcting incorrect peripheral device type 0x%x for W-LUN 0x%16xhN\n",
+				__func__, sdev->type, (unsigned int)sdev->lun);
 			sdev->type = TYPE_WLUN;
 		}
 
Signature · 5 lines
1.8.5.2

-- 
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#1 lore raw

PATCH 2/2 scsi: ufs: fix sparse warning

This patch fixes newly introduced sparse warning, introduced by UFS power management series.

Sparse warning:

Quoted 1 line
Quoted 1 line

drivers/scsi/ufs/ufshcd.c:1867:5: sparse: symbol

'ufshcd_uic_pwr_ctrl' was not declared. Should it be static?

Quoted 1 line
Quoted 1 line

drivers/scsi/ufs/ufshcd.c:2025:5: sparse: symbol

'ufshcd_change_power_mode' was not declared. Should it be static?

drivers/scsi/ufs/ufshcd.c +2 -2
index 5c78c3d..497c38a 100644
@@ -2146,7 +2146,7 @@ EXPORT_SYMBOL_GPL(ufshcd_dme_get_attr);
  *
  * Returns 0 on success, non-zero value on failure
  */
-int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd)
+static int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd)
 {
 	struct completion uic_async_done;
 	unsigned long flags;
@@ -2309,7 +2309,7 @@ static int ufshcd_get_max_pwr_mode(struct ufs_hba *hba)
 	return 0;
 }
 
-int ufshcd_change_power_mode(struct ufs_hba *hba,
+static int ufshcd_change_power_mode(struct ufs_hba *hba,
 			     struct ufs_pa_layer_attr *pwr_mode)
 {
 	int ret;
Signature · 5 lines
1.8.5.2

-- 
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation