scsi: ufs: ufs-mediatek: Fix build warnings with make W=1
authorStanley Chu <stanley.chu@mediatek.com>
Thu, 10 Sep 2020 01:37:56 +0000 (09:37 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 10 Sep 2020 02:08:46 +0000 (22:08 -0400)
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.

Link: https://lore.kernel.org/r/20200910013756.11385-1-stanley.chu@mediatek.com
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-mediatek.c

index 1a9133a..3ec44df 100644 (file)
@@ -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,