From: Dan Carpenter <dan.carpenter@oracle.com>
To: blogic@openwrt.org
Cc: devel@driverdev.osuosl.org, NeilBrown <neil@brown.name>,
linux-mediatek@lists.infradead.org
Subject: [bug report] staging: mt7621-mmc: MIPS: ralink: add sdhci for mt7620a SoC
Date: Thu, 5 Apr 2018 14:56:54 +0300 [thread overview]
Message-ID: <20180405115654.GA6324@mwanda> (raw)
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
next reply other threads:[~2018-04-05 11:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 11:56 Dan Carpenter [this message]
2018-04-05 12:26 ` [bug report] staging: mt7621-mmc: MIPS: ralink: add sdhci for mt7620a SoC John Crispin
2018-04-05 16:46 ` Christian Lütke-Stetzkamp
-- strict thread matches above, loose matches on Subject: below --
2018-04-05 12:13 Dan Carpenter
2018-04-05 12:26 ` John Crispin
2018-04-05 16:39 ` Christian Lütke-Stetzkamp
2018-04-06 7:09 ` Dan Carpenter
2018-04-06 7:39 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180405115654.GA6324@mwanda \
--to=dan.carpenter@oracle.com \
--cc=blogic@openwrt.org \
--cc=devel@driverdev.osuosl.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=neil@brown.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.