CC: [email protected] CC: [email protected] TO: Krzysztof Kozlowski <[email protected]> CC: Ulf Hansson <[email protected]>
Hi Krzysztof, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: f55966571d5eb2876a11e48e798b4592fa1ffbb7 commit: 54d8454436a205682bd89d66d8d9eedbc8452d15 mmc: host: Enable compile testing of multiple drivers date: 10 months ago :::::: branch date: 21 hours ago :::::: commit date: 10 months ago config: openrisc-randconfig-m031-20210709 (attached as .config) compiler: or1k-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> New smatch warnings: drivers/mmc/host/sdhci-bcm-kona.c:251 sdhci_bcm_kona_probe() warn: missing error code 'ret' drivers/mmc/host/sdhci-sprd.c:607 sdhci_sprd_probe() warn: missing error code 'ret' Old smatch warnings: drivers/mmc/host/sdhci-sprd.c:390 sdhci_sprd_request_done() warn: inconsistent indenting vim +/ret +251 drivers/mmc/host/sdhci-bcm-kona.c 01ebea1b411aaf Christian Daudt 2013-06-20 213 058feb53666f8c Markus Mayer 2013-08-07 214 static int sdhci_bcm_kona_probe(struct platform_device *pdev) 01ebea1b411aaf Christian Daudt 2013-06-20 215 { 01ebea1b411aaf Christian Daudt 2013-06-20 216 struct sdhci_bcm_kona_dev *kona_dev = NULL; 01ebea1b411aaf Christian Daudt 2013-06-20 217 struct sdhci_pltfm_host *pltfm_priv; 01ebea1b411aaf Christian Daudt 2013-06-20 218 struct device *dev = &pdev->dev; 01ebea1b411aaf Christian Daudt 2013-06-20 219 struct sdhci_host *host; 01ebea1b411aaf Christian Daudt 2013-06-20 220 int ret; 01ebea1b411aaf Christian Daudt 2013-06-20 221 01ebea1b411aaf Christian Daudt 2013-06-20 222 ret = 0; 01ebea1b411aaf Christian Daudt 2013-06-20 223 01ebea1b411aaf Christian Daudt 2013-06-20 224 host = sdhci_pltfm_init(pdev, &sdhci_pltfm_data_kona, 01ebea1b411aaf Christian Daudt 2013-06-20 225 sizeof(*kona_dev)); 01ebea1b411aaf Christian Daudt 2013-06-20 226 if (IS_ERR(host)) 01ebea1b411aaf Christian Daudt 2013-06-20 227 return PTR_ERR(host); 01ebea1b411aaf Christian Daudt 2013-06-20 228 01ebea1b411aaf Christian Daudt 2013-06-20 229 dev_dbg(dev, "%s: inited. IOADDR=%p\n", __func__, host->ioaddr); 01ebea1b411aaf Christian Daudt 2013-06-20 230 01ebea1b411aaf Christian Daudt 2013-06-20 231 pltfm_priv = sdhci_priv(host); 01ebea1b411aaf Christian Daudt 2013-06-20 232 01ebea1b411aaf Christian Daudt 2013-06-20 233 kona_dev = sdhci_pltfm_priv(pltfm_priv); 01ebea1b411aaf Christian Daudt 2013-06-20 234 mutex_init(&kona_dev->write_lock); 01ebea1b411aaf Christian Daudt 2013-06-20 235 acfa77b1a95c61 Ulf Hansson 2014-12-18 236 ret = mmc_of_parse(host->mmc); acfa77b1a95c61 Ulf Hansson 2014-12-18 237 if (ret) acfa77b1a95c61 Ulf Hansson 2014-12-18 238 goto err_pltfm_free; 01ebea1b411aaf Christian Daudt 2013-06-20 239 01ebea1b411aaf Christian Daudt 2013-06-20 240 if (!host->mmc->f_max) { 01ebea1b411aaf Christian Daudt 2013-06-20 241 dev_err(&pdev->dev, "Missing max-freq for SDHCI cfg\n"); 01ebea1b411aaf Christian Daudt 2013-06-20 242 ret = -ENXIO; 01ebea1b411aaf Christian Daudt 2013-06-20 243 goto err_pltfm_free; 01ebea1b411aaf Christian Daudt 2013-06-20 244 } 01ebea1b411aaf Christian Daudt 2013-06-20 245 2290fcb341a07c Kevin Hao 2015-02-27 246 /* Get and enable the core clock */ 2290fcb341a07c Kevin Hao 2015-02-27 247 pltfm_priv->clk = devm_clk_get(dev, NULL); 2290fcb341a07c Kevin Hao 2015-02-27 248 if (IS_ERR(pltfm_priv->clk)) { 2290fcb341a07c Kevin Hao 2015-02-27 249 dev_err(dev, "Failed to get core clock\n"); 2290fcb341a07c Kevin Hao 2015-02-27 250 ret = PTR_ERR(pltfm_priv->clk); a6492c02073cd9 Tim Kryger 2013-12-05 @251 goto err_pltfm_free; a6492c02073cd9 Tim Kryger 2013-12-05 252 } a6492c02073cd9 Tim Kryger 2013-12-05 253 66fe6ac5d5e120 Wei Yongjun 2016-07-28 254 ret = clk_set_rate(pltfm_priv->clk, host->mmc->f_max); 66fe6ac5d5e120 Wei Yongjun 2016-07-28 255 if (ret) { 2290fcb341a07c Kevin Hao 2015-02-27 256 dev_err(dev, "Failed to set rate core clock\n"); a6492c02073cd9 Tim Kryger 2013-12-05 257 goto err_pltfm_free; a6492c02073cd9 Tim Kryger 2013-12-05 258 } a6492c02073cd9 Tim Kryger 2013-12-05 259 66fe6ac5d5e120 Wei Yongjun 2016-07-28 260 ret = clk_prepare_enable(pltfm_priv->clk); 66fe6ac5d5e120 Wei Yongjun 2016-07-28 261 if (ret) { 2290fcb341a07c Kevin Hao 2015-02-27 262 dev_err(dev, "Failed to enable core clock\n"); a6492c02073cd9 Tim Kryger 2013-12-05 263 goto err_pltfm_free; a6492c02073cd9 Tim Kryger 2013-12-05 264 } a6492c02073cd9 Tim Kryger 2013-12-05 265 01ebea1b411aaf Christian Daudt 2013-06-20 266 dev_dbg(dev, "non-removable=%c\n", 860951c5f0f5ca Jaehoon Chung 2016-06-21 267 mmc_card_is_removable(host->mmc) ? 'N' : 'Y'); 01ebea1b411aaf Christian Daudt 2013-06-20 268 dev_dbg(dev, "cd_gpio %c, wp_gpio %c\n", 01ebea1b411aaf Christian Daudt 2013-06-20 269 (mmc_gpio_get_cd(host->mmc) != -ENOSYS) ? 'Y' : 'N', 01ebea1b411aaf Christian Daudt 2013-06-20 270 (mmc_gpio_get_ro(host->mmc) != -ENOSYS) ? 'Y' : 'N'); 01ebea1b411aaf Christian Daudt 2013-06-20 271 860951c5f0f5ca Jaehoon Chung 2016-06-21 272 if (!mmc_card_is_removable(host->mmc)) 01ebea1b411aaf Christian Daudt 2013-06-20 273 host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION; 01ebea1b411aaf Christian Daudt 2013-06-20 274 01ebea1b411aaf Christian Daudt 2013-06-20 275 dev_dbg(dev, "is_8bit=%c\n", 28804293b90861 Javier Martinez Canillas 2015-09-16 276 (host->mmc->caps & MMC_CAP_8_BIT_DATA) ? 'Y' : 'N'); 01ebea1b411aaf Christian Daudt 2013-06-20 277 01ebea1b411aaf Christian Daudt 2013-06-20 278 ret = sdhci_bcm_kona_sd_reset(host); 01ebea1b411aaf Christian Daudt 2013-06-20 279 if (ret) a6492c02073cd9 Tim Kryger 2013-12-05 280 goto err_clk_disable; 01ebea1b411aaf Christian Daudt 2013-06-20 281 01ebea1b411aaf Christian Daudt 2013-06-20 282 sdhci_bcm_kona_sd_init(host); 01ebea1b411aaf Christian Daudt 2013-06-20 283 01ebea1b411aaf Christian Daudt 2013-06-20 284 ret = sdhci_add_host(host); fb8617e1ee4d40 Jisheng Zhang 2018-05-25 285 if (ret) 01ebea1b411aaf Christian Daudt 2013-06-20 286 goto err_reset; 01ebea1b411aaf Christian Daudt 2013-06-20 287 01ebea1b411aaf Christian Daudt 2013-06-20 288 /* if device is eMMC, emulate card insert right here */ 860951c5f0f5ca Jaehoon Chung 2016-06-21 289 if (!mmc_card_is_removable(host->mmc)) { 01ebea1b411aaf Christian Daudt 2013-06-20 290 ret = sdhci_bcm_kona_sd_card_emulate(host, 1); 01ebea1b411aaf Christian Daudt 2013-06-20 291 if (ret) { 01ebea1b411aaf Christian Daudt 2013-06-20 292 dev_err(dev, 01ebea1b411aaf Christian Daudt 2013-06-20 293 "unable to emulate card insertion\n"); 01ebea1b411aaf Christian Daudt 2013-06-20 294 goto err_remove_host; 01ebea1b411aaf Christian Daudt 2013-06-20 295 } 01ebea1b411aaf Christian Daudt 2013-06-20 296 } 01ebea1b411aaf Christian Daudt 2013-06-20 297 /* 01ebea1b411aaf Christian Daudt 2013-06-20 298 * Since the card detection GPIO interrupt is configured to be 01ebea1b411aaf Christian Daudt 2013-06-20 299 * edge sensitive, check the initial GPIO value here, emulate 01ebea1b411aaf Christian Daudt 2013-06-20 300 * only if the card is present 01ebea1b411aaf Christian Daudt 2013-06-20 301 */ 01ebea1b411aaf Christian Daudt 2013-06-20 302 if (mmc_gpio_get_cd(host->mmc) > 0) 01ebea1b411aaf Christian Daudt 2013-06-20 303 sdhci_bcm_kona_sd_card_emulate(host, 1); 01ebea1b411aaf Christian Daudt 2013-06-20 304 01ebea1b411aaf Christian Daudt 2013-06-20 305 dev_dbg(dev, "initialized properly\n"); 01ebea1b411aaf Christian Daudt 2013-06-20 306 return 0; 01ebea1b411aaf Christian Daudt 2013-06-20 307 01ebea1b411aaf Christian Daudt 2013-06-20 308 err_remove_host: 01ebea1b411aaf Christian Daudt 2013-06-20 309 sdhci_remove_host(host, 0); 01ebea1b411aaf Christian Daudt 2013-06-20 310 01ebea1b411aaf Christian Daudt 2013-06-20 311 err_reset: 01ebea1b411aaf Christian Daudt 2013-06-20 312 sdhci_bcm_kona_sd_reset(host); 01ebea1b411aaf Christian Daudt 2013-06-20 313 a6492c02073cd9 Tim Kryger 2013-12-05 314 err_clk_disable: 2290fcb341a07c Kevin Hao 2015-02-27 315 clk_disable_unprepare(pltfm_priv->clk); a6492c02073cd9 Tim Kryger 2013-12-05 316 01ebea1b411aaf Christian Daudt 2013-06-20 317 err_pltfm_free: 01ebea1b411aaf Christian Daudt 2013-06-20 318 sdhci_pltfm_free(pdev); 01ebea1b411aaf Christian Daudt 2013-06-20 319 01ebea1b411aaf Christian Daudt 2013-06-20 320 dev_err(dev, "Probing of sdhci-pltfm failed: %d\n", ret); 01ebea1b411aaf Christian Daudt 2013-06-20 321 return ret; 01ebea1b411aaf Christian Daudt 2013-06-20 322 } 01ebea1b411aaf Christian Daudt 2013-06-20 323 :::::: The code at line 251 was first introduced by commit :::::: a6492c02073cd966ae490c1afcdebdd0d5ba3d81 mmc: sdhci-bcm-kona: Add basic use of clocks :::::: TO: Tim Kryger <[email protected]> :::::: CC: Chris Ball <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
