Message ID | 20230112022416.8474-6-doug@schmorgal.com |
---|---|
State | Superseded |
Headers | show |
Series | mmc: sdhci-pxav2: Add support for PXA168 | expand |
Hi Doug, https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Doug-Brown/mmc-sdhci-pxav2-add-initial-support-for-PXA168-V1-controller/20230112-102921 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next patch link: https://lore.kernel.org/r/20230112022416.8474-6-doug%40schmorgal.com patch subject: [PATCH v4 5/8] mmc: sdhci-pxav2: add optional core clock config: riscv-randconfig-m041-20230113 compiler: riscv64-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Reported-by: Dan Carpenter <error27@gmail.com> smatch warnings: drivers/mmc/host/sdhci-pxav2.c:220 sdhci_pxav2_probe() warn: missing error code 'ret' vim +/ret +220 drivers/mmc/host/sdhci-pxav2.c c3be1efd41a97f Bill Pemberton 2012-11-19 185 static int sdhci_pxav2_probe(struct platform_device *pdev) 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 186 { 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 187 struct sdhci_pltfm_host *pltfm_host; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 188 struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 189 struct device *dev = &pdev->dev; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 190 struct sdhci_host *host = NULL; 568536d7eb1969 Doug Brown 2023-01-11 191 const struct sdhci_pxa_variant *variant; b650352dd3df36 Chris Ball 2012-04-10 192 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 193 int ret; d8981da5ec7505 Doug Brown 2023-01-11 194 struct clk *clk, *clk_core; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 195 0e748234293f5f Christian Daudt 2013-05-29 196 host = sdhci_pltfm_init(pdev, NULL, 0); 6a686c31324c9e Sebastian Hesselbarth 2014-10-21 197 if (IS_ERR(host)) 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 198 return PTR_ERR(host); 6a686c31324c9e Sebastian Hesselbarth 2014-10-21 199 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 200 pltfm_host = sdhci_priv(host); 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 201 edf4ccd94bbef1 Doug Brown 2023-01-11 202 clk = devm_clk_get(dev, "io"); edf4ccd94bbef1 Doug Brown 2023-01-11 203 if (IS_ERR(clk) && PTR_ERR(clk) != -EPROBE_DEFER) edf4ccd94bbef1 Doug Brown 2023-01-11 204 clk = devm_clk_get(dev, NULL); 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 205 if (IS_ERR(clk)) { 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 206 ret = PTR_ERR(clk); edf4ccd94bbef1 Doug Brown 2023-01-11 207 dev_err_probe(dev, ret, "failed to get io clock\n"); 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 208 goto free; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 209 } 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 210 pltfm_host->clk = clk; 21b22284619bbb Alexey Khoroshilov 2017-02-11 211 ret = clk_prepare_enable(clk); 21b22284619bbb Alexey Khoroshilov 2017-02-11 212 if (ret) { edf4ccd94bbef1 Doug Brown 2023-01-11 213 dev_err(dev, "failed to enable io clock\n"); 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 214 goto free; 21b22284619bbb Alexey Khoroshilov 2017-02-11 215 } 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 216 d8981da5ec7505 Doug Brown 2023-01-11 217 clk_core = devm_clk_get_optional_enabled(dev, "core"); d8981da5ec7505 Doug Brown 2023-01-11 218 if (IS_ERR(clk_core)) { d8981da5ec7505 Doug Brown 2023-01-11 219 dev_err_probe(dev, PTR_ERR(clk_core), "failed to enable core clock\n"); d8981da5ec7505 Doug Brown 2023-01-11 @220 goto disable_clk; ret = PTR_ERR(clk_core); d8981da5ec7505 Doug Brown 2023-01-11 221 } d8981da5ec7505 Doug Brown 2023-01-11 222 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 223 host->quirks = SDHCI_QUIRK_BROKEN_ADMA 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 224 | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 225 | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 226 568536d7eb1969 Doug Brown 2023-01-11 227 variant = of_device_get_match_data(dev); 568536d7eb1969 Doug Brown 2023-01-11 228 if (variant) b650352dd3df36 Chris Ball 2012-04-10 229 pdata = pxav2_get_mmc_pdata(dev); 568536d7eb1969 Doug Brown 2023-01-11 230 else 568536d7eb1969 Doug Brown 2023-01-11 231 variant = &pxav2_variant; 568536d7eb1969 Doug Brown 2023-01-11 232 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 233 if (pdata) { 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 234 if (pdata->flags & PXA_FLAG_CARD_PERMANENT) { 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 235 /* on-chip device */ 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 236 host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 237 host->mmc->caps |= MMC_CAP_NONREMOVABLE; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 238 } 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 239 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 240 /* If slot design supports 8 bit data, indicate this to MMC. */ 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 241 if (pdata->flags & PXA_FLAG_SD_8_BIT_CAPABLE_SLOT) 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 242 host->mmc->caps |= MMC_CAP_8_BIT_DATA; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 243 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 244 if (pdata->quirks) 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 245 host->quirks |= pdata->quirks; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 246 if (pdata->host_caps) 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 247 host->mmc->caps |= pdata->host_caps; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 248 if (pdata->pm_caps) 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 249 host->mmc->pm_caps |= pdata->pm_caps; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 250 } 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 251 568536d7eb1969 Doug Brown 2023-01-11 252 host->quirks |= variant->extra_quirks; 568536d7eb1969 Doug Brown 2023-01-11 253 host->ops = variant->ops; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 254 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 255 ret = sdhci_add_host(host); fb8617e1ee4d40 Jisheng Zhang 2018-05-25 256 if (ret) 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 257 goto disable_clk; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 258 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 259 return 0; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 260 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 261 disable_clk: 164378efe7612a Chao Xie 2012-07-31 262 clk_disable_unprepare(clk); 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 263 free: 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 264 sdhci_pltfm_free(pdev); 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 265 return ret; 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 266 }
Hi Dan, On 1/14/2023 12:01 AM, Dan Carpenter wrote: > Hi Doug, > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Doug-Brown/mmc-sdhci-pxav2-add-initial-support-for-PXA168-V1-controller/20230112-102921 > base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next > patch link: https://lore.kernel.org/r/20230112022416.8474-6-doug%40schmorgal.com > patch subject: [PATCH v4 5/8] mmc: sdhci-pxav2: add optional core clock > config: riscv-randconfig-m041-20230113 > compiler: riscv64-linux-gcc (GCC) 12.1.0 > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@intel.com> > | Reported-by: Dan Carpenter <error27@gmail.com> > > smatch warnings: > drivers/mmc/host/sdhci-pxav2.c:220 sdhci_pxav2_probe() warn: missing error code 'ret' Thanks for passing this on. I definitely forgot an assignment to ret. Since this is correcting an error in my patch that hasn't been accepted yet, is it safe to assume I should omit those Reported-by tags from the next version of my patch, since they don't apply to the patch itself? > > vim +/ret +220 drivers/mmc/host/sdhci-pxav2.c > > c3be1efd41a97f Bill Pemberton 2012-11-19 185 static int sdhci_pxav2_probe(struct platform_device *pdev) > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 186 { > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 187 struct sdhci_pltfm_host *pltfm_host; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 188 struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 189 struct device *dev = &pdev->dev; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 190 struct sdhci_host *host = NULL; > 568536d7eb1969 Doug Brown 2023-01-11 191 const struct sdhci_pxa_variant *variant; > b650352dd3df36 Chris Ball 2012-04-10 192 > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 193 int ret; > d8981da5ec7505 Doug Brown 2023-01-11 194 struct clk *clk, *clk_core; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 195 > 0e748234293f5f Christian Daudt 2013-05-29 196 host = sdhci_pltfm_init(pdev, NULL, 0); > 6a686c31324c9e Sebastian Hesselbarth 2014-10-21 197 if (IS_ERR(host)) > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 198 return PTR_ERR(host); > 6a686c31324c9e Sebastian Hesselbarth 2014-10-21 199 > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 200 pltfm_host = sdhci_priv(host); > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 201 > edf4ccd94bbef1 Doug Brown 2023-01-11 202 clk = devm_clk_get(dev, "io"); > edf4ccd94bbef1 Doug Brown 2023-01-11 203 if (IS_ERR(clk) && PTR_ERR(clk) != -EPROBE_DEFER) > edf4ccd94bbef1 Doug Brown 2023-01-11 204 clk = devm_clk_get(dev, NULL); > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 205 if (IS_ERR(clk)) { > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 206 ret = PTR_ERR(clk); > edf4ccd94bbef1 Doug Brown 2023-01-11 207 dev_err_probe(dev, ret, "failed to get io clock\n"); > 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 208 goto free; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 209 } > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 210 pltfm_host->clk = clk; > 21b22284619bbb Alexey Khoroshilov 2017-02-11 211 ret = clk_prepare_enable(clk); > 21b22284619bbb Alexey Khoroshilov 2017-02-11 212 if (ret) { > edf4ccd94bbef1 Doug Brown 2023-01-11 213 dev_err(dev, "failed to enable io clock\n"); > 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 214 goto free; > 21b22284619bbb Alexey Khoroshilov 2017-02-11 215 } > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 216 > d8981da5ec7505 Doug Brown 2023-01-11 217 clk_core = devm_clk_get_optional_enabled(dev, "core"); > d8981da5ec7505 Doug Brown 2023-01-11 218 if (IS_ERR(clk_core)) { > d8981da5ec7505 Doug Brown 2023-01-11 219 dev_err_probe(dev, PTR_ERR(clk_core), "failed to enable core clock\n"); > d8981da5ec7505 Doug Brown 2023-01-11 @220 goto disable_clk; > > ret = PTR_ERR(clk_core); > > d8981da5ec7505 Doug Brown 2023-01-11 221 } > d8981da5ec7505 Doug Brown 2023-01-11 222 > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 223 host->quirks = SDHCI_QUIRK_BROKEN_ADMA > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 224 | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 225 | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 226 > 568536d7eb1969 Doug Brown 2023-01-11 227 variant = of_device_get_match_data(dev); > 568536d7eb1969 Doug Brown 2023-01-11 228 if (variant) > b650352dd3df36 Chris Ball 2012-04-10 229 pdata = pxav2_get_mmc_pdata(dev); > 568536d7eb1969 Doug Brown 2023-01-11 230 else > 568536d7eb1969 Doug Brown 2023-01-11 231 variant = &pxav2_variant; > 568536d7eb1969 Doug Brown 2023-01-11 232 > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 233 if (pdata) { > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 234 if (pdata->flags & PXA_FLAG_CARD_PERMANENT) { > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 235 /* on-chip device */ > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 236 host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 237 host->mmc->caps |= MMC_CAP_NONREMOVABLE; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 238 } > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 239 > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 240 /* If slot design supports 8 bit data, indicate this to MMC. */ > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 241 if (pdata->flags & PXA_FLAG_SD_8_BIT_CAPABLE_SLOT) > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 242 host->mmc->caps |= MMC_CAP_8_BIT_DATA; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 243 > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 244 if (pdata->quirks) > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 245 host->quirks |= pdata->quirks; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 246 if (pdata->host_caps) > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 247 host->mmc->caps |= pdata->host_caps; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 248 if (pdata->pm_caps) > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 249 host->mmc->pm_caps |= pdata->pm_caps; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 250 } > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 251 > 568536d7eb1969 Doug Brown 2023-01-11 252 host->quirks |= variant->extra_quirks; > 568536d7eb1969 Doug Brown 2023-01-11 253 host->ops = variant->ops; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 254 > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 255 ret = sdhci_add_host(host); > fb8617e1ee4d40 Jisheng Zhang 2018-05-25 256 if (ret) > 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 257 goto disable_clk; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 258 > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 259 return 0; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 260 > 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 261 disable_clk: > 164378efe7612a Chao Xie 2012-07-31 262 clk_disable_unprepare(clk); > 3fd1d86f03cbcc Masahiro Yamada 2017-08-23 263 free: > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 264 sdhci_pltfm_free(pdev); > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 265 return ret; > 9f5d71e4a78a02 Zhangfei Gao 2011-06-08 266 } >
On Sat, Jan 14, 2023 at 02:49:07PM -0800, Doug Brown wrote: > Hi Dan, > > On 1/14/2023 12:01 AM, Dan Carpenter wrote: > > Hi Doug, > > > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > > > url: https://github.com/intel-lab-lkp/linux/commits/Doug-Brown/mmc-sdhci-pxav2-add-initial-support-for-PXA168-V1-controller/20230112-102921 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next > > patch link: https://lore.kernel.org/r/20230112022416.8474-6-doug%40schmorgal.com > > patch subject: [PATCH v4 5/8] mmc: sdhci-pxav2: add optional core clock > > config: riscv-randconfig-m041-20230113 > > compiler: riscv64-linux-gcc (GCC) 12.1.0 > > > > If you fix the issue, kindly add following tag where applicable > > | Reported-by: kernel test robot <lkp@intel.com> > > | Reported-by: Dan Carpenter <error27@gmail.com> > > > > smatch warnings: > > drivers/mmc/host/sdhci-pxav2.c:220 sdhci_pxav2_probe() warn: missing error code 'ret' > > Thanks for passing this on. I definitely forgot an assignment to ret. > Since this is correcting an error in my patch that hasn't been accepted > yet, is it safe to assume I should omit those Reported-by tags from the > next version of my patch, since they don't apply to the patch itself? > These emails are from the kbuild team and not from me. I just look them over and hit the forward button. I'm sure it helps the kbuild team in their marketing when people use the tags... Right now I'm applying to jobs outside the Linux community so the tags give me a measurable thing to say I've helped fix thousands of bugs or whatever... I've always argued that there should be a different Fixes-from: tag for people who find bugs during review (as opposed to just complaining about white space which is its own reward and I do that for free). So far I haven't convinced anyone on this though. Anyway, there isn't a policy one way or the other. Some people add them and some don't. Some people add them below the --- cut off line, but I don't know if that's deliberate or what the story is there. That seems like it might be a good compromise. regards, dan carpenter
On 16/01/2023 10:02, Dan Carpenter wrote: > On Sat, Jan 14, 2023 at 02:49:07PM -0800, Doug Brown wrote: >> Hi Dan, >> >> On 1/14/2023 12:01 AM, Dan Carpenter wrote: >>> Hi Doug, >>> >>> https://git-scm.com/docs/git-format-patch#_base_tree_information] >>> >>> url: https://github.com/intel-lab-lkp/linux/commits/Doug-Brown/mmc-sdhci-pxav2-add-initial-support-for-PXA168-V1-controller/20230112-102921 >>> base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next >>> patch link: https://lore.kernel.org/r/20230112022416.8474-6-doug%40schmorgal.com >>> patch subject: [PATCH v4 5/8] mmc: sdhci-pxav2: add optional core clock >>> config: riscv-randconfig-m041-20230113 >>> compiler: riscv64-linux-gcc (GCC) 12.1.0 >>> >>> If you fix the issue, kindly add following tag where applicable >>> | Reported-by: kernel test robot <lkp@intel.com> >>> | Reported-by: Dan Carpenter <error27@gmail.com> >>> >>> smatch warnings: >>> drivers/mmc/host/sdhci-pxav2.c:220 sdhci_pxav2_probe() warn: missing error code 'ret' >> >> Thanks for passing this on. I definitely forgot an assignment to ret. >> Since this is correcting an error in my patch that hasn't been accepted >> yet, is it safe to assume I should omit those Reported-by tags from the >> next version of my patch, since they don't apply to the patch itself? >> > > These emails are from the kbuild team and not from me. I just look them > over and hit the forward button. I'm sure it helps the kbuild team in > their marketing when people use the tags... Right now I'm applying to > jobs outside the Linux community so the tags give me a measurable thing > to say I've helped fix thousands of bugs or whatever... > > I've always argued that there should be a different Fixes-from: tag for > people who find bugs during review (as opposed to just complaining about > white space which is its own reward and I do that for free). So far I > haven't convinced anyone on this though. Oh, I am in. This is considerable effort to find bugs on the mailing lists or in linux-next. Even if it is pure bisect and test, it's a lot of time. If it is not credited, we loose some valuable feedback and incentives. Best regards, Krzysztof
On 1/16/2023 1:02 AM, Dan Carpenter wrote: > On Sat, Jan 14, 2023 at 02:49:07PM -0800, Doug Brown wrote: >> Hi Dan, >> >> On 1/14/2023 12:01 AM, Dan Carpenter wrote: >>> Hi Doug, >>> >>> https://git-scm.com/docs/git-format-patch#_base_tree_information] >>> >>> url: https://github.com/intel-lab-lkp/linux/commits/Doug-Brown/mmc-sdhci-pxav2-add-initial-support-for-PXA168-V1-controller/20230112-102921 >>> base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next >>> patch link: https://lore.kernel.org/r/20230112022416.8474-6-doug%40schmorgal.com >>> patch subject: [PATCH v4 5/8] mmc: sdhci-pxav2: add optional core clock >>> config: riscv-randconfig-m041-20230113 >>> compiler: riscv64-linux-gcc (GCC) 12.1.0 >>> >>> If you fix the issue, kindly add following tag where applicable >>> | Reported-by: kernel test robot <lkp@intel.com> >>> | Reported-by: Dan Carpenter <error27@gmail.com> >>> >>> smatch warnings: >>> drivers/mmc/host/sdhci-pxav2.c:220 sdhci_pxav2_probe() warn: missing error code 'ret' >> >> Thanks for passing this on. I definitely forgot an assignment to ret. >> Since this is correcting an error in my patch that hasn't been accepted >> yet, is it safe to assume I should omit those Reported-by tags from the >> next version of my patch, since they don't apply to the patch itself? >> > > These emails are from the kbuild team and not from me. I just look them > over and hit the forward button. I'm sure it helps the kbuild team in > their marketing when people use the tags... Right now I'm applying to > jobs outside the Linux community so the tags give me a measurable thing > to say I've helped fix thousands of bugs or whatever... > > I've always argued that there should be a different Fixes-from: tag for > people who find bugs during review (as opposed to just complaining about > white space which is its own reward and I do that for free). So far I > haven't convinced anyone on this though. > > Anyway, there isn't a policy one way or the other. Some people add > them and some don't. Some people add them below the --- cut off line, > but I don't know if that's deliberate or what the story is there. That > seems like it might be a good compromise. Thanks for all the added context. I knew you had forwarded it from the kbuild team but I wasn't sure who to ask for clarification. Your idea for a future Fixes-from: tag for this type of thing makes perfect sense. For now, it seems that if the git log might be used for obtaining metrics, I should just go ahead and put the Reported-by: tags in. I really appreciate that you took the time to explain this to me.
diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index f5c86e1ba734..b10f55b478fc 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c @@ -191,7 +191,7 @@ static int sdhci_pxav2_probe(struct platform_device *pdev) const struct sdhci_pxa_variant *variant; int ret; - struct clk *clk; + struct clk *clk, *clk_core; host = sdhci_pltfm_init(pdev, NULL, 0); if (IS_ERR(host)) @@ -214,6 +214,12 @@ static int sdhci_pxav2_probe(struct platform_device *pdev) goto free; } + clk_core = devm_clk_get_optional_enabled(dev, "core"); + if (IS_ERR(clk_core)) { + dev_err_probe(dev, PTR_ERR(clk_core), "failed to enable core clock\n"); + goto disable_clk; + } + host->quirks = SDHCI_QUIRK_BROKEN_ADMA | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN;