Re: [PATCH 2/4] Bluetooth: btintel: Add helper functions to dump boot/firmware info
by kernel test robot
Hi Kiran,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on v5.7 next-20200611]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kiran-K/Add-support-for-new-gene...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/bluetooth/btintel.c:229:6: warning: no previous prototype for function 'btintel_boot_info' [-Wmissing-prototypes]
void btintel_boot_info(struct hci_dev *hdev,
^
drivers/bluetooth/btintel.c:229:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void btintel_boot_info(struct hci_dev *hdev,
^
static
>> drivers/bluetooth/btintel.c:252:6: warning: no previous prototype for function 'btintel_boot_info_tlv' [-Wmissing-prototypes]
void btintel_boot_info_tlv(struct hci_dev *hdev,
^
drivers/bluetooth/btintel.c:252:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void btintel_boot_info_tlv(struct hci_dev *hdev,
^
static
2 warnings generated.
vim +/btintel_boot_info +229 drivers/bluetooth/btintel.c
228
> 229 void btintel_boot_info(struct hci_dev *hdev,
230 struct intel_version_tlv *ver)
231 {
232 const char *variant;
233
234 switch (ver->img_type) {
235 case 0x01:
236 variant = "Bootloader";
237 break;
238 case 0x03:
239 variant = "Firmware";
240 break;
241 default:
242 bt_dev_err(hdev, "Unsupported image type %x", ver->img_type);
243 return;
244 }
245
246 bt_dev_info(hdev, "%s timestamp %u.%u buildtype %u build %u",
247 variant, 2000 + (ver->timestamp >> 8),
248 ver->timestamp & 0xff, ver->build_type, ver->build_num);
249 }
250 EXPORT_SYMBOL_GPL(btintel_boot_info);
251
> 252 void btintel_boot_info_tlv(struct hci_dev *hdev,
253 struct intel_version_tlv *ver)
254 {
255 bt_dev_info(hdev, "Device revision is %u",
256 ver->dev_rev_id);
257
258 bt_dev_info(hdev, "Secure boot is %s",
259 ver->secure_boot ? "enabled" : "disabled");
260
261 bt_dev_info(hdev, "OTP lock is %s",
262 ver->otp_lock ? "enabled" : "disabled");
263
264 bt_dev_info(hdev, "API lock is %s",
265 ver->api_lock ? "enabled" : "disabled");
266
267 bt_dev_info(hdev, "Debug lock is %s",
268 ver->debug_lock ? "enabled" : "disabled");
269
270 bt_dev_info(hdev, "Minimum firmware build %u week %u %u",
271 ver->min_fw_build_nn, ver->min_fw_build_cw,
272 2000 + ver->min_fw_build_yy);
273 }
274 EXPORT_SYMBOL_GPL(btintel_boot_info_tlv);
275
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] crypto: algapi - Remove skbuff.h inclusion
by kernel test robot
Hi Herbert,
I love your patch! Yet something to improve:
[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master rockchip/for-next v5.7 next-20200611]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Herbert-Xu/crypto-algapi-Remove-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/crypto/qcom-rng.c: In function 'qcom_rng_read':
>> drivers/crypto/qcom-rng.c:48:9: error: implicit declaration of function 'readl_relaxed' [-Werror=implicit-function-declaration]
48 | val = readl_relaxed(rng->base + PRNG_STATUS);
| ^~~~~~~~~~~~~
drivers/crypto/qcom-rng.c: In function 'qcom_rng_enable':
>> drivers/crypto/qcom-rng.c:115:2: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration]
115 | writel(val, rng->base + PRNG_LFSR_CFG);
| ^~~~~~
cc1: some warnings being treated as errors
vim +/readl_relaxed +48 drivers/crypto/qcom-rng.c
ceec5f5b59882b Vinod Koul 2018-07-16 40
ceec5f5b59882b Vinod Koul 2018-07-16 41 static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max)
ceec5f5b59882b Vinod Koul 2018-07-16 42 {
ceec5f5b59882b Vinod Koul 2018-07-16 43 unsigned int currsize = 0;
ceec5f5b59882b Vinod Koul 2018-07-16 44 u32 val;
ceec5f5b59882b Vinod Koul 2018-07-16 45
ceec5f5b59882b Vinod Koul 2018-07-16 46 /* read random data from hardware */
ceec5f5b59882b Vinod Koul 2018-07-16 47 do {
ceec5f5b59882b Vinod Koul 2018-07-16 @48 val = readl_relaxed(rng->base + PRNG_STATUS);
ceec5f5b59882b Vinod Koul 2018-07-16 49 if (!(val & PRNG_STATUS_DATA_AVAIL))
ceec5f5b59882b Vinod Koul 2018-07-16 50 break;
ceec5f5b59882b Vinod Koul 2018-07-16 51
ceec5f5b59882b Vinod Koul 2018-07-16 52 val = readl_relaxed(rng->base + PRNG_DATA_OUT);
ceec5f5b59882b Vinod Koul 2018-07-16 53 if (!val)
ceec5f5b59882b Vinod Koul 2018-07-16 54 break;
ceec5f5b59882b Vinod Koul 2018-07-16 55
ceec5f5b59882b Vinod Koul 2018-07-16 56 if ((max - currsize) >= WORD_SZ) {
ceec5f5b59882b Vinod Koul 2018-07-16 57 memcpy(data, &val, WORD_SZ);
ceec5f5b59882b Vinod Koul 2018-07-16 58 data += WORD_SZ;
ceec5f5b59882b Vinod Koul 2018-07-16 59 currsize += WORD_SZ;
ceec5f5b59882b Vinod Koul 2018-07-16 60 } else {
ceec5f5b59882b Vinod Koul 2018-07-16 61 /* copy only remaining bytes */
ceec5f5b59882b Vinod Koul 2018-07-16 62 memcpy(data, &val, max - currsize);
ceec5f5b59882b Vinod Koul 2018-07-16 63 break;
ceec5f5b59882b Vinod Koul 2018-07-16 64 }
ceec5f5b59882b Vinod Koul 2018-07-16 65 } while (currsize < max);
ceec5f5b59882b Vinod Koul 2018-07-16 66
ceec5f5b59882b Vinod Koul 2018-07-16 67 return currsize;
ceec5f5b59882b Vinod Koul 2018-07-16 68 }
ceec5f5b59882b Vinod Koul 2018-07-16 69
ceec5f5b59882b Vinod Koul 2018-07-16 70 static int qcom_rng_generate(struct crypto_rng *tfm,
ceec5f5b59882b Vinod Koul 2018-07-16 71 const u8 *src, unsigned int slen,
ceec5f5b59882b Vinod Koul 2018-07-16 72 u8 *dstn, unsigned int dlen)
ceec5f5b59882b Vinod Koul 2018-07-16 73 {
ceec5f5b59882b Vinod Koul 2018-07-16 74 struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
ceec5f5b59882b Vinod Koul 2018-07-16 75 struct qcom_rng *rng = ctx->rng;
ceec5f5b59882b Vinod Koul 2018-07-16 76 int ret;
ceec5f5b59882b Vinod Koul 2018-07-16 77
ceec5f5b59882b Vinod Koul 2018-07-16 78 ret = clk_prepare_enable(rng->clk);
ceec5f5b59882b Vinod Koul 2018-07-16 79 if (ret)
ceec5f5b59882b Vinod Koul 2018-07-16 80 return ret;
ceec5f5b59882b Vinod Koul 2018-07-16 81
ceec5f5b59882b Vinod Koul 2018-07-16 82 mutex_lock(&rng->lock);
ceec5f5b59882b Vinod Koul 2018-07-16 83
ceec5f5b59882b Vinod Koul 2018-07-16 84 ret = qcom_rng_read(rng, dstn, dlen);
ceec5f5b59882b Vinod Koul 2018-07-16 85
ceec5f5b59882b Vinod Koul 2018-07-16 86 mutex_unlock(&rng->lock);
ceec5f5b59882b Vinod Koul 2018-07-16 87 clk_disable_unprepare(rng->clk);
ceec5f5b59882b Vinod Koul 2018-07-16 88
ceec5f5b59882b Vinod Koul 2018-07-16 89 return 0;
ceec5f5b59882b Vinod Koul 2018-07-16 90 }
ceec5f5b59882b Vinod Koul 2018-07-16 91
ceec5f5b59882b Vinod Koul 2018-07-16 92 static int qcom_rng_seed(struct crypto_rng *tfm, const u8 *seed,
ceec5f5b59882b Vinod Koul 2018-07-16 93 unsigned int slen)
ceec5f5b59882b Vinod Koul 2018-07-16 94 {
ceec5f5b59882b Vinod Koul 2018-07-16 95 return 0;
ceec5f5b59882b Vinod Koul 2018-07-16 96 }
ceec5f5b59882b Vinod Koul 2018-07-16 97
ceec5f5b59882b Vinod Koul 2018-07-16 98 static int qcom_rng_enable(struct qcom_rng *rng)
ceec5f5b59882b Vinod Koul 2018-07-16 99 {
ceec5f5b59882b Vinod Koul 2018-07-16 100 u32 val;
ceec5f5b59882b Vinod Koul 2018-07-16 101 int ret;
ceec5f5b59882b Vinod Koul 2018-07-16 102
ceec5f5b59882b Vinod Koul 2018-07-16 103 ret = clk_prepare_enable(rng->clk);
ceec5f5b59882b Vinod Koul 2018-07-16 104 if (ret)
ceec5f5b59882b Vinod Koul 2018-07-16 105 return ret;
ceec5f5b59882b Vinod Koul 2018-07-16 106
ceec5f5b59882b Vinod Koul 2018-07-16 107 /* Enable PRNG only if it is not already enabled */
ceec5f5b59882b Vinod Koul 2018-07-16 108 val = readl_relaxed(rng->base + PRNG_CONFIG);
ceec5f5b59882b Vinod Koul 2018-07-16 109 if (val & PRNG_CONFIG_HW_ENABLE)
ceec5f5b59882b Vinod Koul 2018-07-16 110 goto already_enabled;
ceec5f5b59882b Vinod Koul 2018-07-16 111
ceec5f5b59882b Vinod Koul 2018-07-16 112 val = readl_relaxed(rng->base + PRNG_LFSR_CFG);
ceec5f5b59882b Vinod Koul 2018-07-16 113 val &= ~PRNG_LFSR_CFG_MASK;
ceec5f5b59882b Vinod Koul 2018-07-16 114 val |= PRNG_LFSR_CFG_CLOCKS;
ceec5f5b59882b Vinod Koul 2018-07-16 @115 writel(val, rng->base + PRNG_LFSR_CFG);
ceec5f5b59882b Vinod Koul 2018-07-16 116
ceec5f5b59882b Vinod Koul 2018-07-16 117 val = readl_relaxed(rng->base + PRNG_CONFIG);
ceec5f5b59882b Vinod Koul 2018-07-16 118 val |= PRNG_CONFIG_HW_ENABLE;
ceec5f5b59882b Vinod Koul 2018-07-16 119 writel(val, rng->base + PRNG_CONFIG);
ceec5f5b59882b Vinod Koul 2018-07-16 120
ceec5f5b59882b Vinod Koul 2018-07-16 121 already_enabled:
ceec5f5b59882b Vinod Koul 2018-07-16 122 clk_disable_unprepare(rng->clk);
ceec5f5b59882b Vinod Koul 2018-07-16 123
ceec5f5b59882b Vinod Koul 2018-07-16 124 return 0;
ceec5f5b59882b Vinod Koul 2018-07-16 125 }
ceec5f5b59882b Vinod Koul 2018-07-16 126
:::::: The code at line 48 was first introduced by commit
:::::: ceec5f5b59882b871a722ca4d49b767a09a4bde9 crypto: qcom-rng - Add Qcom prng driver
:::::: TO: Vinod Koul <vkoul(a)kernel.org>
:::::: CC: Herbert Xu <herbert(a)gondor.apana.org.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[android-common:android-4.19-stable 5/5] drivers/usb/musb/mediatek.c:457:6: warning: Variable 'ret' is reassigned a value before the old one has been used.
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-4.19-stable
head: 2161be81430a1794020d29a2a2c4789d57ec7b6d
commit: 2161be81430a1794020d29a2a2c4789d57ec7b6d [5/5] BACKPORT: usb: musb: Add support for MediaTek musb controller
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/usb/musb/mediatek.c:457:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = of_platform_populate(np, NULL, NULL, dev);
^
drivers/usb/musb/mediatek.c:446:0: note: Variable 'ret' is reassigned a value before the old one has been used.
int ret = -ENOMEM;
^
drivers/usb/musb/mediatek.c:457:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = of_platform_populate(np, NULL, NULL, dev);
^
vim +/ret +457 drivers/usb/musb/mediatek.c
438
439 static int mtk_musb_probe(struct platform_device *pdev)
440 {
441 struct musb_hdrc_platform_data *pdata;
442 struct mtk_glue *glue;
443 struct platform_device_info pinfo;
444 struct device *dev = &pdev->dev;
445 struct device_node *np = dev->of_node;
446 int ret = -ENOMEM;
447
448 glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);
449 if (!glue)
450 return -ENOMEM;
451
452 glue->dev = dev;
453 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
454 if (!pdata)
455 return -ENOMEM;
456
> 457 ret = of_platform_populate(np, NULL, NULL, dev);
458 if (ret) {
459 dev_err(dev, "failed to create child devices at %p\n", np);
460 return ret;
461 }
462
463 ret = mtk_musb_clks_get(glue);
464 if (ret)
465 return ret;
466
467 pdata->config = &mtk_musb_hdrc_config;
468 pdata->platform_ops = &mtk_musb_ops;
469 pdata->mode = usb_get_dr_mode(dev);
470
471 if (IS_ENABLED(CONFIG_USB_MUSB_HOST))
472 pdata->mode = USB_DR_MODE_HOST;
473 else if (IS_ENABLED(CONFIG_USB_MUSB_GADGET))
474 pdata->mode = USB_DR_MODE_PERIPHERAL;
475
476 switch (pdata->mode) {
477 case USB_DR_MODE_HOST:
478 glue->phy_mode = PHY_MODE_USB_HOST;
479 glue->role = USB_ROLE_HOST;
480 break;
481 case USB_DR_MODE_PERIPHERAL:
482 glue->phy_mode = PHY_MODE_USB_DEVICE;
483 glue->role = USB_ROLE_DEVICE;
484 break;
485 case USB_DR_MODE_OTG:
486 glue->phy_mode = PHY_MODE_USB_OTG;
487 glue->role = USB_ROLE_NONE;
488 break;
489 default:
490 dev_err(&pdev->dev, "Error 'dr_mode' property\n");
491 return -EINVAL;
492 }
493
494 glue->phy = devm_of_phy_get_by_index(dev, np, 0);
495 if (IS_ERR(glue->phy)) {
496 dev_err(dev, "fail to getting phy %ld\n",
497 PTR_ERR(glue->phy));
498 return PTR_ERR(glue->phy);
499 }
500
501 glue->usb_phy = usb_phy_generic_register();
502 if (IS_ERR(glue->usb_phy)) {
503 dev_err(dev, "fail to registering usb-phy %ld\n",
504 PTR_ERR(glue->usb_phy));
505 return PTR_ERR(glue->usb_phy);
506 }
507
508 glue->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
509 if (IS_ERR(glue->xceiv)) {
510 dev_err(dev, "fail to getting usb-phy %d\n", ret);
511 ret = PTR_ERR(glue->xceiv);
512 goto err_unregister_usb_phy;
513 }
514
515 platform_set_drvdata(pdev, glue);
516 pm_runtime_enable(dev);
517 pm_runtime_get_sync(dev);
518
519 ret = mtk_musb_clks_enable(glue);
520 if (ret)
521 goto err_enable_clk;
522
523 pinfo = mtk_dev_info;
524 pinfo.parent = dev;
525 pinfo.res = pdev->resource;
526 pinfo.num_res = pdev->num_resources;
527 pinfo.data = pdata;
528 pinfo.size_data = sizeof(*pdata);
529
530 glue->musb_pdev = platform_device_register_full(&pinfo);
531 if (IS_ERR(glue->musb_pdev)) {
532 ret = PTR_ERR(glue->musb_pdev);
533 dev_err(dev, "failed to register musb device: %d\n", ret);
534 goto err_device_register;
535 }
536
537 return 0;
538
539 err_device_register:
540 mtk_musb_clks_disable(glue);
541 err_enable_clk:
542 pm_runtime_put_sync(dev);
543 pm_runtime_disable(dev);
544 err_unregister_usb_phy:
545 usb_phy_generic_unregister(glue->usb_phy);
546 return ret;
547 }
548
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/firmware/efi/libstub/skip_spaces.c:6:7: warning: no previous prototype for 'skip_spaces'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 623f6dc593eaf98b91916836785278eddddaacf8
commit: 91d150c0cc637b9d9d6394936add7cd2b7ccc410 efi/libstub: Clean up command line parsing routine
date: 4 months ago
config: arm-randconfig-r002-20200611 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 91d150c0cc637b9d9d6394936add7cd2b7ccc410
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/firmware/efi/libstub/skip_spaces.c:6:7: warning: no previous prototype for 'skip_spaces' [-Wmissing-prototypes]
6 | char *skip_spaces(const char *str)
| ^~~~~~~~~~~
--
>> drivers/firmware/efi/libstub/string.c:83:20: warning: no previous prototype for 'simple_strtoull' [-Wmissing-prototypes]
83 | unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
| ^~~~~~~~~~~~~~~
>> drivers/firmware/efi/libstub/string.c:108:6: warning: no previous prototype for 'simple_strtol' [-Wmissing-prototypes]
108 | long simple_strtol(const char *cp, char **endp, unsigned int base)
| ^~~~~~~~~~~~~
vim +/skip_spaces +6 drivers/firmware/efi/libstub/skip_spaces.c
5
> 6 char *skip_spaces(const char *str)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] Makefile: Improve compressed debug info support detection
by Nick Desaulniers
On Wed, Jun 10, 2020 at 4:30 PM Arvind Sankar <nivedita(a)alum.mit.edu> wrote:
>
> On Wed, Jun 10, 2020 at 02:27:55PM -0700, Nick Desaulniers wrote:
> > On Wed, Jun 10, 2020 at 12:11 PM Arvind Sankar <nivedita(a)alum.mit.edu> wrote:
> > >
> > > Commit
> > > 10e68b02c861 ("Makefile: support compressed debug info")
> > > added support for compressed debug sections.
> > >
> > > Support is detected by checking
> > > - does the compiler support -gz=zlib
> > > - does the assembler support --compressed-debug-sections=zlib
> > > - does the linker support --compressed-debug-sections=zlib
> > >
> > > However, the gcc driver's support for this option is somewhat
> > > convoluted. The driver's builtin specs are set based on the version of
> > > binutils that it was configured with, and it reports an error only if
> > > the assembler (or linker) is actually invoked.
> > >
> > > The cc-option check in scripts/Kconfig.include does not invoke the
> > > assembler, so the gcc driver reports success even if it does not support
> > > the option being passed to the assembler.
> >
> > Thanks for the patch! In that case, should we consider dropping the
> > cc-option check from the Kconfg then, too?
> >
> > It seems it would help for clang-4 and older, since they do error
> > about the unknown option, but I'm not too worried about trying to
> > support that version of Clang with this config.
>
> Also for gcc4 which doesn't support this at all -- that will report
> error on cc-option. We don't need to support it, but we shouldn't let it
> be enabled either.
ah, right, good to fail early in that case then.
>
> >
> > > Combined with an installed
> > > version of binutils that is more recent than the one the compiler was
> > > built with, it is possible for all three tests to succeed, yet an actual
> > > compilation with -gz=zlib to fail.
> >
> > It kind of sounds like the assembler must be invoked to verify this
> > will work for the cflags then?
> >
>
> Yes, the gcc driver reports an error when deciding what to pass to the
> assembler for -gz=zlib, if it was configured with a linker that does not
> support the flag. It's even more weird actually -- if it was configured
> with a linker that supports the flag but an assembler that doesn't, it
> will silently eat the flag when calling the assembler. At least that
> won't break anything, though none of the .o files will be compressed.
Not sure whether we'd like to prevent the option from being selectable
in that case, or just to silently not compress the debug info. Given
that the compression is an optimization, it doesn't hurt to silently
not do it, but it would be nice to notify the user their toolchain may
have been misconfigured. Though another part of me feels "garbage in,
garbage out."
>
> > >
> > > Moreover, it is unnecessary to explicitly pass
> > > --compressed-debug-sections=zlib to the assembler via -Wa, since the
> > > driver will do that automatically.
> > >
> > > Convert the as-option to just -gz=zlib, simplifying it as well as
> > > performing a better test of the gcc driver's capabilities.
> > >
> > > Reported-by: kernel test robot <lkp(a)intel.com>
> > > Signed-off-by: Arvind Sankar <nivedita(a)alum.mit.edu>
> >
> > Does this imply all feature tests of as-option with -W(comma)... are
> > broken? IIUC, then the assembler is still not invoked, much as in
> > this case? (as in they all pass when maybe they should not?) (or
> > based on below, maybe just the Kconfig from 74afda4016a74 in
> > arch/arm64/Kconfig, AS_HAS_PAC)
>
> No, as-option does invoke the assembler. The problem here is that with
> -Wa, the option is only seen by the assembler, not the gcc driver. So it
> will succeed because the assembler supports it, but it will not test
> whether the gcc driver also supports it.
^ Those 2 last sentences should go in the commit message, as the
current form doesn't allude to that.
Reviewed-by: Nick Desaulniers <ndesaulniers(a)google.com>
>
> >
> > In the other thread, you discussed -c vs -s. It looks like -c is used
> > for as-option, so I expect the assembler to be invoked.
> >
> > Maybe we should look at the mismatch between Kbuild and Kconfig
> > regarding -c vs -s in scripts/Kbuild.include vs
> > scripts/Kconfig.include? Otherwise it sounds like cc-option cannot be
> > used to check for `-Wa,` flags in Kconfig, since if the assembler is
> > never invoked, it may appear that GCC has support for
> > -Wa,--compress-debug-sections=zlib when it indeed does not.
> >
>
> Yeah, we might want to fix the mismatch there. In Kconfig, there aren't
> any instances of cc-option being used with -Wa, but there certainly are
> in Kbuild. It actually originally used to only run the preprocessor and
Yep. Got it.
> got fixed to at least run the compiler in commit
> 3bed1b7b9d79 ("kbuild: use -S instead of -E for precise cc-option test in Kconfig")
>
> > > ---
> > > Makefile | 2 +-
> > > lib/Kconfig.debug | 2 +-
> > > 2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/Makefile b/Makefile
> > > index 839f9fee22cb..cb29e56f227a 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -842,7 +842,7 @@ endif
> > >
> > > ifdef CONFIG_DEBUG_INFO_COMPRESSED
> > > DEBUG_CFLAGS += -gz=zlib
> > > -KBUILD_AFLAGS += -Wa,--compress-debug-sections=zlib
> > > +KBUILD_AFLAGS += -gz=zlib
I verified that Clang will still produce compressed debug info
sections for .s/.S input with -gz=zlib. So this doesn't regress
anything, AFAICT.
Thanks for the patch.
> > > KBUILD_LDFLAGS += --compress-debug-sections=zlib
> > > endif
> > >
> > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > > index cb98741601bd..94ce36be470c 100644
> > > --- a/lib/Kconfig.debug
> > > +++ b/lib/Kconfig.debug
> > > @@ -229,7 +229,7 @@ config DEBUG_INFO_COMPRESSED
> > > bool "Compressed debugging information"
> > > depends on DEBUG_INFO
> > > depends on $(cc-option,-gz=zlib)
> > > - depends on $(as-option,-Wa$(comma)--compress-debug-sections=zlib)
> > > + depends on $(as-option,-gz=zlib)
> > > depends on $(ld-option,--compress-debug-sections=zlib)
> > > help
> > > Compress the debug information using zlib. Requires GCC 5.0+ or Clang
> > > --
> > > 2.26.2
> > >
> >
> >
> > --
> > Thanks,
> > ~Nick Desaulniers
--
Thanks,
~Nick Desaulniers
2 years, 3 months
Re: [PATCH] Makefile: Improve compressed debug info support detection
by Nick Desaulniers
On Wed, Jun 10, 2020 at 4:39 PM Arvind Sankar <nivedita(a)alum.mit.edu> wrote:
>
> On Wed, Jun 10, 2020 at 07:30:46PM -0400, Arvind Sankar wrote:
> > On Wed, Jun 10, 2020 at 02:27:55PM -0700, Nick Desaulniers wrote:
> >
> > No, as-option does invoke the assembler. The problem here is that with
> > -Wa, the option is only seen by the assembler, not the gcc driver. So it
> > will succeed because the assembler supports it, but it will not test
> > whether the gcc driver also supports it.
> >
>
> I think in theory another way to fix it is to just use -Wa even for
> CFLAGS, assuming the compiler itself doesn't have to do anything with
> the option and it's purely an assembler thing. Then you'd just do the as
> and ld tests.
I don't think the CFLAGS are used for .S source files though. We may
drive assembler via the compiler, but AFLAGS are used in place of
CFLAGS IIRC. (eh, maybe not for ARCH=arc, ARCH=sh, ARCH=csky,
ARCH=mips)
--
Thanks,
~Nick Desaulniers
2 years, 3 months
Re: [PATCH 3/4] Bluetooth: btintel: Add helper functions to parse firmware name
by kernel test robot
Hi Kiran,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on next-20200611]
[cannot apply to bluetooth/master v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kiran-K/Add-support-for-new-gene...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: powerpc-randconfig-s031-20200611 (attached as .config)
compiler: powerpc64le-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=powerpc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/bluetooth/btintel.c:418:26: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btintel.c:427:26: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btintel.c:428:26: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btintel.c:429:26: sparse: sparse: cast to restricted __le16
vim +418 drivers/bluetooth/btintel.c
384
385 bool btintel_get_fw_name(struct intel_version *ver,
386 struct intel_boot_params *params,
387 char *fw_name, size_t len,
388 const char *suffix)
389 {
390 /* This is for legacy HCI_Intel_Read_Version command.
391 *
392 * With this Intel bootloader only the hardware variant and device
393 * revision information are used to select the right firmware for SfP
394 * and WsP.
395 *
396 * The firmware filename is ibt-<hw_variant>-<dev_revid>.sfi.
397 *
398 * Currently the supported hardware variants are:
399 * 11 (0x0b) for iBT3.0 (LnP/SfP)
400 * 12 (0x0c) for iBT3.5 (WsP)
401 *
402 * For ThP/JfP and for future SKU's, the FW name varies based on HW
403 * variant, HW revision and FW revision, as these are dependent on CNVi
404 * and RF Combination.
405 *
406 * 17 (0x11) for iBT3.5 (JfP)
407 * 18 (0x12) for iBT3.5 (ThP)
408 *
409 * The firmware file name for these will be
410 * ibt-<hw_variant>-<hw_revision>-<fw_revision>.sfi.
411 *
412 */
413
414 switch (ver->hw_variant) {
415 case 0x0b: /* SfP */
416 case 0x0c: /* WsP */
417 snprintf(fw_name, len, "intel/ibt-%u-%u.%s",
> 418 le16_to_cpu(ver->hw_variant),
419 le16_to_cpu(params->dev_revid),
420 suffix);
421 break;
422 case 0x11: /* JfP */
423 case 0x12: /* ThP */
424 case 0x13: /* HrP */
425 case 0x14: /* CcP */
426 snprintf(fw_name, len, "intel/ibt-%u-%u-%u.%s",
427 le16_to_cpu(ver->hw_variant),
428 le16_to_cpu(ver->hw_revision),
429 le16_to_cpu(ver->fw_revision),
430 suffix);
431 break;
432 default:
433 return false;
434 }
435 return true;
436 }
437 EXPORT_SYMBOL_GPL(btintel_get_fw_name);
438
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] crypto: algapi - Remove skbuff.h inclusion
by kernel test robot
Hi Herbert,
I love your patch! Yet something to improve:
[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master rockchip/for-next v5.7 next-20200611]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Herbert-Xu/crypto-algapi-Remove-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
arch/powerpc/crypto/crc-vpmsum_test.c: In function 'crc_test_init':
>> arch/powerpc/crypto/crc-vpmsum_test.c:78:20: error: implicit declaration of function 'prandom_u32_max' [-Werror=implicit-function-declaration]
78 | size_t offset = prandom_u32_max(16);
| ^~~~~~~~~~~~~~~
>> arch/powerpc/crypto/crc-vpmsum_test.c:83:4: error: implicit declaration of function 'prandom_bytes' [-Werror=implicit-function-declaration]
83 | prandom_bytes(data, len);
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/prandom_u32_max +78 arch/powerpc/crypto/crc-vpmsum_test.c
146c8688d99c574 Daniel Axtens 2017-03-15 20
146c8688d99c574 Daniel Axtens 2017-03-15 21
146c8688d99c574 Daniel Axtens 2017-03-15 22 static int __init crc_test_init(void)
146c8688d99c574 Daniel Axtens 2017-03-15 23 {
146c8688d99c574 Daniel Axtens 2017-03-15 24 u16 crc16 = 0, verify16 = 0;
146c8688d99c574 Daniel Axtens 2017-03-15 25 u32 crc32 = 0, verify32 = 0;
146c8688d99c574 Daniel Axtens 2017-03-15 26 __le32 verify32le = 0;
146c8688d99c574 Daniel Axtens 2017-03-15 27 unsigned char *data;
146c8688d99c574 Daniel Axtens 2017-03-15 28 unsigned long i;
146c8688d99c574 Daniel Axtens 2017-03-15 29 int ret;
146c8688d99c574 Daniel Axtens 2017-03-15 30
146c8688d99c574 Daniel Axtens 2017-03-15 31 struct crypto_shash *crct10dif_tfm;
146c8688d99c574 Daniel Axtens 2017-03-15 32 struct crypto_shash *crc32c_tfm;
146c8688d99c574 Daniel Axtens 2017-03-15 33
146c8688d99c574 Daniel Axtens 2017-03-15 34 if (!cpu_has_feature(CPU_FTR_ARCH_207S))
146c8688d99c574 Daniel Axtens 2017-03-15 35 return -ENODEV;
146c8688d99c574 Daniel Axtens 2017-03-15 36
146c8688d99c574 Daniel Axtens 2017-03-15 37 data = kmalloc(MAX_CRC_LENGTH, GFP_KERNEL);
146c8688d99c574 Daniel Axtens 2017-03-15 38 if (!data)
146c8688d99c574 Daniel Axtens 2017-03-15 39 return -ENOMEM;
146c8688d99c574 Daniel Axtens 2017-03-15 40
146c8688d99c574 Daniel Axtens 2017-03-15 41 crct10dif_tfm = crypto_alloc_shash("crct10dif", 0, 0);
146c8688d99c574 Daniel Axtens 2017-03-15 42
146c8688d99c574 Daniel Axtens 2017-03-15 43 if (IS_ERR(crct10dif_tfm)) {
146c8688d99c574 Daniel Axtens 2017-03-15 44 pr_err("Error allocating crc-t10dif\n");
146c8688d99c574 Daniel Axtens 2017-03-15 45 goto free_buf;
146c8688d99c574 Daniel Axtens 2017-03-15 46 }
146c8688d99c574 Daniel Axtens 2017-03-15 47
146c8688d99c574 Daniel Axtens 2017-03-15 48 crc32c_tfm = crypto_alloc_shash("crc32c", 0, 0);
146c8688d99c574 Daniel Axtens 2017-03-15 49
146c8688d99c574 Daniel Axtens 2017-03-15 50 if (IS_ERR(crc32c_tfm)) {
146c8688d99c574 Daniel Axtens 2017-03-15 51 pr_err("Error allocating crc32c\n");
146c8688d99c574 Daniel Axtens 2017-03-15 52 goto free_16;
146c8688d99c574 Daniel Axtens 2017-03-15 53 }
146c8688d99c574 Daniel Axtens 2017-03-15 54
146c8688d99c574 Daniel Axtens 2017-03-15 55 do {
146c8688d99c574 Daniel Axtens 2017-03-15 56 SHASH_DESC_ON_STACK(crct10dif_shash, crct10dif_tfm);
146c8688d99c574 Daniel Axtens 2017-03-15 57 SHASH_DESC_ON_STACK(crc32c_shash, crc32c_tfm);
146c8688d99c574 Daniel Axtens 2017-03-15 58
146c8688d99c574 Daniel Axtens 2017-03-15 59 crct10dif_shash->tfm = crct10dif_tfm;
146c8688d99c574 Daniel Axtens 2017-03-15 60 ret = crypto_shash_init(crct10dif_shash);
146c8688d99c574 Daniel Axtens 2017-03-15 61
146c8688d99c574 Daniel Axtens 2017-03-15 62 if (ret) {
146c8688d99c574 Daniel Axtens 2017-03-15 63 pr_err("Error initing crc-t10dif\n");
146c8688d99c574 Daniel Axtens 2017-03-15 64 goto free_32;
146c8688d99c574 Daniel Axtens 2017-03-15 65 }
146c8688d99c574 Daniel Axtens 2017-03-15 66
146c8688d99c574 Daniel Axtens 2017-03-15 67
146c8688d99c574 Daniel Axtens 2017-03-15 68 crc32c_shash->tfm = crc32c_tfm;
146c8688d99c574 Daniel Axtens 2017-03-15 69 ret = crypto_shash_init(crc32c_shash);
146c8688d99c574 Daniel Axtens 2017-03-15 70
146c8688d99c574 Daniel Axtens 2017-03-15 71 if (ret) {
146c8688d99c574 Daniel Axtens 2017-03-15 72 pr_err("Error initing crc32c\n");
146c8688d99c574 Daniel Axtens 2017-03-15 73 goto free_32;
146c8688d99c574 Daniel Axtens 2017-03-15 74 }
146c8688d99c574 Daniel Axtens 2017-03-15 75
146c8688d99c574 Daniel Axtens 2017-03-15 76 pr_info("crc-vpmsum_test begins, %lu iterations\n", iterations);
146c8688d99c574 Daniel Axtens 2017-03-15 77 for (i=0; i<iterations; i++) {
80d04b7fabe161a George Spelvin 2019-03-21 @78 size_t offset = prandom_u32_max(16);
80d04b7fabe161a George Spelvin 2019-03-21 79 size_t len = prandom_u32_max(MAX_CRC_LENGTH);
146c8688d99c574 Daniel Axtens 2017-03-15 80
146c8688d99c574 Daniel Axtens 2017-03-15 81 if (len <= offset)
146c8688d99c574 Daniel Axtens 2017-03-15 82 continue;
80d04b7fabe161a George Spelvin 2019-03-21 @83 prandom_bytes(data, len);
146c8688d99c574 Daniel Axtens 2017-03-15 84 len -= offset;
146c8688d99c574 Daniel Axtens 2017-03-15 85
146c8688d99c574 Daniel Axtens 2017-03-15 86 crypto_shash_update(crct10dif_shash, data+offset, len);
146c8688d99c574 Daniel Axtens 2017-03-15 87 crypto_shash_final(crct10dif_shash, (u8 *)(&crc16));
146c8688d99c574 Daniel Axtens 2017-03-15 88 verify16 = crc_t10dif_generic(verify16, data+offset, len);
146c8688d99c574 Daniel Axtens 2017-03-15 89
146c8688d99c574 Daniel Axtens 2017-03-15 90
146c8688d99c574 Daniel Axtens 2017-03-15 91 if (crc16 != verify16) {
146c8688d99c574 Daniel Axtens 2017-03-15 92 pr_err("FAILURE in CRC16: got 0x%04x expected 0x%04x (len %lu)\n",
146c8688d99c574 Daniel Axtens 2017-03-15 93 crc16, verify16, len);
146c8688d99c574 Daniel Axtens 2017-03-15 94 break;
146c8688d99c574 Daniel Axtens 2017-03-15 95 }
146c8688d99c574 Daniel Axtens 2017-03-15 96
146c8688d99c574 Daniel Axtens 2017-03-15 97 crypto_shash_update(crc32c_shash, data+offset, len);
146c8688d99c574 Daniel Axtens 2017-03-15 98 crypto_shash_final(crc32c_shash, (u8 *)(&crc32));
146c8688d99c574 Daniel Axtens 2017-03-15 99 verify32 = le32_to_cpu(verify32le);
146c8688d99c574 Daniel Axtens 2017-03-15 100 verify32le = ~cpu_to_le32(__crc32c_le(~verify32, data+offset, len));
146c8688d99c574 Daniel Axtens 2017-03-15 101 if (crc32 != (u32)verify32le) {
146c8688d99c574 Daniel Axtens 2017-03-15 102 pr_err("FAILURE in CRC32: got 0x%08x expected 0x%08x (len %lu)\n",
146c8688d99c574 Daniel Axtens 2017-03-15 103 crc32, verify32, len);
146c8688d99c574 Daniel Axtens 2017-03-15 104 break;
146c8688d99c574 Daniel Axtens 2017-03-15 105 }
9f0acf9f80ad504 Chris Smart 2019-11-03 106 cond_resched();
146c8688d99c574 Daniel Axtens 2017-03-15 107 }
146c8688d99c574 Daniel Axtens 2017-03-15 108 pr_info("crc-vpmsum_test done, completed %lu iterations\n", i);
146c8688d99c574 Daniel Axtens 2017-03-15 109 } while (0);
146c8688d99c574 Daniel Axtens 2017-03-15 110
146c8688d99c574 Daniel Axtens 2017-03-15 111 free_32:
146c8688d99c574 Daniel Axtens 2017-03-15 112 crypto_free_shash(crc32c_tfm);
146c8688d99c574 Daniel Axtens 2017-03-15 113
146c8688d99c574 Daniel Axtens 2017-03-15 114 free_16:
146c8688d99c574 Daniel Axtens 2017-03-15 115 crypto_free_shash(crct10dif_tfm);
146c8688d99c574 Daniel Axtens 2017-03-15 116
146c8688d99c574 Daniel Axtens 2017-03-15 117 free_buf:
146c8688d99c574 Daniel Axtens 2017-03-15 118 kfree(data);
146c8688d99c574 Daniel Axtens 2017-03-15 119
146c8688d99c574 Daniel Axtens 2017-03-15 120 return 0;
146c8688d99c574 Daniel Axtens 2017-03-15 121 }
146c8688d99c574 Daniel Axtens 2017-03-15 122
:::::: The code at line 78 was first introduced by commit
:::::: 80d04b7fabe161a23d143b3bfcfca1b002c23da1 powerpc/crypto: Use cheaper random numbers for crc-vpmsum self-test
:::::: TO: George Spelvin <lkml(a)sdf.org>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[mripard:rpi4-kms-5.7 23/133] drivers/clk/bcm/clk-raspberrypi.c:417:64: sparse: sparse: incorrect type in argument 2 (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git rpi4-kms-5.7
head: 9be0b75695509010dcd2aac42bb6ef2196ef6f5f
commit: 2cb64c38eaf0c33e747804534cbdea2e5005d9ec [23/133] clk: bcm: rpi: Discover the firmware clocks
config: i386-randconfig-s001-20200611 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
git checkout 2cb64c38eaf0c33e747804534cbdea2e5005d9ec
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/clk/bcm/clk-raspberrypi.c:417:64: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int parent @@ got restricted __le32 [usertype] parent @@
>> drivers/clk/bcm/clk-raspberrypi.c:417:64: sparse: expected unsigned int parent
>> drivers/clk/bcm/clk-raspberrypi.c:417:64: sparse: got restricted __le32 [usertype] parent
>> drivers/clk/bcm/clk-raspberrypi.c:418:59: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned int id @@ got restricted __le32 [usertype] id @@
>> drivers/clk/bcm/clk-raspberrypi.c:418:59: sparse: expected unsigned int id
>> drivers/clk/bcm/clk-raspberrypi.c:418:59: sparse: got restricted __le32 [usertype] id
>> drivers/clk/bcm/clk-raspberrypi.c:422:39: sparse: sparse: restricted __le32 degrades to integer
drivers/clk/bcm/clk-raspberrypi.c:423:41: sparse: sparse: restricted __le32 degrades to integer
drivers/clk/bcm/clk-raspberrypi.c:412:29: sparse: sparse: restricted __le32 degrades to integer
drivers/clk/bcm/clk-raspberrypi.c:412:29: sparse: sparse: restricted __le32 degrades to integer
drivers/clk/bcm/clk-raspberrypi.c:412:29: sparse: sparse: restricted __le32 degrades to integer
drivers/clk/bcm/clk-raspberrypi.c:412:29: sparse: sparse: restricted __le32 degrades to integer
vim +417 drivers/clk/bcm/clk-raspberrypi.c
390
391 static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,
392 struct clk_hw_onecell_data *data)
393 {
394 struct rpi_firmware_get_clocks_response *clks;
395 int ret;
396
397 clks = devm_kcalloc(rpi->dev,
398 sizeof(*clks), RPI_FIRMWARE_NUM_CLK_ID,
399 GFP_KERNEL);
400 if (!clks)
401 return -ENOMEM;
402
403 ret = rpi_firmware_property(rpi->firmware, RPI_FIRMWARE_GET_CLOCKS,
404 clks,
405 sizeof(*clks) * RPI_FIRMWARE_NUM_CLK_ID);
406 if (ret)
407 return ret;
408
409 while (clks->id) {
410 struct clk_hw *hw;
411
412 switch (clks->id) {
413 case RPI_FIRMWARE_ARM_CLK_ID:
414 case RPI_FIRMWARE_CORE_CLK_ID:
415 case RPI_FIRMWARE_M2MC_CLK_ID:
416 case RPI_FIRMWARE_V3D_CLK_ID:
> 417 hw = raspberrypi_clk_register(rpi, clks->parent,
> 418 clks->id);
419 if (IS_ERR(hw))
420 return PTR_ERR(hw);
421
> 422 data->hws[clks->id] = hw;
423 data->num = clks->id + 1;
424 fallthrough;
425
426 default:
427 clks++;
428 break;
429 }
430 }
431
432 return 0;
433 }
434
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months