[ebiggers:wip-crypto 5/5] drivers/crypto/chelsio/chcr_algo.h:340:35: error: use of undeclared identifier 'SHA256_DIGEST_SIZE'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git wip-crypto
head: b0fff3c09aeaecdd2f961eae6189247fa4d7712b
commit: b0fff3c09aeaecdd2f961eae6189247fa4d7712b [5/5] crypto: sha - split sha.h into sha1.h and sha2.h
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
git checkout b0fff3c09aeaecdd2f961eae6189247fa4d7712b
# 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 errors (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/crypto/chelsio/chcr_ipsec.c:63:
>> drivers/crypto/chelsio/chcr_algo.h:340:35: error: use of undeclared identifier 'SHA256_DIGEST_SIZE'
static const u32 chcr_sha224_init[SHA256_DIGEST_SIZE / 4] = {
^
>> drivers/crypto/chelsio/chcr_algo.h:341:3: error: use of undeclared identifier 'SHA224_H0'
SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
^
>> drivers/crypto/chelsio/chcr_algo.h:341:14: error: use of undeclared identifier 'SHA224_H1'
SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
^
>> drivers/crypto/chelsio/chcr_algo.h:341:25: error: use of undeclared identifier 'SHA224_H2'
SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
^
>> drivers/crypto/chelsio/chcr_algo.h:341:36: error: use of undeclared identifier 'SHA224_H3'
SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
^
>> drivers/crypto/chelsio/chcr_algo.h:342:3: error: use of undeclared identifier 'SHA224_H4'
SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
^
>> drivers/crypto/chelsio/chcr_algo.h:342:14: error: use of undeclared identifier 'SHA224_H5'
SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
^
>> drivers/crypto/chelsio/chcr_algo.h:342:25: error: use of undeclared identifier 'SHA224_H6'
SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
^
>> drivers/crypto/chelsio/chcr_algo.h:342:36: error: use of undeclared identifier 'SHA224_H7'
SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
^
drivers/crypto/chelsio/chcr_algo.h:345:35: error: use of undeclared identifier 'SHA256_DIGEST_SIZE'
static const u32 chcr_sha256_init[SHA256_DIGEST_SIZE / 4] = {
^
>> drivers/crypto/chelsio/chcr_algo.h:346:3: error: use of undeclared identifier 'SHA256_H0'
SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
^
>> drivers/crypto/chelsio/chcr_algo.h:346:14: error: use of undeclared identifier 'SHA256_H1'
SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
^
>> drivers/crypto/chelsio/chcr_algo.h:346:25: error: use of undeclared identifier 'SHA256_H2'
SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
^
>> drivers/crypto/chelsio/chcr_algo.h:346:36: error: use of undeclared identifier 'SHA256_H3'
SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
^
>> drivers/crypto/chelsio/chcr_algo.h:347:3: error: use of undeclared identifier 'SHA256_H4'
SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
^
>> drivers/crypto/chelsio/chcr_algo.h:347:14: error: use of undeclared identifier 'SHA256_H5'
SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
^
>> drivers/crypto/chelsio/chcr_algo.h:347:25: error: use of undeclared identifier 'SHA256_H6'
SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
^
>> drivers/crypto/chelsio/chcr_algo.h:347:36: error: use of undeclared identifier 'SHA256_H7'
SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
^
>> drivers/crypto/chelsio/chcr_algo.h:350:35: error: use of undeclared identifier 'SHA512_DIGEST_SIZE'
static const u64 chcr_sha384_init[SHA512_DIGEST_SIZE / 8] = {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +/SHA256_DIGEST_SIZE +340 drivers/crypto/chelsio/chcr_algo.h
324429d74127d0 Hariprasad Shenai 2016-08-17 339
6e4655e20d92c9 Hans de Goede 2019-09-01 @340 static const u32 chcr_sha224_init[SHA256_DIGEST_SIZE / 4] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @341 SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @342 SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 343 };
324429d74127d0 Hariprasad Shenai 2016-08-17 344
6e4655e20d92c9 Hans de Goede 2019-09-01 345 static const u32 chcr_sha256_init[SHA256_DIGEST_SIZE / 4] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @346 SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @347 SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 348 };
324429d74127d0 Hariprasad Shenai 2016-08-17 349
6e4655e20d92c9 Hans de Goede 2019-09-01 @350 static const u64 chcr_sha384_init[SHA512_DIGEST_SIZE / 8] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 351 SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 352 SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 353 };
324429d74127d0 Hariprasad Shenai 2016-08-17 354
:::::: The code at line 340 was first introduced by commit
:::::: 6e4655e20d92c902932dc65909c31c414b4aba2d crypto: chelsio - Rename arrays to avoid conflict with crypto/sha256.h
:::::: TO: Hans de Goede <hdegoede(a)redhat.com>
:::::: 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
[kees:devel/seccomp/addfd/v3.1 4/5] net/core/scm.c:316:7: warning: variable 'new_fd' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git devel/seccomp/addfd/v3.1
head: 9a69dc243008619f599573f8fad6e4ab224cc19a
commit: bb94586b9e7cc88e915536c2e9fb991a97b62416 [4/5] seccomp: Introduce addfd ioctl to seccomp user notifier
config: powerpc-randconfig-r031-20200608 (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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git checkout bb94586b9e7cc88e915536c2e9fb991a97b62416
# 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 >>, old ones prefixed by <<):
>> net/core/scm.c:316:7: warning: variable 'new_fd' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (error)
^~~~~
net/core/scm.c:329:9: note: uninitialized use occurs here
return new_fd;
^~~~~~
net/core/scm.c:316:3: note: remove the 'if' if its condition is always true
if (error)
^~~~~~~~~~
net/core/scm.c:294:12: note: initialize the variable 'new_fd' to silence this warning
int new_fd;
^
= 0
1 warning generated.
vim +316 net/core/scm.c
282
283 /**
284 * __scm_install_fd() - Install received file into file descriptor table
285 *
286 * Installs a received file into the file descriptor table, with appropriate
287 * checks and count updates.
288 *
289 * Returns fd installed or -ve on error.
290 */
291 int __scm_install_fd(int fd, struct file *file, int __user *ufd, int o_flags)
292 {
293 struct socket *sock;
294 int new_fd;
295 int error;
296
297 error = security_file_receive(file);
298 if (error)
299 return error;
300
301 if (fd < 0) {
302 new_fd = get_unused_fd_flags(o_flags);
303 if (new_fd < 0)
304 return new_fd;
305
306 if (ufd) {
307 error = put_user(new_fd, ufd);
308 if (error) {
309 put_unused_fd(new_fd);
310 return error;
311 }
312 }
313 fd_install(new_fd, get_file(file));
314 } else {
315 error = replace_fd(fd, file, o_flags);
> 316 if (error)
317 return error;
318 }
319
320 /* Bump the usage count and install the file. The resulting value of
321 * "error" is ignored here since we only need to take action when
322 * the file is a socket and testing "sock" for NULL is sufficient.
323 */
324 sock = sock_from_file(file, &error);
325 if (sock) {
326 sock_update_netprioidx(&sock->sk->sk_cgrp_data);
327 sock_update_classid(&sock->sk->sk_cgrp_data);
328 }
329 return new_fd;
330 }
331
---
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-5.4-stable 1/1] arch/arm64/kernel/vdso/vgettimeofday.c:27:8: warning: no previous prototype for function '__kernel_time'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-5.4-stable
head: 7bbd50f11d3086fe75fac78882de0d42e27293fa
commit: 7bbd50f11d3086fe75fac78882de0d42e27293fa [1/1] ANDROID: arch: arm64: vdso: export the symbols for time()
config: arm64-randconfig-r024-20200607 (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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout 7bbd50f11d3086fe75fac78882de0d42e27293fa
# 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 >>, old ones prefixed by <<):
arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: no previous prototype for function '__kernel_clock_gettime' [-Wmissing-prototypes]
int __kernel_clock_gettime(clockid_t clock,
^
arch/arm64/kernel/vdso/vgettimeofday.c:9:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_clock_gettime(clockid_t clock,
^
static
arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: no previous prototype for function '__kernel_gettimeofday' [-Wmissing-prototypes]
int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
^
arch/arm64/kernel/vdso/vgettimeofday.c:15:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
^
static
arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: no previous prototype for function '__kernel_clock_getres' [-Wmissing-prototypes]
int __kernel_clock_getres(clockid_t clock_id,
^
arch/arm64/kernel/vdso/vgettimeofday.c:21:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_clock_getres(clockid_t clock_id,
^
static
>> arch/arm64/kernel/vdso/vgettimeofday.c:27:8: warning: no previous prototype for function '__kernel_time' [-Wmissing-prototypes]
time_t __kernel_time(time_t *time)
^
arch/arm64/kernel/vdso/vgettimeofday.c:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
time_t __kernel_time(time_t *time)
^
static
4 warnings generated.
--
arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: no previous prototype for function '__kernel_clock_gettime' [-Wmissing-prototypes]
int __kernel_clock_gettime(clockid_t clock,
^
arch/arm64/kernel/vdso/vgettimeofday.c:9:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_clock_gettime(clockid_t clock,
^
static
arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: no previous prototype for function '__kernel_gettimeofday' [-Wmissing-prototypes]
int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
^
arch/arm64/kernel/vdso/vgettimeofday.c:15:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
^
static
arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: no previous prototype for function '__kernel_clock_getres' [-Wmissing-prototypes]
int __kernel_clock_getres(clockid_t clock_id,
^
arch/arm64/kernel/vdso/vgettimeofday.c:21:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_clock_getres(clockid_t clock_id,
^
static
>> arch/arm64/kernel/vdso/vgettimeofday.c:27:8: warning: no previous prototype for function '__kernel_time' [-Wmissing-prototypes]
time_t __kernel_time(time_t *time)
^
arch/arm64/kernel/vdso/vgettimeofday.c:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
time_t __kernel_time(time_t *time)
^
static
4 warnings generated.
vim +/__kernel_time +27 arch/arm64/kernel/vdso/vgettimeofday.c
20
> 21 int __kernel_clock_getres(clockid_t clock_id,
22 struct __kernel_timespec *res)
23 {
24 return __cvdso_clock_getres(clock_id, res);
25 }
26
> 27 time_t __kernel_time(time_t *time)
---
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 v4] hwmon:(adm1275) Enable adm1278 ADM1278_TEMP1_EN
by kernel test robot
Hi Manikandan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on hwmon/hwmon-next]
[also build test WARNING on v5.7 next-20200609]
[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/Manikandan-Elumalai/hwmon-adm127...
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: alpha-randconfig-r035-20200608 (attached as .config)
compiler: alpha-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=alpha
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/hwmon/pmbus/adm1275.c: In function 'adm1275_probe':
>> drivers/hwmon/pmbus/adm1275.c:684:14: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
684 | if (config & (ADM1278_VOUT_EN | ADM1278_TEMP1_EN) != ADM1278_VOUT_EN | ADM1278_TEMP1_EN) {
| ^
>> drivers/hwmon/pmbus/adm1275.c:684:14: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
684 | if (config & (ADM1278_VOUT_EN | ADM1278_TEMP1_EN) != ADM1278_VOUT_EN | ADM1278_TEMP1_EN) {
vim +684 drivers/hwmon/pmbus/adm1275.c
464
465 static int adm1275_probe(struct i2c_client *client,
466 const struct i2c_device_id *id)
467 {
468 u8 block_buffer[I2C_SMBUS_BLOCK_MAX + 1];
469 int config, device_config;
470 int ret;
471 struct pmbus_driver_info *info;
472 struct adm1275_data *data;
473 const struct i2c_device_id *mid;
474 const struct coefficients *coefficients;
475 int vindex = -1, voindex = -1, cindex = -1, pindex = -1;
476 int tindex = -1;
477 u32 shunt;
478
479 if (!i2c_check_functionality(client->adapter,
480 I2C_FUNC_SMBUS_READ_BYTE_DATA
481 | I2C_FUNC_SMBUS_BLOCK_DATA))
482 return -ENODEV;
483
484 ret = i2c_smbus_read_block_data(client, PMBUS_MFR_ID, block_buffer);
485 if (ret < 0) {
486 dev_err(&client->dev, "Failed to read Manufacturer ID\n");
487 return ret;
488 }
489 if (ret != 3 || strncmp(block_buffer, "ADI", 3)) {
490 dev_err(&client->dev, "Unsupported Manufacturer ID\n");
491 return -ENODEV;
492 }
493
494 ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, block_buffer);
495 if (ret < 0) {
496 dev_err(&client->dev, "Failed to read Manufacturer Model\n");
497 return ret;
498 }
499 for (mid = adm1275_id; mid->name[0]; mid++) {
500 if (!strncasecmp(mid->name, block_buffer, strlen(mid->name)))
501 break;
502 }
503 if (!mid->name[0]) {
504 dev_err(&client->dev, "Unsupported device\n");
505 return -ENODEV;
506 }
507
508 if (id->driver_data != mid->driver_data)
509 dev_notice(&client->dev,
510 "Device mismatch: Configured %s, detected %s\n",
511 id->name, mid->name);
512
513 config = i2c_smbus_read_byte_data(client, ADM1275_PMON_CONFIG);
514 if (config < 0)
515 return config;
516
517 device_config = i2c_smbus_read_byte_data(client, ADM1275_DEVICE_CONFIG);
518 if (device_config < 0)
519 return device_config;
520
521 data = devm_kzalloc(&client->dev, sizeof(struct adm1275_data),
522 GFP_KERNEL);
523 if (!data)
524 return -ENOMEM;
525
526 if (of_property_read_u32(client->dev.of_node,
527 "shunt-resistor-micro-ohms", &shunt))
528 shunt = 1000; /* 1 mOhm if not set via DT */
529
530 if (shunt == 0)
531 return -EINVAL;
532
533 data->id = mid->driver_data;
534
535 info = &data->info;
536
537 info->pages = 1;
538 info->format[PSC_VOLTAGE_IN] = direct;
539 info->format[PSC_VOLTAGE_OUT] = direct;
540 info->format[PSC_CURRENT_OUT] = direct;
541 info->format[PSC_POWER] = direct;
542 info->format[PSC_TEMPERATURE] = direct;
543 info->func[0] = PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
544 PMBUS_HAVE_SAMPLES;
545
546 info->read_word_data = adm1275_read_word_data;
547 info->read_byte_data = adm1275_read_byte_data;
548 info->write_word_data = adm1275_write_word_data;
549
550 switch (data->id) {
551 case adm1075:
552 if (device_config & ADM1275_IOUT_WARN2_SELECT)
553 data->have_oc_fault = true;
554 else
555 data->have_uc_fault = true;
556 data->have_pin_max = true;
557 data->have_vaux_status = true;
558
559 coefficients = adm1075_coefficients;
560 vindex = 0;
561 switch (config & ADM1075_IRANGE_MASK) {
562 case ADM1075_IRANGE_25:
563 cindex = 1;
564 pindex = 3;
565 break;
566 case ADM1075_IRANGE_50:
567 cindex = 2;
568 pindex = 4;
569 break;
570 default:
571 dev_err(&client->dev, "Invalid input current range");
572 break;
573 }
574
575 info->func[0] |= PMBUS_HAVE_VIN | PMBUS_HAVE_PIN
576 | PMBUS_HAVE_STATUS_INPUT;
577 if (config & ADM1275_VIN_VOUT_SELECT)
578 info->func[0] |=
579 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
580 break;
581 case adm1272:
582 data->have_vout = true;
583 data->have_pin_max = true;
584 data->have_temp_max = true;
585 data->have_power_sampling = true;
586
587 coefficients = adm1272_coefficients;
588 vindex = (config & ADM1275_VRANGE) ? 1 : 0;
589 cindex = (config & ADM1272_IRANGE) ? 3 : 2;
590 /* pindex depends on the combination of the above */
591 switch (config & (ADM1275_VRANGE | ADM1272_IRANGE)) {
592 case 0:
593 default:
594 pindex = 4;
595 break;
596 case ADM1275_VRANGE:
597 pindex = 5;
598 break;
599 case ADM1272_IRANGE:
600 pindex = 6;
601 break;
602 case ADM1275_VRANGE | ADM1272_IRANGE:
603 pindex = 7;
604 break;
605 }
606 tindex = 8;
607
608 info->func[0] |= PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT |
609 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
610
611 /* Enable VOUT if not enabled (it is disabled by default) */
612 if (!(config & ADM1278_VOUT_EN)) {
613 config |= ADM1278_VOUT_EN;
614 ret = i2c_smbus_write_byte_data(client,
615 ADM1275_PMON_CONFIG,
616 config);
617 if (ret < 0) {
618 dev_err(&client->dev,
619 "Failed to enable VOUT monitoring\n");
620 return -ENODEV;
621 }
622 }
623
624 if (config & ADM1278_TEMP1_EN)
625 info->func[0] |=
626 PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
627 if (config & ADM1278_VIN_EN)
628 info->func[0] |= PMBUS_HAVE_VIN;
629 break;
630 case adm1275:
631 if (device_config & ADM1275_IOUT_WARN2_SELECT)
632 data->have_oc_fault = true;
633 else
634 data->have_uc_fault = true;
635 data->have_vout = true;
636
637 coefficients = adm1275_coefficients;
638 vindex = (config & ADM1275_VRANGE) ? 0 : 1;
639 cindex = 2;
640
641 if (config & ADM1275_VIN_VOUT_SELECT)
642 info->func[0] |=
643 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
644 else
645 info->func[0] |=
646 PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT;
647 break;
648 case adm1276:
649 if (device_config & ADM1275_IOUT_WARN2_SELECT)
650 data->have_oc_fault = true;
651 else
652 data->have_uc_fault = true;
653 data->have_vout = true;
654 data->have_pin_max = true;
655
656 coefficients = adm1276_coefficients;
657 vindex = (config & ADM1275_VRANGE) ? 0 : 1;
658 cindex = 2;
659 pindex = (config & ADM1275_VRANGE) ? 3 : 4;
660
661 info->func[0] |= PMBUS_HAVE_VIN | PMBUS_HAVE_PIN
662 | PMBUS_HAVE_STATUS_INPUT;
663 if (config & ADM1275_VIN_VOUT_SELECT)
664 info->func[0] |=
665 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
666 break;
667 case adm1278:
668 data->have_vout = true;
669 data->have_pin_max = true;
670 data->have_temp_max = true;
671 data->have_power_sampling = true;
672
673 coefficients = adm1278_coefficients;
674 vindex = 0;
675 cindex = 1;
676 pindex = 2;
677 tindex = 3;
678
679 info->func[0] |= PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT |
680 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
681 PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
682
683 /* Enable VOUT & TEMP1 if not enabled (disabled by default) */
> 684 if (config & (ADM1278_VOUT_EN | ADM1278_TEMP1_EN) != ADM1278_VOUT_EN | ADM1278_TEMP1_EN) {
685 config |= ADM1278_VOUT_EN | ADM1278_TEMP1_EN;
686 ret = i2c_smbus_write_byte_data(client,
687 ADM1275_PMON_CONFIG,
688 config);
689 if (ret < 0) {
690 dev_err(&client->dev,
691 "Failed to enable VOUT monitoring\n");
692 return -ENODEV;
693 }
694 }
695
696 if (config & ADM1278_VIN_EN)
697 info->func[0] |= PMBUS_HAVE_VIN;
698 break;
699 case adm1293:
700 case adm1294:
701 data->have_iout_min = true;
702 data->have_pin_min = true;
703 data->have_pin_max = true;
704 data->have_mfr_vaux_status = true;
705 data->have_power_sampling = true;
706
707 coefficients = adm1293_coefficients;
708
709 voindex = 0;
710 switch (config & ADM1293_VIN_SEL_MASK) {
711 case ADM1293_VIN_SEL_012: /* 1.2V */
712 vindex = 0;
713 break;
714 case ADM1293_VIN_SEL_074: /* 7.4V */
715 vindex = 1;
716 break;
717 case ADM1293_VIN_SEL_210: /* 21V */
718 vindex = 2;
719 break;
720 default: /* disabled */
721 break;
722 }
723
724 switch (config & ADM1293_IRANGE_MASK) {
725 case ADM1293_IRANGE_25:
726 cindex = 3;
727 break;
728 case ADM1293_IRANGE_50:
729 cindex = 4;
730 break;
731 case ADM1293_IRANGE_100:
732 cindex = 5;
733 break;
734 case ADM1293_IRANGE_200:
735 cindex = 6;
736 break;
737 }
738
739 if (vindex >= 0)
740 pindex = 7 + vindex * 4 + (cindex - 3);
741
742 if (config & ADM1293_VAUX_EN)
743 info->func[0] |=
744 PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
745
746 info->func[0] |= PMBUS_HAVE_PIN |
747 PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT;
748
749 break;
750 default:
751 dev_err(&client->dev, "Unsupported device\n");
752 return -ENODEV;
753 }
754
755 if (voindex < 0)
756 voindex = vindex;
757 if (vindex >= 0) {
758 info->m[PSC_VOLTAGE_IN] = coefficients[vindex].m;
759 info->b[PSC_VOLTAGE_IN] = coefficients[vindex].b;
760 info->R[PSC_VOLTAGE_IN] = coefficients[vindex].R;
761 }
762 if (voindex >= 0) {
763 info->m[PSC_VOLTAGE_OUT] = coefficients[voindex].m;
764 info->b[PSC_VOLTAGE_OUT] = coefficients[voindex].b;
765 info->R[PSC_VOLTAGE_OUT] = coefficients[voindex].R;
766 }
767 if (cindex >= 0) {
768 /* Scale current with sense resistor value */
769 info->m[PSC_CURRENT_OUT] =
770 coefficients[cindex].m * shunt / 1000;
771 info->b[PSC_CURRENT_OUT] = coefficients[cindex].b;
772 info->R[PSC_CURRENT_OUT] = coefficients[cindex].R;
773 }
774 if (pindex >= 0) {
775 info->m[PSC_POWER] =
776 coefficients[pindex].m * shunt / 1000;
777 info->b[PSC_POWER] = coefficients[pindex].b;
778 info->R[PSC_POWER] = coefficients[pindex].R;
779 }
780 if (tindex >= 0) {
781 info->m[PSC_TEMPERATURE] = coefficients[tindex].m;
782 info->b[PSC_TEMPERATURE] = coefficients[tindex].b;
783 info->R[PSC_TEMPERATURE] = coefficients[tindex].R;
784 }
785
786 return pmbus_do_probe(client, id, info);
787 }
788
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[alibaba-cloud:linux-next 11285/11535] <stdin>:1347:2: warning: #warning syscall openat2 not implemented
by kernel test robot
tree: https://github.com/alibaba/cloud-kernel.git linux-next
head: 4da723592714ee2993664252216d9d5b5a3df3eb
commit: 5b9369e5de06e80452e2773085a595ffb5988fad [11285/11535] open: introduce openat2(2) syscall
config: parisc-allnoconfig (attached as .config)
compiler: hppa-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
git checkout 5b9369e5de06e80452e2773085a595ffb5988fad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 <<):
<stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
<stdin>:1338:2: warning: #warning syscall io_uring_setup not implemented [-Wcpp]
<stdin>:1341:2: warning: #warning syscall io_uring_enter not implemented [-Wcpp]
<stdin>:1344:2: warning: #warning syscall io_uring_register not implemented [-Wcpp]
>> <stdin>:1347:2: warning: #warning syscall openat2 not implemented [-Wcpp]
--
<stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
<stdin>:1338:2: warning: #warning syscall io_uring_setup not implemented [-Wcpp]
<stdin>:1341:2: warning: #warning syscall io_uring_enter not implemented [-Wcpp]
<stdin>:1344:2: warning: #warning syscall io_uring_register not implemented [-Wcpp]
>> <stdin>:1347:2: warning: #warning syscall openat2 not implemented [-Wcpp]
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [RFC PATCH v1 11/18] media: tegra-video: Add support for external sensor capture
by kernel test robot
Hi Sowjanya,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on next-20200609]
[cannot apply to tegra/for-next tegra-drm/drm/tegra/for-next robh/for-next v5.7 v5.7-rc7 v5.7-rc6 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/Sowjanya-Komatineni/Support-for-...
base: 3d155ae4358baf4831609c2f9cd09396a2b8badf
config: arm-allyesconfig (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
# 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/staging/media/tegra-video/vi.c:1447:6: warning: no previous prototype for 'tegra_vi_graph_cleanup' [-Wmissing-prototypes]
1447 | void tegra_vi_graph_cleanup(struct tegra_vi *vi)
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/tegra_vi_graph_cleanup +1447 drivers/staging/media/tegra-video/vi.c
1446
> 1447 void tegra_vi_graph_cleanup(struct tegra_vi *vi)
1448 {
1449 struct tegra_vi_channel *chan;
1450
1451 list_for_each_entry(chan, &vi->vi_chans, list) {
1452 video_unregister_device(&chan->video);
1453 mutex_lock(&chan->video_lock);
1454 vb2_queue_release(&chan->queue);
1455 mutex_unlock(&chan->video_lock);
1456 v4l2_async_notifier_unregister(&chan->notifier);
1457 v4l2_async_notifier_cleanup(&chan->notifier);
1458 }
1459 }
1460
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[alibaba-cloud:linux-next 11093/11535] fs/proc/stat.c:48:5: warning: no previous prototype for function 'get_idle_time'
by kernel test robot
tree: https://github.com/alibaba/cloud-kernel.git linux-next
head: 4da723592714ee2993664252216d9d5b5a3df3eb
commit: 9be0ac2bcbaa1831196a88f5e81ea162811f3418 [11093/11535] alinux: cpuacct: export cpuacct.proc_stat interface
config: x86_64-defconfig (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
git checkout 9be0ac2bcbaa1831196a88f5e81ea162811f3418
# 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 <<):
>> fs/proc/stat.c:48:5: warning: no previous prototype for function 'get_idle_time' [-Wmissing-prototypes]
u64 get_idle_time(int cpu)
^
fs/proc/stat.c:48:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u64 get_idle_time(int cpu)
^
static
>> fs/proc/stat.c:64:5: warning: no previous prototype for function 'get_iowait_time' [-Wmissing-prototypes]
u64 get_iowait_time(int cpu)
^
fs/proc/stat.c:64:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u64 get_iowait_time(int cpu)
^
static
2 warnings generated.
vim +/get_idle_time +48 fs/proc/stat.c
47
> 48 u64 get_idle_time(int cpu)
49 {
50 u64 idle, idle_usecs = -1ULL;
51
52 if (cpu_online(cpu))
53 idle_usecs = get_cpu_idle_time_us(cpu, NULL);
54
55 if (idle_usecs == -1ULL)
56 /* !NO_HZ or cpu offline so we can rely on cpustat.idle */
57 idle = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE];
58 else
59 idle = idle_usecs * NSEC_PER_USEC;
60
61 return idle;
62 }
63
> 64 u64 get_iowait_time(int cpu)
65 {
66 u64 iowait, iowait_usecs = -1ULL;
67
68 if (cpu_online(cpu))
69 iowait_usecs = get_cpu_iowait_time_us(cpu, NULL);
70
71 if (iowait_usecs == -1ULL)
72 /* !NO_HZ or cpu offline so we can rely on cpustat.iowait */
73 iowait = kcpustat_cpu(cpu).cpustat[CPUTIME_IOWAIT];
74 else
75 iowait = iowait_usecs * NSEC_PER_USEC;
76
77 return iowait;
78 }
79
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[sound:topic/dma-fix 149/152] sound/core/sgbuf.c:63:11: warning: variable 'prot' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/dma-fix
head: cef734d7e27e6c8ecfabdc5596647ed3405ab43f
commit: f3ed524c87951046aed8fde9db74c1d66c2e6000 [149/152] ALSA: pcm: Avoid vmap() for device SG-buffers
config: i386-randconfig-s002-20200607 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-247-gcadbd124-dirty
git checkout f3ed524c87951046aed8fde9db74c1d66c2e6000
# 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>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/core/sgbuf.c: In function 'snd_malloc_sgbuf_pages':
>> sound/core/sgbuf.c:63:11: warning: variable 'prot' set but not used [-Wunused-but-set-variable]
63 | pgprot_t prot = PAGE_KERNEL;
| ^~~~
vim +/prot +63 sound/core/sgbuf.c
51e9f2e665bf2b Takashi Iwai 2008-07-30 52
f3ed524c879510 Takashi Iwai 2020-06-09 53 int snd_malloc_sgbuf_pages(struct device *device,
^1da177e4c3f41 Linus Torvalds 2005-04-16 54 size_t size, struct snd_dma_buffer *dmab,
^1da177e4c3f41 Linus Torvalds 2005-04-16 55 size_t *res_size)
^1da177e4c3f41 Linus Torvalds 2005-04-16 56 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 57 struct snd_sg_buf *sgbuf;
51e9f2e665bf2b Takashi Iwai 2008-07-30 58 unsigned int i, pages, chunk, maxpages;
^1da177e4c3f41 Linus Torvalds 2005-04-16 59 struct snd_dma_buffer tmpb;
51e9f2e665bf2b Takashi Iwai 2008-07-30 60 struct snd_sg_page *table;
51e9f2e665bf2b Takashi Iwai 2008-07-30 61 struct page **pgtable;
42e748a0b3251c Takashi Iwai 2018-08-08 62 int type = SNDRV_DMA_TYPE_DEV;
42e748a0b3251c Takashi Iwai 2018-08-08 @63 pgprot_t prot = PAGE_KERNEL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 64
^1da177e4c3f41 Linus Torvalds 2005-04-16 65 dmab->area = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 66 dmab->addr = 0;
59feddb25f9d92 Panagiotis Issaris 2006-07-25 67 dmab->private_data = sgbuf = kzalloc(sizeof(*sgbuf), GFP_KERNEL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 68 if (! sgbuf)
f3ed524c879510 Takashi Iwai 2020-06-09 69 return -ENOMEM;
42e748a0b3251c Takashi Iwai 2018-08-08 70 if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_UC_SG) {
42e748a0b3251c Takashi Iwai 2018-08-08 71 type = SNDRV_DMA_TYPE_DEV_UC;
42e748a0b3251c Takashi Iwai 2018-08-08 72 #ifdef pgprot_noncached
42e748a0b3251c Takashi Iwai 2018-08-08 73 prot = pgprot_noncached(PAGE_KERNEL);
42e748a0b3251c Takashi Iwai 2018-08-08 74 #endif
42e748a0b3251c Takashi Iwai 2018-08-08 75 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 76 sgbuf->dev = device;
^1da177e4c3f41 Linus Torvalds 2005-04-16 77 pages = snd_sgbuf_aligned_pages(size);
^1da177e4c3f41 Linus Torvalds 2005-04-16 78 sgbuf->tblsize = sgbuf_align_table(pages);
51e9f2e665bf2b Takashi Iwai 2008-07-30 79 table = kcalloc(sgbuf->tblsize, sizeof(*table), GFP_KERNEL);
51e9f2e665bf2b Takashi Iwai 2008-07-30 80 if (!table)
^1da177e4c3f41 Linus Torvalds 2005-04-16 81 goto _failed;
51e9f2e665bf2b Takashi Iwai 2008-07-30 82 sgbuf->table = table;
51e9f2e665bf2b Takashi Iwai 2008-07-30 83 pgtable = kcalloc(sgbuf->tblsize, sizeof(*pgtable), GFP_KERNEL);
51e9f2e665bf2b Takashi Iwai 2008-07-30 84 if (!pgtable)
^1da177e4c3f41 Linus Torvalds 2005-04-16 85 goto _failed;
51e9f2e665bf2b Takashi Iwai 2008-07-30 86 sgbuf->page_table = pgtable;
^1da177e4c3f41 Linus Torvalds 2005-04-16 87
51e9f2e665bf2b Takashi Iwai 2008-07-30 88 /* allocate pages */
51e9f2e665bf2b Takashi Iwai 2008-07-30 89 maxpages = MAX_ALLOC_PAGES;
51e9f2e665bf2b Takashi Iwai 2008-07-30 90 while (pages > 0) {
51e9f2e665bf2b Takashi Iwai 2008-07-30 91 chunk = pages;
51e9f2e665bf2b Takashi Iwai 2008-07-30 92 /* don't be too eager to take a huge chunk */
51e9f2e665bf2b Takashi Iwai 2008-07-30 93 if (chunk > maxpages)
51e9f2e665bf2b Takashi Iwai 2008-07-30 94 chunk = maxpages;
51e9f2e665bf2b Takashi Iwai 2008-07-30 95 chunk <<= PAGE_SHIFT;
42e748a0b3251c Takashi Iwai 2018-08-08 96 if (snd_dma_alloc_pages_fallback(type, device,
51e9f2e665bf2b Takashi Iwai 2008-07-30 97 chunk, &tmpb) < 0) {
51e9f2e665bf2b Takashi Iwai 2008-07-30 98 if (!sgbuf->pages)
c810f9039f0406 Takashi Iwai 2012-08-03 99 goto _failed;
51e9f2e665bf2b Takashi Iwai 2008-07-30 100 if (!res_size)
^1da177e4c3f41 Linus Torvalds 2005-04-16 101 goto _failed;
51e9f2e665bf2b Takashi Iwai 2008-07-30 102 size = sgbuf->pages * PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 103 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 104 }
51e9f2e665bf2b Takashi Iwai 2008-07-30 105 chunk = tmpb.bytes >> PAGE_SHIFT;
51e9f2e665bf2b Takashi Iwai 2008-07-30 106 for (i = 0; i < chunk; i++) {
51e9f2e665bf2b Takashi Iwai 2008-07-30 107 table->buf = tmpb.area;
51e9f2e665bf2b Takashi Iwai 2008-07-30 108 table->addr = tmpb.addr;
51e9f2e665bf2b Takashi Iwai 2008-07-30 109 if (!i)
51e9f2e665bf2b Takashi Iwai 2008-07-30 110 table->addr |= chunk; /* mark head */
51e9f2e665bf2b Takashi Iwai 2008-07-30 111 table++;
51e9f2e665bf2b Takashi Iwai 2008-07-30 112 *pgtable++ = virt_to_page(tmpb.area);
51e9f2e665bf2b Takashi Iwai 2008-07-30 113 tmpb.area += PAGE_SIZE;
51e9f2e665bf2b Takashi Iwai 2008-07-30 114 tmpb.addr += PAGE_SIZE;
51e9f2e665bf2b Takashi Iwai 2008-07-30 115 }
51e9f2e665bf2b Takashi Iwai 2008-07-30 116 sgbuf->pages += chunk;
51e9f2e665bf2b Takashi Iwai 2008-07-30 117 pages -= chunk;
51e9f2e665bf2b Takashi Iwai 2008-07-30 118 if (chunk < maxpages)
51e9f2e665bf2b Takashi Iwai 2008-07-30 119 maxpages = chunk;
^1da177e4c3f41 Linus Torvalds 2005-04-16 120 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 121
^1da177e4c3f41 Linus Torvalds 2005-04-16 122 sgbuf->size = size;
f3ed524c879510 Takashi Iwai 2020-06-09 123 dmab->addr = -1UL; /* some non-NULL value as validity */
51e9f2e665bf2b Takashi Iwai 2008-07-30 124 if (res_size)
51e9f2e665bf2b Takashi Iwai 2008-07-30 125 *res_size = sgbuf->size;
f3ed524c879510 Takashi Iwai 2020-06-09 126 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 127
^1da177e4c3f41 Linus Torvalds 2005-04-16 128 _failed:
^1da177e4c3f41 Linus Torvalds 2005-04-16 129 snd_free_sgbuf_pages(dmab); /* free the table */
f3ed524c879510 Takashi Iwai 2020-06-09 130 return -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 131 }
9d069dc00b02b8 Takashi Iwai 2012-09-20 132
:::::: The code at line 63 was first introduced by commit
:::::: 42e748a0b3251cca0de2c269ca106884907eb289 ALSA: memalloc: Add non-cached buffer type
:::::: TO: Takashi Iwai <tiwai(a)suse.de>
:::::: CC: Takashi Iwai <tiwai(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[ebiggers:wip-crypto 5/5] drivers/crypto/chelsio/chcr_algo.h:340:35: error: 'SHA256_DIGEST_SIZE' undeclared here (not in a function); did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git wip-crypto
head: b0fff3c09aeaecdd2f961eae6189247fa4d7712b
commit: b0fff3c09aeaecdd2f961eae6189247fa4d7712b [5/5] crypto: sha - split sha.h into sha1.h and sha2.h
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout b0fff3c09aeaecdd2f961eae6189247fa4d7712b
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 <<):
In file included from drivers/crypto/chelsio/chcr_ipsec.c:63:
>> drivers/crypto/chelsio/chcr_algo.h:340:35: error: 'SHA256_DIGEST_SIZE' undeclared here (not in a function); did you mean 'SHA1_DIGEST_SIZE'?
340 | static const u32 chcr_sha224_init[SHA256_DIGEST_SIZE / 4] = {
| ^~~~~~~~~~~~~~~~~~
| SHA1_DIGEST_SIZE
>> drivers/crypto/chelsio/chcr_algo.h:341:3: error: 'SHA224_H0' undeclared here (not in a function); did you mean 'SHA1_H0'?
341 | SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
| ^~~~~~~~~
| SHA1_H0
>> drivers/crypto/chelsio/chcr_algo.h:341:14: error: 'SHA224_H1' undeclared here (not in a function); did you mean 'SHA1_H1'?
341 | SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
| ^~~~~~~~~
| SHA1_H1
>> drivers/crypto/chelsio/chcr_algo.h:341:25: error: 'SHA224_H2' undeclared here (not in a function); did you mean 'SHA1_H2'?
341 | SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
| ^~~~~~~~~
| SHA1_H2
>> drivers/crypto/chelsio/chcr_algo.h:341:36: error: 'SHA224_H3' undeclared here (not in a function); did you mean 'SHA1_H3'?
341 | SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
| ^~~~~~~~~
| SHA1_H3
>> drivers/crypto/chelsio/chcr_algo.h:342:3: error: 'SHA224_H4' undeclared here (not in a function); did you mean 'SHA1_H4'?
342 | SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
| ^~~~~~~~~
| SHA1_H4
>> drivers/crypto/chelsio/chcr_algo.h:342:14: error: 'SHA224_H5' undeclared here (not in a function)
342 | SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
| ^~~~~~~~~
>> drivers/crypto/chelsio/chcr_algo.h:342:25: error: 'SHA224_H6' undeclared here (not in a function)
342 | SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
| ^~~~~~~~~
>> drivers/crypto/chelsio/chcr_algo.h:342:36: error: 'SHA224_H7' undeclared here (not in a function)
342 | SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
| ^~~~~~~~~
>> drivers/crypto/chelsio/chcr_algo.h:346:3: error: 'SHA256_H0' undeclared here (not in a function); did you mean 'SHA1_H0'?
346 | SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
| ^~~~~~~~~
| SHA1_H0
>> drivers/crypto/chelsio/chcr_algo.h:346:14: error: 'SHA256_H1' undeclared here (not in a function); did you mean 'SHA1_H1'?
346 | SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
| ^~~~~~~~~
| SHA1_H1
>> drivers/crypto/chelsio/chcr_algo.h:346:25: error: 'SHA256_H2' undeclared here (not in a function); did you mean 'SHA1_H2'?
346 | SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
| ^~~~~~~~~
| SHA1_H2
>> drivers/crypto/chelsio/chcr_algo.h:346:36: error: 'SHA256_H3' undeclared here (not in a function); did you mean 'SHA1_H3'?
346 | SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
| ^~~~~~~~~
| SHA1_H3
>> drivers/crypto/chelsio/chcr_algo.h:347:3: error: 'SHA256_H4' undeclared here (not in a function); did you mean 'SHA1_H4'?
347 | SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
| ^~~~~~~~~
| SHA1_H4
>> drivers/crypto/chelsio/chcr_algo.h:347:14: error: 'SHA256_H5' undeclared here (not in a function)
347 | SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
| ^~~~~~~~~
>> drivers/crypto/chelsio/chcr_algo.h:347:25: error: 'SHA256_H6' undeclared here (not in a function)
347 | SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
| ^~~~~~~~~
>> drivers/crypto/chelsio/chcr_algo.h:347:36: error: 'SHA256_H7' undeclared here (not in a function)
347 | SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
| ^~~~~~~~~
>> drivers/crypto/chelsio/chcr_algo.h:350:35: error: 'SHA512_DIGEST_SIZE' undeclared here (not in a function); did you mean 'SHA1_DIGEST_SIZE'?
350 | static const u64 chcr_sha384_init[SHA512_DIGEST_SIZE / 8] = {
| ^~~~~~~~~~~~~~~~~~
| SHA1_DIGEST_SIZE
>> drivers/crypto/chelsio/chcr_algo.h:351:3: error: 'SHA384_H0' undeclared here (not in a function); did you mean 'SHA1_H0'?
351 | SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
| ^~~~~~~~~
| SHA1_H0
>> drivers/crypto/chelsio/chcr_algo.h:351:14: error: 'SHA384_H1' undeclared here (not in a function); did you mean 'SHA1_H1'?
351 | SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
| ^~~~~~~~~
| SHA1_H1
drivers/crypto/chelsio/chcr_algo.h:351:25: error: 'SHA384_H2' undeclared here (not in a function); did you mean 'SHA1_H2'?
351 | SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
| ^~~~~~~~~
| SHA1_H2
drivers/crypto/chelsio/chcr_algo.h:351:36: error: 'SHA384_H3' undeclared here (not in a function); did you mean 'SHA1_H3'?
351 | SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
| ^~~~~~~~~
| SHA1_H3
drivers/crypto/chelsio/chcr_algo.h:352:3: error: 'SHA384_H4' undeclared here (not in a function); did you mean 'SHA1_H4'?
352 | SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
| ^~~~~~~~~
| SHA1_H4
drivers/crypto/chelsio/chcr_algo.h:352:14: error: 'SHA384_H5' undeclared here (not in a function)
352 | SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
| ^~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:352:25: error: 'SHA384_H6' undeclared here (not in a function)
352 | SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
| ^~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:352:36: error: 'SHA384_H7' undeclared here (not in a function)
352 | SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
| ^~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:356:3: error: 'SHA512_H0' undeclared here (not in a function); did you mean 'SHA1_H0'?
356 | SHA512_H0, SHA512_H1, SHA512_H2, SHA512_H3,
| ^~~~~~~~~
| SHA1_H0
drivers/crypto/chelsio/chcr_algo.h:356:14: error: 'SHA512_H1' undeclared here (not in a function); did you mean 'SHA1_H1'?
356 | SHA512_H0, SHA512_H1, SHA512_H2, SHA512_H3,
| ^~~~~~~~~
| SHA1_H1
drivers/crypto/chelsio/chcr_algo.h:356:25: error: 'SHA512_H2' undeclared here (not in a function); did you mean 'SHA1_H2'?
356 | SHA512_H0, SHA512_H1, SHA512_H2, SHA512_H3,
| ^~~~~~~~~
| SHA1_H2
drivers/crypto/chelsio/chcr_algo.h:356:36: error: 'SHA512_H3' undeclared here (not in a function); did you mean 'SHA1_H3'?
356 | SHA512_H0, SHA512_H1, SHA512_H2, SHA512_H3,
| ^~~~~~~~~
| SHA1_H3
drivers/crypto/chelsio/chcr_algo.h:357:3: error: 'SHA512_H4' undeclared here (not in a function); did you mean 'SHA1_H4'?
357 | SHA512_H4, SHA512_H5, SHA512_H6, SHA512_H7,
| ^~~~~~~~~
| SHA1_H4
drivers/crypto/chelsio/chcr_algo.h:357:14: error: 'SHA512_H5' undeclared here (not in a function); did you mean 'SHA1_H0'?
357 | SHA512_H4, SHA512_H5, SHA512_H6, SHA512_H7,
| ^~~~~~~~~
| SHA1_H0
drivers/crypto/chelsio/chcr_algo.h:357:25: error: 'SHA512_H6' undeclared here (not in a function); did you mean 'SHA1_H0'?
357 | SHA512_H4, SHA512_H5, SHA512_H6, SHA512_H7,
| ^~~~~~~~~
| SHA1_H0
drivers/crypto/chelsio/chcr_algo.h:357:36: error: 'SHA512_H7' undeclared here (not in a function); did you mean 'SHA1_H0'?
357 | SHA512_H4, SHA512_H5, SHA512_H6, SHA512_H7,
| ^~~~~~~~~
| SHA1_H0
drivers/crypto/chelsio/chcr_algo.h: In function 'copy_hash_init_values':
drivers/crypto/chelsio/chcr_algo.h:373:7: error: 'SHA224_DIGEST_SIZE' undeclared (first use in this function); did you mean 'SHA1_DIGEST_SIZE'?
373 | case SHA224_DIGEST_SIZE:
| ^~~~~~~~~~~~~~~~~~
| SHA1_DIGEST_SIZE
drivers/crypto/chelsio/chcr_algo.h:373:7: note: each undeclared identifier is reported only once for each function it appears in
drivers/crypto/chelsio/chcr_algo.h:381:7: error: 'SHA384_DIGEST_SIZE' undeclared (first use in this function); did you mean 'SHA1_DIGEST_SIZE'?
381 | case SHA384_DIGEST_SIZE:
| ^~~~~~~~~~~~~~~~~~
| SHA1_DIGEST_SIZE
At top level:
drivers/crypto/chelsio/chcr_algo.h:355:18: warning: 'chcr_sha512_init' defined but not used [-Wunused-variable]
355 | static const u64 chcr_sha512_init[SHA512_DIGEST_SIZE / 8] = {
| ^~~~~~~~~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:350:18: warning: 'chcr_sha384_init' defined but not used [-Wunused-variable]
350 | static const u64 chcr_sha384_init[SHA512_DIGEST_SIZE / 8] = {
| ^~~~~~~~~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:345:18: warning: 'chcr_sha256_init' defined but not used [-Wunused-variable]
345 | static const u32 chcr_sha256_init[SHA256_DIGEST_SIZE / 4] = {
| ^~~~~~~~~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:340:18: warning: 'chcr_sha224_init' defined but not used [-Wunused-variable]
340 | static const u32 chcr_sha224_init[SHA256_DIGEST_SIZE / 4] = {
| ^~~~~~~~~~~~~~~~
vim +340 drivers/crypto/chelsio/chcr_algo.h
324429d74127d0 Hariprasad Shenai 2016-08-17 339
6e4655e20d92c9 Hans de Goede 2019-09-01 @340 static const u32 chcr_sha224_init[SHA256_DIGEST_SIZE / 4] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @341 SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @342 SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 343 };
324429d74127d0 Hariprasad Shenai 2016-08-17 344
6e4655e20d92c9 Hans de Goede 2019-09-01 345 static const u32 chcr_sha256_init[SHA256_DIGEST_SIZE / 4] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @346 SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @347 SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 348 };
324429d74127d0 Hariprasad Shenai 2016-08-17 349
6e4655e20d92c9 Hans de Goede 2019-09-01 @350 static const u64 chcr_sha384_init[SHA512_DIGEST_SIZE / 8] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @351 SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @352 SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 353 };
324429d74127d0 Hariprasad Shenai 2016-08-17 354
6e4655e20d92c9 Hans de Goede 2019-09-01 355 static const u64 chcr_sha512_init[SHA512_DIGEST_SIZE / 8] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @356 SHA512_H0, SHA512_H1, SHA512_H2, SHA512_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @357 SHA512_H4, SHA512_H5, SHA512_H6, SHA512_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 358 };
324429d74127d0 Hariprasad Shenai 2016-08-17 359
324429d74127d0 Hariprasad Shenai 2016-08-17 360 static inline void copy_hash_init_values(char *key, int digestsize)
324429d74127d0 Hariprasad Shenai 2016-08-17 361 {
324429d74127d0 Hariprasad Shenai 2016-08-17 362 u8 i;
324429d74127d0 Hariprasad Shenai 2016-08-17 363 __be32 *dkey = (__be32 *)key;
324429d74127d0 Hariprasad Shenai 2016-08-17 364 u64 *ldkey = (u64 *)key;
6e4655e20d92c9 Hans de Goede 2019-09-01 365 __be64 *sha384 = (__be64 *)chcr_sha384_init;
6e4655e20d92c9 Hans de Goede 2019-09-01 366 __be64 *sha512 = (__be64 *)chcr_sha512_init;
324429d74127d0 Hariprasad Shenai 2016-08-17 367
324429d74127d0 Hariprasad Shenai 2016-08-17 368 switch (digestsize) {
324429d74127d0 Hariprasad Shenai 2016-08-17 369 case SHA1_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 370 for (i = 0; i < SHA1_INIT_STATE; i++)
6e4655e20d92c9 Hans de Goede 2019-09-01 371 dkey[i] = cpu_to_be32(chcr_sha1_init[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 372 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 @373 case SHA224_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 374 for (i = 0; i < SHA224_INIT_STATE; i++)
6e4655e20d92c9 Hans de Goede 2019-09-01 375 dkey[i] = cpu_to_be32(chcr_sha224_init[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 376 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 377 case SHA256_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 378 for (i = 0; i < SHA256_INIT_STATE; i++)
6e4655e20d92c9 Hans de Goede 2019-09-01 379 dkey[i] = cpu_to_be32(chcr_sha256_init[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 380 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 @381 case SHA384_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 382 for (i = 0; i < SHA384_INIT_STATE; i++)
324429d74127d0 Hariprasad Shenai 2016-08-17 383 ldkey[i] = be64_to_cpu(sha384[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 384 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 385 case SHA512_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 386 for (i = 0; i < SHA512_INIT_STATE; i++)
324429d74127d0 Hariprasad Shenai 2016-08-17 387 ldkey[i] = be64_to_cpu(sha512[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 388 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 389 }
324429d74127d0 Hariprasad Shenai 2016-08-17 390 }
324429d74127d0 Hariprasad Shenai 2016-08-17 391
:::::: The code at line 340 was first introduced by commit
:::::: 6e4655e20d92c902932dc65909c31c414b4aba2d crypto: chelsio - Rename arrays to avoid conflict with crypto/sha256.h
:::::: TO: Hans de Goede <hdegoede(a)redhat.com>
:::::: 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