[bug report] staging: mt7621-mmc: MIPS: ralink: add sdhci for mt7620a SoC

John Crispin john at phrozen.org
Thu Apr 5 05:26:17 PDT 2018


Hi Dan,

I explained why I think this should not be merged, i do not plan to fix 
any issues, please send all maintenance requests towards NeilBrown.

And .. it was merged it with an out dated defunct mail addr of mine.

     John



On 05/04/18 13:56, Dan Carpenter wrote:
> Hello John Crispin,
>
> The patch 8b634a9c7620: "staging: mt7621-mmc: MIPS: ralink: add sdhci
> for mt7620a SoC" from Mar 15, 2018, leads to the following static
> checker warning:
>
> 	drivers/staging/mt7621-mmc/sd.c:2790 msdc_drv_probe()
> 	warn: curly braces intended?
>
> drivers/staging/mt7621-mmc/sd.c
>    2777      /* For sd card: MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED,
>    2778         For sdio   : MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED */
>    2779      if (hw->flags & MSDC_HIGHSPEED) {
>    2780          mmc->caps   = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
>    2781      }
>    2782      if (hw->data_pins == 4) { /* current data_pins are all 4*/
>    2783          mmc->caps  |= MMC_CAP_4_BIT_DATA;
>    2784      } else if (hw->data_pins == 8) {
>    2785          mmc->caps  |= MMC_CAP_8_BIT_DATA;
>    2786      }
>    2787      if ((hw->flags & MSDC_SDIO_IRQ) || (hw->flags & MSDC_EXT_SDIO_IRQ))
>
> Are curly braces intended for this if statement?
>
>    2788          mmc->caps |= MMC_CAP_SDIO_IRQ;  /* yes for sdio */
>    2789
>    2790          cd_active_low = !of_property_read_bool(pdev->dev.of_node, "mediatek,cd-high");
>    2791          mtk_sw_poll = of_property_read_bool(pdev->dev.of_node, "mediatek,cd-poll");
>    2792
>    2793          if (mtk_sw_poll)
>    2794                  mmc->caps |= MMC_CAP_NEEDS_POLL;
>
> because the indenting seems to say that the braces should reach up to
> here.
>
>    2795
>    2796      /* MMC core transfer sizes tunable parameters */
>    2797  #if LINUX_VERSION_CODE > KERNEL_VERSION(3,10,0)
>    2798      mmc->max_segs      = MAX_HW_SGMTS;
>    2799  #else
>    2800      mmc->max_hw_segs   = MAX_HW_SGMTS;
>    2801      mmc->max_phys_segs = MAX_PHY_SGMTS;
>    2802  #endif
>
>
> regards,
> dan carpenter
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek




More information about the Linux-mediatek mailing list