Re: [PATCH 2/2] crypto: ccree - add custom cache params from DT file
by Nick Desaulniers
On Thu, Sep 17, 2020 at 12:20 AM Gilad Ben-Yossef <gilad(a)benyossef.com> wrote:
>
> hmm...
>
> On Wed, Sep 16, 2020 at 4:48 PM kernel test robot <lkp(a)intel.com> wrote:
> >
> > url: https://github.com/0day-ci/linux/commits/Gilad-Ben-Yossef/add-optional-ca...
> > base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
> > config: arm64-randconfig-r015-20200916 (attached as .config)
> > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e3842d60351f986d77dfe0a94f76e4fd895f188)
> > 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 arm64 cross compiling tool for clang build
> > # apt-get install binutils-aarch64-linux-gnu
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
> >
> > 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 >>):
> >
> > >> drivers/crypto/ccree/cc_driver.c:120:18: warning: result of comparison of constant 18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
> > cache_params |= FIELD_PREP(mask, val);
> > ^~~~~~~~~~~~~~~~~~~~~
> > include/linux/bitfield.h:94:3: note: expanded from macro 'FIELD_PREP'
> > __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > include/linux/bitfield.h:52:28: note: expanded from macro '__BF_FIELD_CHECK'
> > BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
> > ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
> > #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> > ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
> > include/linux/compiler_types.h:319:22: note: expanded from macro 'compiletime_assert'
> > _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> > ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > include/linux/compiler_types.h:307:23: note: expanded from macro '_compiletime_assert'
> > __compiletime_assert(condition, msg, prefix, suffix)
> > ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > include/linux/compiler_types.h:299:9: note: expanded from macro '__compiletime_assert'
> > if (!(condition)) \
> > ^~~~~~~~~
>
> I am unable to understand this warning. It looks like it is
> complaining about a FIELD_GET sanity check that is always false, which
> makes sense since we're using a constant.
>
> Anyone can enlighten me if I've missed something?
Looked at some of this code recently. I think it may have an issue
for masks where sizeof(mask) < sizeof(unsigned long long).
In your code, via 0day bot:
107 u32 cache_params, ace_const, val, mask;
...
> 120 cache_params |= FIELD_PREP(mask, val);
then in include/linux/bitfield.h, we have:
92 #define FIELD_PREP(_mask, _val) \
93 ({ \
94 __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
44 #define __BF_FIELD_CHECK(_mask, _reg, _val, _pfx) \
...
52 BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
53 _pfx "type of reg too small for mask"); \
so the 0ULL in FIELD_PREP is important. In __BF_FIELD_CHECK, the
typeof(_reg) is unsigned long long (because 0ULL was passed). So we
have a comparison between a u32 and a u64; indeed any u32 can never be
greater than a u64 that we know has the value of ULLONG_MAX.
I did send a series splitting these up, I wonder if they'd help here:
https://lore.kernel.org/lkml/20200708230402.1644819-3-ndesaulniers@google...
--
Thanks,
~Nick Desaulniers
2 years
Re: [PATCH v5 bpf-next 2/6] bpf: move to generic BTF show support, apply it to seq files/strings
by kernel test robot
Hi Alan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Alan-Maguire/bpf-add-helpers-to-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: mips-randconfig-r003-20200918 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0ff28fa6a75617d61b1aeea77463d6a1684c3c89)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
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 >>):
>> kernel/bpf/btf.c:5310:6: warning: no previous prototype for function 'btf_type_show' [-Wmissing-prototypes]
void btf_type_show(const struct btf *btf, u32 type_id, void *obj,
^
kernel/bpf/btf.c:5310:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void btf_type_show(const struct btf *btf, u32 type_id, void *obj,
^
static
1 warning generated.
# https://github.com/0day-ci/linux/commit/a85186d405b24251bfd7179ae1949f345...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alan-Maguire/bpf-add-helpers-to-support-BTF-based-kernel-data-display/20200918-213932
git checkout a85186d405b24251bfd7179ae1949f3458e9702d
vim +/btf_type_show +5310 kernel/bpf/btf.c
5309
> 5310 void btf_type_show(const struct btf *btf, u32 type_id, void *obj,
5311 struct btf_show *show)
5312 {
5313 const struct btf_type *t = btf_type_by_id(btf, type_id);
5314
5315 show->btf = btf;
5316 memset(&show->state, 0, sizeof(show->state));
5317 memset(&show->obj, 0, sizeof(show->obj));
5318
5319 btf_type_ops(t)->show(btf, t, type_id, obj, 0, show);
5320 }
5321
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v2] dm: Call proper helper to determine dax support
by kernel test robot
Hi Dan,
I love your patch! Yet something to improve:
[auto build test ERROR on dm/for-next]
[also build test ERROR on linus/master v5.9-rc5 next-20200917]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Dan-Williams/dm-Call-proper-help...
base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
config: mips-allyesconfig (attached as .config)
compiler: mips-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=mips
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 >>):
drivers/dax/super.c:69:6: warning: no previous prototype for '__generic_fsdax_supported' [-Wmissing-prototypes]
69 | bool __generic_fsdax_supported(struct dax_device *dax_dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dax/super.c:167:6: warning: no previous prototype for '__bdev_dax_supported' [-Wmissing-prototypes]
167 | bool __bdev_dax_supported(struct block_device *bdev, int blocksize)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/dax/super.c:325:6: error: redefinition of 'dax_supported'
325 | bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev,
| ^~~~~~~~~~~~~
In file included from drivers/dax/super.c:16:
include/linux/dax.h:162:20: note: previous definition of 'dax_supported' was here
162 | static inline bool dax_supported(struct dax_device *dax_dev,
| ^~~~~~~~~~~~~
drivers/dax/super.c:451:6: warning: no previous prototype for 'run_dax' [-Wmissing-prototypes]
451 | void run_dax(struct dax_device *dax_dev)
| ^~~~~~~
# https://github.com/0day-ci/linux/commit/36000760ad7496d92b34294192ae5dd7d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dan-Williams/dm-Call-proper-helper-to-determine-dax-support/20200918-135024
git checkout 36000760ad7496d92b34294192ae5dd7da0eeb27
vim +/dax_supported +325 drivers/dax/super.c
b0686260fecaa92 Dan Williams 2017-01-26 324
7bf7eac8d648057 Dan Williams 2019-05-16 @325 bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev,
7bf7eac8d648057 Dan Williams 2019-05-16 326 int blocksize, sector_t start, sector_t len)
7bf7eac8d648057 Dan Williams 2019-05-16 327 {
36000760ad7496d Jan Kara 2020-09-17 328 if (!dax_dev)
36000760ad7496d Jan Kara 2020-09-17 329 return false;
36000760ad7496d Jan Kara 2020-09-17 330
7bf7eac8d648057 Dan Williams 2019-05-16 331 if (!dax_alive(dax_dev))
7bf7eac8d648057 Dan Williams 2019-05-16 332 return false;
7bf7eac8d648057 Dan Williams 2019-05-16 333
7bf7eac8d648057 Dan Williams 2019-05-16 334 return dax_dev->ops->dax_supported(dax_dev, bdev, blocksize, start, len);
7bf7eac8d648057 Dan Williams 2019-05-16 335 }
36000760ad7496d Jan Kara 2020-09-17 336 EXPORT_SYMBOL_GPL(dax_supported);
7bf7eac8d648057 Dan Williams 2019-05-16 337
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[RFC PATCH] bpf: btf_type_show() can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
btf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 70f5b88d44280b..e3b96f89d23dc3 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -5307,8 +5307,8 @@ int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog,
return 0;
}
-void btf_type_show(const struct btf *btf, u32 type_id, void *obj,
- struct btf_show *show)
+static void btf_type_show(const struct btf *btf, u32 type_id, void *obj,
+ struct btf_show *show)
{
const struct btf_type *t = btf_type_by_id(btf, type_id);
2 years
Re: [PATCH v5 bpf-next 2/6] bpf: move to generic BTF show support, apply it to seq files/strings
by kernel test robot
Hi Alan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Alan-Maguire/bpf-add-helpers-to-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-s021-20200917 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>)
>> kernel/bpf/btf.c:2465:17: sparse: sparse: Using plain integer as NULL pointer
kernel/bpf/btf.c:2467:17: sparse: sparse: Using plain integer as NULL pointer
kernel/bpf/btf.c:3244:17: sparse: sparse: Using plain integer as NULL pointer
kernel/bpf/btf.c:3585:9: sparse: sparse: Using plain integer as NULL pointer
>> kernel/bpf/btf.c:5310:6: sparse: sparse: symbol 'btf_type_show' was not declared. Should it be static?
Please review and possibly fold the followup patch.
# https://github.com/0day-ci/linux/commit/a85186d405b24251bfd7179ae1949f345...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alan-Maguire/bpf-add-helpers-to-support-BTF-based-kernel-data-display/20200918-213932
git checkout a85186d405b24251bfd7179ae1949f3458e9702d
vim +2465 kernel/bpf/btf.c
2452
2453 static void btf_ptr_show(const struct btf *btf, const struct btf_type *t,
2454 u32 type_id, void *data, u8 bits_offset,
2455 struct btf_show *show)
2456 {
2457 void *safe_data;
2458
2459 safe_data = btf_show_start_type(show, t, type_id, data);
2460 if (!safe_data)
2461 return;
2462
2463 /* It is a hashed value unless BTF_SHOW_PTR_RAW is specified */
2464 if (show->flags & BTF_SHOW_PTR_RAW)
> 2465 btf_show_type_value(show, "0x%px", *(void **)safe_data);
2466 else
2467 btf_show_type_value(show, "0x%p", *(void **)safe_data);
2468 btf_show_end_type(show);
2469 }
2470
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v3] ptp: mark symbols static where possible
by kernel test robot
Hi Herrington,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.9-rc5 next-20200918]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Herrington/ptp-mark-symbols-stat...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 10b82d5176488acee2820e5a2cf0f2ec5c3488b6
config: x86_64-randconfig-a002-20200917 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0ff28fa6a75617d61b1aeea77463d6a1684c3c89)
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 >>):
In file included from drivers/ptp/ptp_chardev.c:16:
In file included from drivers/ptp/ptp_private.h:16:
>> include/linux/ptp_clock_kernel.h:310:34: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
void pch_ch_control_write(struct pci_dev *pdev, u32 val);
^
include/linux/ptp_clock_kernel.h:311:30: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
u32 pch_ch_event_read(struct pci_dev *pdev);
^
include/linux/ptp_clock_kernel.h:312:32: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
void pch_ch_event_write(struct pci_dev *pdev, u32 val);
^
include/linux/ptp_clock_kernel.h:313:33: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
u32 pch_src_uuid_lo_read(struct pci_dev *pdev);
^
include/linux/ptp_clock_kernel.h:314:33: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
u32 pch_src_uuid_hi_read(struct pci_dev *pdev);
^
include/linux/ptp_clock_kernel.h:315:29: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
u64 pch_rx_snap_read(struct pci_dev *pdev);
^
include/linux/ptp_clock_kernel.h:316:29: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
u64 pch_tx_snap_read(struct pci_dev *pdev);
^
include/linux/ptp_clock_kernel.h:317:46: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
int pch_set_station_address(u8 *addr, struct pci_dev *pdev);
^
8 warnings generated.
# https://github.com/0day-ci/linux/commit/d5fd7587ec0ce30118654a4b5c38a41a1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Herrington/ptp-mark-symbols-static-where-possible/20200918-181139
git checkout d5fd7587ec0ce30118654a4b5c38a41a19ea5920
vim +310 include/linux/ptp_clock_kernel.h
309
> 310 void pch_ch_control_write(struct pci_dev *pdev, u32 val);
311 u32 pch_ch_event_read(struct pci_dev *pdev);
312 void pch_ch_event_write(struct pci_dev *pdev, u32 val);
313 u32 pch_src_uuid_lo_read(struct pci_dev *pdev);
314 u32 pch_src_uuid_hi_read(struct pci_dev *pdev);
315 u64 pch_rx_snap_read(struct pci_dev *pdev);
316 u64 pch_tx_snap_read(struct pci_dev *pdev);
317 int pch_set_station_address(u8 *addr, struct pci_dev *pdev);
318
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v5 bpf-next 2/6] bpf: move to generic BTF show support, apply it to seq files/strings
by kernel test robot
Hi Alan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Alan-Maguire/bpf-add-helpers-to-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: sparc-randconfig-p002-20200917 (attached as .config)
compiler: sparc-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=sparc
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 >>):
>> kernel/bpf/btf.c:5310:6: warning: no previous prototype for 'btf_type_show' [-Wmissing-prototypes]
5310 | void btf_type_show(const struct btf *btf, u32 type_id, void *obj,
| ^~~~~~~~~~~~~
kernel/bpf/btf.c: In function 'btf_seq_show':
>> kernel/bpf/btf.c:5327:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
5327 | seq_vprintf((struct seq_file *)show->target, fmt, args);
| ^~~~~~~~
kernel/bpf/btf.c: In function 'btf_snprintf_show':
>> kernel/bpf/btf.c:5357:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
5357 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
| ^~~
# https://github.com/0day-ci/linux/commit/a85186d405b24251bfd7179ae1949f345...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alan-Maguire/bpf-add-helpers-to-support-BTF-based-kernel-data-display/20200918-213932
git checkout a85186d405b24251bfd7179ae1949f3458e9702d
vim +/btf_type_show +5310 kernel/bpf/btf.c
5309
> 5310 void btf_type_show(const struct btf *btf, u32 type_id, void *obj,
5311 struct btf_show *show)
5312 {
5313 const struct btf_type *t = btf_type_by_id(btf, type_id);
5314
5315 show->btf = btf;
5316 memset(&show->state, 0, sizeof(show->state));
5317 memset(&show->obj, 0, sizeof(show->obj));
5318
5319 btf_type_ops(t)->show(btf, t, type_id, obj, 0, show);
5320 }
5321
5322 static void btf_seq_show(struct btf_show *show, const char *fmt, ...)
5323 {
5324 va_list args;
5325
5326 va_start(args, fmt);
> 5327 seq_vprintf((struct seq_file *)show->target, fmt, args);
5328 va_end(args);
5329 }
5330
5331 void btf_type_seq_show(const struct btf *btf, u32 type_id, void *obj,
5332 struct seq_file *m)
5333 {
5334 struct btf_show sseq;
5335
5336 sseq.target = m;
5337 sseq.showfn = btf_seq_show;
5338 sseq.flags = BTF_SHOW_NONAME | BTF_SHOW_COMPACT | BTF_SHOW_ZERO |
5339 BTF_SHOW_UNSAFE;
5340
5341 btf_type_show(btf, type_id, obj, &sseq);
5342 }
5343
5344 struct btf_show_snprintf {
5345 struct btf_show show;
5346 int len_left; /* space left in string */
5347 int len; /* length we would have written */
5348 };
5349
5350 static void btf_snprintf_show(struct btf_show *show, const char *fmt, ...)
5351 {
5352 struct btf_show_snprintf *ssnprintf = (struct btf_show_snprintf *)show;
5353 va_list args;
5354 int len;
5355
5356 va_start(args, fmt);
> 5357 len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
5358 va_end(args);
5359
5360 if (len < 0) {
5361 ssnprintf->len_left = 0;
5362 ssnprintf->len = len;
5363 } else if (len > ssnprintf->len_left) {
5364 /* no space, drive on to get length we would have written */
5365 ssnprintf->len_left = 0;
5366 ssnprintf->len += len;
5367 } else {
5368 ssnprintf->len_left -= len;
5369 ssnprintf->len += len;
5370 show->target += len;
5371 }
5372 }
5373
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[jwboyer-fedora:f33 56/70] drivers/pci/controller/dwc/pcie-tegra194.c:255:27: warning: unused variable 'pcie_gen_freq'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git f33
head: 3d38727346570bd9ed3a57fc2912e504130f2b64
commit: 05232008a3869e2ef95437d8eb1e6546ea1f4813 [56/70] PCI: Add MCFG quirks for Tegra194 host controllers
config: arm64-randconfig-r005-20200917 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0ff28fa6a75617d61b1aeea77463d6a1684c3c89)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout 05232008a3869e2ef95437d8eb1e6546ea1f4813
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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 >>):
>> drivers/pci/controller/dwc/pcie-tegra194.c:255:27: warning: unused variable 'pcie_gen_freq' [-Wunused-const-variable]
static const unsigned int pcie_gen_freq[] = {
^
drivers/pci/controller/dwc/pcie-tegra194.c:262:18: warning: unused variable 'event_cntr_ctrl_offset' [-Wunused-const-variable]
static const u32 event_cntr_ctrl_offset[] = {
^
drivers/pci/controller/dwc/pcie-tegra194.c:271:18: warning: unused variable 'event_cntr_data_offset' [-Wunused-const-variable]
static const u32 event_cntr_data_offset[] = {
^
3 warnings generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/commit...
git remote add jwboyer-fedora https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git
git fetch --no-tags jwboyer-fedora f33
git checkout 05232008a3869e2ef95437d8eb1e6546ea1f4813
vim +/pcie_gen_freq +255 drivers/pci/controller/dwc/pcie-tegra194.c
c57247f940e8ea1 Vidya Sagar 2020-03-03 254
56e15a238d92788 Vidya Sagar 2019-08-13 @255 static const unsigned int pcie_gen_freq[] = {
56e15a238d92788 Vidya Sagar 2019-08-13 256 GEN1_CORE_CLK_FREQ,
56e15a238d92788 Vidya Sagar 2019-08-13 257 GEN2_CORE_CLK_FREQ,
56e15a238d92788 Vidya Sagar 2019-08-13 258 GEN3_CORE_CLK_FREQ,
56e15a238d92788 Vidya Sagar 2019-08-13 259 GEN4_CORE_CLK_FREQ
56e15a238d92788 Vidya Sagar 2019-08-13 260 };
56e15a238d92788 Vidya Sagar 2019-08-13 261
:::::: The code at line 255 was first introduced by commit
:::::: 56e15a238d92788a2d09e0c5c26a5de1b3156931 PCI: tegra: Add Tegra194 PCIe support
:::::: TO: Vidya Sagar <vidyas(a)nvidia.com>
:::::: CC: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[saeed:net-next-mlx5 34/42] drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c:393:6: warning: variable 'chunk' is used uninitialized whenever 'if' condition is true
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git net-next-mlx5
head: e62d498381ea0759db87eae9a0d7ef9069959f5e
commit: c29361b902ee230b93b69f205b2964c73088f82c [34/42] net/mlx5: DR, Handle ICM memory via buddy allocation instead of bucket management
config: powerpc-randconfig-r022-20200918 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0ff28fa6a75617d61b1aeea77463d6a1684c3c89)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git checkout c29361b902ee230b93b69f205b2964c73088f82c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 warnings (new ones prefixed by >>):
>> drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c:393:6: warning: variable 'chunk' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (ret)
^~~
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c:406:9: note: uninitialized use occurs here
return chunk;
^~~~~
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c:393:2: note: remove the 'if' if its condition is always false
if (ret)
^~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c:383:32: note: initialize the variable 'chunk' to silence this warning
struct mlx5dr_icm_chunk *chunk;
^
= NULL
1 warning generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/commit/?i...
git remote add saeed https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git
git fetch --no-tags saeed net-next-mlx5
git checkout c29361b902ee230b93b69f205b2964c73088f82c
vim +393 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c
374
375 /* Allocate an ICM chunk, each chunk holds a piece of ICM memory and
376 * also memory used for HW STE management for optimizations.
377 */
378 struct mlx5dr_icm_chunk *
379 mlx5dr_icm_alloc_chunk(struct mlx5dr_icm_pool *pool,
380 enum mlx5dr_icm_chunk_size chunk_size)
381 {
382 struct mlx5dr_icm_buddy_mem *buddy;
383 struct mlx5dr_icm_chunk *chunk;
384 unsigned int seg;
385 int ret;
386
387 if (chunk_size > pool->max_log_chunk_sz)
388 return NULL;
389
390 mutex_lock(&pool->mutex);
391 /* find mem, get back the relevant buddy pool and seg in that mem */
392 ret = dr_icm_handle_buddies_get_mem(pool, chunk_size, &buddy, &seg);
> 393 if (ret)
394 goto out;
395
396 chunk = dr_icm_chunk_create(pool, chunk_size, buddy, seg);
397 if (!chunk)
398 goto out_err;
399
400 goto out;
401
402 out_err:
403 mlx5dr_buddy_free_mem(buddy, seg, chunk_size);
404 out:
405 mutex_unlock(&pool->mutex);
406 return chunk;
407 }
408
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years