* [PATCH] scsi: ufs-mediatek: Fix build warnings with make W=1
@ 2020-09-10 1:37 Stanley Chu
2020-09-10 2:13 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Stanley Chu @ 2020-09-10 1:37 UTC (permalink / raw)
To: linux-scsi, martin.petersen, avri.altman, alim.akhtar, jejb
Cc: matthias.bgg, bvanassche, linux-mediatek, linux-arm-kernel,
linux-kernel, kuohong.wang, peter.wang, chun-hung.wu, andy.teng,
chaotian.jing, cc.chou, Stanley Chu
Fix build warnings with make W=1 as below,
1.
>> drivers/scsi/ufs/ufs-mediatek.c:116:22: warning: format '%d' expects
>> argument of type 'int', but argument 4 has type 'long int'
2.
CC [M] drivers/scsi/ufs/ufs-mediatek.o
../drivers/scsi/ufs/ufs-mediatek.c:749: error: Cannot parse struct or union!
/** is used specifically with kernel-doc tool.
As a quick fix by removing dubious /** in the comment block of
struct ufs_hba_variant_ops ufs_hba_mtk_vops.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
---
drivers/scsi/ufs/ufs-mediatek.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index 1a9133ac6efb..3ec44dfa2567 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -113,7 +113,7 @@ static void ufs_mtk_init_reset_control(struct ufs_hba *hba,
{
*rc = devm_reset_control_get(hba->dev, str);
if (IS_ERR(*rc)) {
- dev_info(hba->dev, "Failed to get reset control %s: %d\n",
+ dev_info(hba->dev, "Failed to get reset control %s: %ld\n",
str, PTR_ERR(*rc));
*rc = NULL;
}
@@ -727,13 +727,13 @@ static void ufs_mtk_fixup_dev_quirks(struct ufs_hba *hba)
ufshcd_fixup_dev_quirks(hba, ufs_mtk_dev_fixups);
}
-/**
+/*
* struct ufs_hba_mtk_vops - UFS MTK specific variant operations
*
* The variant operations configure the necessary controller and PHY
* handshake during initialization.
*/
-static struct ufs_hba_variant_ops ufs_hba_mtk_vops = {
+static const struct ufs_hba_variant_ops ufs_hba_mtk_vops = {
.name = "mediatek.ufshci",
.init = ufs_mtk_init,
.setup_clocks = ufs_mtk_setup_clocks,
--
2.18.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] scsi: ufs-mediatek: Fix build warnings with make W=1
2020-09-10 1:37 [PATCH] scsi: ufs-mediatek: Fix build warnings with make W=1 Stanley Chu
@ 2020-09-10 2:13 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-09-10 2:13 UTC (permalink / raw)
To: Stanley Chu
Cc: linux-scsi, martin.petersen, avri.altman, alim.akhtar, jejb,
matthias.bgg, bvanassche, linux-mediatek, linux-arm-kernel,
linux-kernel, kuohong.wang, peter.wang, chun-hung.wu, andy.teng,
chaotian.jing, cc.chou
Stanley,
> Fix build warnings with make W=1 as below,
Applied to 5.10/scsi-staging. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-10 2:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 1:37 [PATCH] scsi: ufs-mediatek: Fix build warnings with make W=1 Stanley Chu
2020-09-10 2:13 ` 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®