include/linux/spinlock.h:346:2: error: invalid type argument of unary (have 'spinlock_t' {aka 'struct spinlock'})
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc4f28bb3daf3265d6bc5f73b497306985bb23ab
commit: de8f5e4f2dc1f032b46afda0a78cab5456974f89 lockdep: Introduce wait-type checks
date: 6 months ago
config: mips-randconfig-r011-20200916 (attached as .config)
compiler: mipsel-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 de8f5e4f2dc1f032b46afda0a78cab5456974f89
# 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 >>):
In file included from drivers/pcmcia/vrc4173_cardu.c:41:
drivers/pcmcia/vrc4173_cardu.h:239:2: error: unknown type name 'socket_cap_t'
239 | socket_cap_t cap;
| ^~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:51:30: error: conflicting types for 'pcmcia_register_socket'
51 | extern struct socket_info_t *pcmcia_register_socket (int slot,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/pcmcia/vrc4173_cardu.c:39:
include/pcmcia/ss.h:259:12: note: previous declaration of 'pcmcia_register_socket' was here
259 | extern int pcmcia_register_socket(struct pcmcia_socket *socket);
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:54:13: error: conflicting types for 'pcmcia_unregister_socket'
54 | extern void pcmcia_unregister_socket(struct socket_info_t *s);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/pcmcia/vrc4173_cardu.c:39:
include/pcmcia/ss.h:260:13: note: previous declaration of 'pcmcia_unregister_socket' was here
260 | extern void pcmcia_unregister_socket(struct pcmcia_socket *socket);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c: In function 'cardu_init':
drivers/pcmcia/vrc4173_cardu.c:131:13: error: request for member 'features' in something not a structure or union
131 | socket->cap.features |= SS_CAP_PCCARD | SS_CAP_PAGE_REGS;
| ^
drivers/pcmcia/vrc4173_cardu.c:132:13: error: request for member 'irq_mask' in something not a structure or union
132 | socket->cap.irq_mask = 0;
| ^
drivers/pcmcia/vrc4173_cardu.c:133:13: error: request for member 'map_size' in something not a structure or union
133 | socket->cap.map_size = 0x1000;
| ^
drivers/pcmcia/vrc4173_cardu.c:134:13: error: request for member 'pci_irq' in something not a structure or union
134 | socket->cap.pci_irq = socket->dev->irq;
| ^
In file included from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/pcmcia/vrc4173_cardu.c:32:
drivers/pcmcia/vrc4173_cardu.c:136:23: error: incompatible type for argument 1 of 'spinlock_check'
136 | spin_lock_init(socket->event_lock);
| ~~~~~~^~~~~~~~~~~~
| |
| spinlock_t {aka struct spinlock}
include/linux/spinlock.h:345:17: note: in definition of macro 'spin_lock_init'
345 | spinlock_check(_lock); \
| ^~~~~
include/linux/spinlock.h:326:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'spinlock_t' {aka 'struct spinlock'}
326 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
| ~~~~~~~~~~~~^~~~
>> include/linux/spinlock.h:346:2: error: invalid type argument of unary '*' (have 'spinlock_t' {aka 'struct spinlock'})
346 | *(_lock) = __SPIN_LOCK_UNLOCKED(_lock); \
| ^~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:136:2: note: in expansion of macro 'spin_lock_init'
136 | spin_lock_init(socket->event_lock);
| ^~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c: At top level:
drivers/pcmcia/vrc4173_cardu.c:156:52: error: unknown type name 'socket_cap_t'; did you mean 'socket_state_t'?
156 | static int cardu_inquire_socket(unsigned int sock, socket_cap_t *cap)
| ^~~~~~~~~~~~
| socket_state_t
drivers/pcmcia/vrc4173_cardu.c: In function 'cardu_get_mem_map':
drivers/pcmcia/vrc4173_cardu.c:333:5: error: 'struct pccard_mem_map' has no member named 'sys_start'
333 | mem->sys_start = start + page;
| ^~
drivers/pcmcia/vrc4173_cardu.c:334:5: error: 'struct pccard_mem_map' has no member named 'sys_stop'
334 | mem->sys_stop = start + page;
| ^~
drivers/pcmcia/vrc4173_cardu.c: In function 'cardu_set_mem_map':
drivers/pcmcia/vrc4173_cardu.c:348:17: error: 'struct pccard_mem_map' has no member named 'sys_start'
348 | sys_start = mem->sys_start;
| ^~
drivers/pcmcia/vrc4173_cardu.c:349:16: error: 'struct pccard_mem_map' has no member named 'sys_stop'
349 | sys_stop = mem->sys_stop;
| ^~
drivers/pcmcia/vrc4173_cardu.c: At top level:
drivers/pcmcia/vrc4173_cardu.c:388:12: error: initialization of 'int (*)(struct pcmcia_socket *)' from incompatible pointer type 'int (*)(unsigned int)' [-Werror=incompatible-pointer-types]
388 | .init = cardu_init,
| ^~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:388:12: note: (near initialization for 'cardu_operations.init')
drivers/pcmcia/vrc4173_cardu.c:389:3: error: 'struct pccard_operations' has no member named 'register_callback'
389 | .register_callback = cardu_register_callback,
| ^~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:389:23: error: initialization of 'int (*)(struct pcmcia_socket *)' from incompatible pointer type 'int (*)(unsigned int, void (*)(void *, unsigned int), void *)' [-Werror=incompatible-pointer-types]
389 | .register_callback = cardu_register_callback,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:389:23: note: (near initialization for 'cardu_operations.suspend')
drivers/pcmcia/vrc4173_cardu.c:390:3: error: 'struct pccard_operations' has no member named 'inquire_socket'
390 | .inquire_socket = cardu_inquire_socket,
| ^~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:390:21: error: 'cardu_inquire_socket' undeclared here (not in a function); did you mean 'cardu_set_socket'?
390 | .inquire_socket = cardu_inquire_socket,
| ^~~~~~~~~~~~~~~~~~~~
| cardu_set_socket
drivers/pcmcia/vrc4173_cardu.c:391:17: error: initialization of 'int (*)(struct pcmcia_socket *, u_int *)' {aka 'int (*)(struct pcmcia_socket *, unsigned int *)'} from incompatible pointer type 'int (*)(unsigned int, u_int *)' {aka 'int (*)(unsigned int, unsigned int *)'} [-Werror=incompatible-pointer-types]
391 | .get_status = cardu_get_status,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:391:17: note: (near initialization for 'cardu_operations.get_status')
drivers/pcmcia/vrc4173_cardu.c:392:17: error: initialization of 'int (*)(struct pcmcia_socket *, socket_state_t *)' {aka 'int (*)(struct pcmcia_socket *, struct socket_state_t *)'} from incompatible pointer type 'int (*)(unsigned int, socket_state_t *)' {aka 'int (*)(unsigned int, struct socket_state_t *)'} [-Werror=incompatible-pointer-types]
392 | .set_socket = cardu_set_socket,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:392:17: note: (near initialization for 'cardu_operations.set_socket')
drivers/pcmcia/vrc4173_cardu.c:393:3: error: 'struct pccard_operations' has no member named 'get_io_map'; did you mean 'set_io_map'?
393 | .get_io_map = cardu_get_io_map,
| ^~~~~~~~~~
| set_io_map
drivers/pcmcia/vrc4173_cardu.c:393:17: error: initialization of 'int (*)(struct pcmcia_socket *, struct pccard_io_map *)' from incompatible pointer type 'int (*)(unsigned int, struct pccard_io_map *)' [-Werror=incompatible-pointer-types]
393 | .get_io_map = cardu_get_io_map,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:393:17: note: (near initialization for 'cardu_operations.set_io_map')
drivers/pcmcia/vrc4173_cardu.c:394:17: error: initialization of 'int (*)(struct pcmcia_socket *, struct pccard_io_map *)' from incompatible pointer type 'int (*)(unsigned int, struct pccard_io_map *)' [-Werror=incompatible-pointer-types]
394 | .set_io_map = cardu_set_io_map,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:394:17: note: (near initialization for 'cardu_operations.set_io_map')
drivers/pcmcia/vrc4173_cardu.c:394:17: warning: initialized field overwritten [-Woverride-init]
drivers/pcmcia/vrc4173_cardu.c:394:17: note: (near initialization for 'cardu_operations.set_io_map')
drivers/pcmcia/vrc4173_cardu.c:395:3: error: 'struct pccard_operations' has no member named 'get_mem_map'; did you mean 'set_mem_map'?
395 | .get_mem_map = cardu_get_mem_map,
| ^~~~~~~~~~~
| set_mem_map
drivers/pcmcia/vrc4173_cardu.c:395:18: error: initialization of 'int (*)(struct pcmcia_socket *, struct pccard_mem_map *)' from incompatible pointer type 'int (*)(unsigned int, struct pccard_mem_map *)' [-Werror=incompatible-pointer-types]
395 | .get_mem_map = cardu_get_mem_map,
| ^~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:395:18: note: (near initialization for 'cardu_operations.set_mem_map')
drivers/pcmcia/vrc4173_cardu.c:396:18: error: initialization of 'int (*)(struct pcmcia_socket *, struct pccard_mem_map *)' from incompatible pointer type 'int (*)(unsigned int, struct pccard_mem_map *)' [-Werror=incompatible-pointer-types]
396 | .set_mem_map = cardu_set_mem_map,
| ^~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:396:18: note: (near initialization for 'cardu_operations.set_mem_map')
drivers/pcmcia/vrc4173_cardu.c:396:18: warning: initialized field overwritten [-Woverride-init]
drivers/pcmcia/vrc4173_cardu.c:396:18: note: (near initialization for 'cardu_operations.set_mem_map')
drivers/pcmcia/vrc4173_cardu.c:397:3: error: 'struct pccard_operations' has no member named 'proc_setup'
397 | .proc_setup = cardu_proc_setup,
| ^~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:397:17: warning: excess elements in struct initializer
397 | .proc_setup = cardu_proc_setup,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:397:17: note: (near initialization for 'cardu_operations')
drivers/pcmcia/vrc4173_cardu.c: In function 'cardu_interrupt':
drivers/pcmcia/vrc4173_cardu.c:448:46: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
448 | INIT_WORK(&socket->tq_work, cardu_bh, socket);
| ^
In file included from include/linux/mm_types.h:16,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/pcmcia/vrc4173_cardu.c:32:
include/linux/workqueue.h:249: note: macro "INIT_WORK" defined here
249 | #define INIT_WORK(_work, _func) \
|
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout de8f5e4f2dc1f032b46afda0a78cab5456974f89
vim +346 include/linux/spinlock.h
342
343 # define spin_lock_init(_lock) \
344 do { \
345 spinlock_check(_lock); \
> 346 *(_lock) = __SPIN_LOCK_UNLOCKED(_lock); \
347 } while (0)
348
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 1 week
[pm:acpica-osl 6/6] drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpica-osl
head: c32c3c4079f8a62616413abbead45b6622fb7602
commit: c32c3c4079f8a62616413abbead45b6622fb7602 [6/6] ACPI: OSL: Make ACPICA use logical addresses of GPE blocks
config: x86_64-randconfig-s022-20200904 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout c32c3c4079f8a62616413abbead45b6622fb7602
# 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 >>)
drivers/acpi/osl.c:376:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *extern [addressable] [toplevel] acpi_gbl_xgpe0_block_logical_address @@ got void [noderef] __iomem * @@
>> drivers/acpi/osl.c:1748:46: sparse: expected void *extern [addressable] [toplevel] acpi_gbl_xgpe0_block_logical_address
drivers/acpi/osl.c:1748:46: sparse: got void [noderef] __iomem *
>> drivers/acpi/osl.c:1750:46: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *extern [addressable] [toplevel] acpi_gbl_xgpe1_block_logical_address @@ got void [noderef] __iomem * @@
>> drivers/acpi/osl.c:1750:46: sparse: expected void *extern [addressable] [toplevel] acpi_gbl_xgpe1_block_logical_address
drivers/acpi/osl.c:1750:46: sparse: got void [noderef] __iomem *
drivers/acpi/osl.c:1760:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *rv @@ got void [noderef] __iomem * @@
drivers/acpi/osl.c:1760:20: sparse: expected void *rv
drivers/acpi/osl.c:1760:20: sparse: got void [noderef] __iomem *
drivers/acpi/osl.c:708:1: sparse: sparse: context imbalance in 'acpi_os_read_memory' - wrong count at exit
drivers/acpi/osl.c:741:1: sparse: sparse: context imbalance in 'acpi_os_write_memory' - wrong count at exit
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commi...
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git fetch --no-tags pm acpica-osl
git checkout c32c3c4079f8a62616413abbead45b6622fb7602
vim +1748 drivers/acpi/osl.c
1742
1743 acpi_status __init acpi_os_initialize(void)
1744 {
1745 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block);
1746 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block);
1747
> 1748 acpi_gbl_xgpe0_block_logical_address =
1749 acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block);
> 1750 acpi_gbl_xgpe1_block_logical_address =
1751 acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block);
1752
1753 if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) {
1754 /*
1755 * Use acpi_os_map_generic_address to pre-map the reset
1756 * register if it's in system memory.
1757 */
1758 void *rv;
1759
1760 rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register);
1761 pr_debug(PREFIX "%s: map reset_reg %s\n", __func__,
1762 rv ? "successful" : "failed");
1763 }
1764 acpi_os_initialized = true;
1765
1766 return AE_OK;
1767 }
1768
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
6 months
drivers/crypto/sa2ul.c:432:1: warning: the frame size of 1076 bytes is larger than 1024 bytes
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4b6c093e21d36bede0fd88fd0aeb3b03647260e4
commit: d2c8ac187fc922e73930a1b2f6a211e27f595d01 crypto: sa2ul - Add AEAD algorithm support
date: 3 weeks ago
config: arc-randconfig-r023-20200816 (attached as .config)
compiler: arc-elf-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 d2c8ac187fc922e73930a1b2f6a211e27f595d01
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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 include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/crypto/sa2ul.c:12:
drivers/crypto/sa2ul.c: In function 'sa_sha_init':
drivers/crypto/sa2ul.c:1486:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1486 | crypto_ahash_digestsize(tfm), (u64)rctx);
| ^
include/linux/dev_printk.h:123:47: note: in definition of macro 'dev_dbg'
123 | dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/crypto/sa2ul.c: In function 'sa_prepare_iopads':
>> drivers/crypto/sa2ul.c:432:1: warning: the frame size of 1076 bytes is larger than 1024 bytes [-Wframe-larger-than=]
432 | }
| ^
vim +432 drivers/crypto/sa2ul.c
407
408 static void sa_prepare_iopads(struct algo_data *data, const u8 *key,
409 u16 key_sz, __be32 *ipad, __be32 *opad)
410 {
411 SHASH_DESC_ON_STACK(shash, data->ctx->shash);
412 int block_size = crypto_shash_blocksize(data->ctx->shash);
413 int digest_size = crypto_shash_digestsize(data->ctx->shash);
414 u8 k_ipad[SHA1_BLOCK_SIZE];
415 u8 k_opad[SHA1_BLOCK_SIZE];
416
417 shash->tfm = data->ctx->shash;
418
419 prepare_kiopad(k_ipad, k_opad, key, key_sz);
420
421 memzero_explicit(ipad, block_size);
422 memzero_explicit(opad, block_size);
423
424 crypto_shash_init(shash);
425 crypto_shash_update(shash, k_ipad, block_size);
426 sa_export_shash(shash, block_size, digest_size, ipad);
427
428 crypto_shash_init(shash);
429 crypto_shash_update(shash, k_opad, block_size);
430
431 sa_export_shash(shash, block_size, digest_size, opad);
> 432 }
433
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
6 months
[linux-next:master 9468/11956] drivers/pci/controller/pcie-brcmstb.c:1270 brcm_pcie_probe() warn: 'pcie->clk' not released on lines: 1237.
by Dan Carpenter
Hi Jim,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 49e7e3e905e437a02782019570f70997e2da9101
commit: 5d98ac4e2823dcfd5e8a2ac3c71ec1ed6cdd1f54 [9468/11956] PCI: brcmstb: Set additional internal memory DMA viewport sizes
config: arm64-randconfig-m031-20200929 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/pci/controller/pcie-brcmstb.c:1270 brcm_pcie_probe() warn: 'pcie->clk' not released on lines: 1237.
vim +1270 drivers/pci/controller/pcie-brcmstb.c
c0452137034bda8 Jim Quinlan 2019-12-16 1176 static int brcm_pcie_probe(struct platform_device *pdev)
c0452137034bda8 Jim Quinlan 2019-12-16 1177 {
40ca1bf580ef24d Jim Quinlan 2019-12-16 1178 struct device_node *np = pdev->dev.of_node, *msi_np;
c0452137034bda8 Jim Quinlan 2019-12-16 1179 struct pci_host_bridge *bridge;
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1180 struct device_node *fw_np;
1cf1b0a6dd95250 Jim Quinlan 2020-09-11 1181 const struct pcie_cfg_data *data;
c0452137034bda8 Jim Quinlan 2019-12-16 1182 struct brcm_pcie *pcie;
c0452137034bda8 Jim Quinlan 2019-12-16 1183 int ret;
c0452137034bda8 Jim Quinlan 2019-12-16 1184
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1185 /*
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1186 * We have to wait for Raspberry Pi's firmware interface to be up as a
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1187 * PCI fixup, rpi_firmware_init_vl805(), depends on it. This driver's
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1188 * probe can race with the firmware interface's (see
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1189 * drivers/firmware/raspberrypi.c) and potentially break the PCI fixup.
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1190 */
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1191 fw_np = of_find_compatible_node(NULL, NULL,
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1192 "raspberrypi,bcm2835-firmware");
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1193 if (fw_np && !rpi_firmware_get(fw_np)) {
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1194 of_node_put(fw_np);
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1195 return -EPROBE_DEFER;
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1196 }
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1197 of_node_put(fw_np);
44331189f9082c7 Nicolas Saenz Julienne 2020-05-05 1198
c0452137034bda8 Jim Quinlan 2019-12-16 1199 bridge = devm_pci_alloc_host_bridge(&pdev->dev, sizeof(*pcie));
c0452137034bda8 Jim Quinlan 2019-12-16 1200 if (!bridge)
c0452137034bda8 Jim Quinlan 2019-12-16 1201 return -ENOMEM;
c0452137034bda8 Jim Quinlan 2019-12-16 1202
1cf1b0a6dd95250 Jim Quinlan 2020-09-11 1203 data = of_device_get_match_data(&pdev->dev);
1cf1b0a6dd95250 Jim Quinlan 2020-09-11 1204 if (!data) {
1cf1b0a6dd95250 Jim Quinlan 2020-09-11 1205 pr_err("failed to look up compatible string\n");
1cf1b0a6dd95250 Jim Quinlan 2020-09-11 1206 return -EINVAL;
1cf1b0a6dd95250 Jim Quinlan 2020-09-11 1207 }
1cf1b0a6dd95250 Jim Quinlan 2020-09-11 1208
c0452137034bda8 Jim Quinlan 2019-12-16 1209 pcie = pci_host_bridge_priv(bridge);
c0452137034bda8 Jim Quinlan 2019-12-16 1210 pcie->dev = &pdev->dev;
c0452137034bda8 Jim Quinlan 2019-12-16 1211 pcie->np = np;
1cf1b0a6dd95250 Jim Quinlan 2020-09-11 1212 pcie->reg_offsets = data->offsets;
1cf1b0a6dd95250 Jim Quinlan 2020-09-11 1213 pcie->type = data->type;
04356ac30771091 Jim Quinlan 2020-09-11 1214 pcie->perst_set = data->perst_set;
04356ac30771091 Jim Quinlan 2020-09-11 1215 pcie->bridge_sw_init_set = data->bridge_sw_init_set;
c0452137034bda8 Jim Quinlan 2019-12-16 1216
3cf0eead9fb895d Dejin Zheng 2020-07-08 1217 pcie->base = devm_platform_ioremap_resource(pdev, 0);
c0452137034bda8 Jim Quinlan 2019-12-16 1218 if (IS_ERR(pcie->base))
c0452137034bda8 Jim Quinlan 2019-12-16 1219 return PTR_ERR(pcie->base);
c0452137034bda8 Jim Quinlan 2019-12-16 1220
c0452137034bda8 Jim Quinlan 2019-12-16 1221 pcie->clk = devm_clk_get_optional(&pdev->dev, "sw_pcie");
c0452137034bda8 Jim Quinlan 2019-12-16 1222 if (IS_ERR(pcie->clk))
c0452137034bda8 Jim Quinlan 2019-12-16 1223 return PTR_ERR(pcie->clk);
c0452137034bda8 Jim Quinlan 2019-12-16 1224
c0452137034bda8 Jim Quinlan 2019-12-16 1225 ret = of_pci_get_max_link_speed(np);
c0452137034bda8 Jim Quinlan 2019-12-16 1226 pcie->gen = (ret < 0) ? 0 : ret;
c0452137034bda8 Jim Quinlan 2019-12-16 1227
c0452137034bda8 Jim Quinlan 2019-12-16 1228 pcie->ssc = of_property_read_bool(np, "brcm,enable-ssc");
c0452137034bda8 Jim Quinlan 2019-12-16 1229
c0452137034bda8 Jim Quinlan 2019-12-16 1230 ret = clk_prepare_enable(pcie->clk);
c0452137034bda8 Jim Quinlan 2019-12-16 1231 if (ret) {
c0452137034bda8 Jim Quinlan 2019-12-16 1232 dev_err(&pdev->dev, "could not enable clock\n");
c0452137034bda8 Jim Quinlan 2019-12-16 1233 return ret;
c0452137034bda8 Jim Quinlan 2019-12-16 1234 }
b98f52bc6495110 Jim Quinlan 2020-09-11 1235 pcie->rescal = devm_reset_control_get_optional_shared(&pdev->dev, "rescal");
b98f52bc6495110 Jim Quinlan 2020-09-11 1236 if (IS_ERR(pcie->rescal))
b98f52bc6495110 Jim Quinlan 2020-09-11 1237 return PTR_ERR(pcie->rescal);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Smatch complains that some of these don't do a "goto fail;" should do
the clk_disable_unprepare(pcie->clk); from __brcm_pcie_remove(). The
clk is a devm_ clock. Do devm_ clocks need to be unprepared?
b98f52bc6495110 Jim Quinlan 2020-09-11 1238
b98f52bc6495110 Jim Quinlan 2020-09-11 1239 ret = reset_control_deassert(pcie->rescal);
b98f52bc6495110 Jim Quinlan 2020-09-11 1240 if (ret)
b98f52bc6495110 Jim Quinlan 2020-09-11 1241 dev_err(&pdev->dev, "failed to deassert 'rescal'\n");
b98f52bc6495110 Jim Quinlan 2020-09-11 1242
b98f52bc6495110 Jim Quinlan 2020-09-11 1243 ret = brcm_phy_start(pcie);
b98f52bc6495110 Jim Quinlan 2020-09-11 1244 if (ret) {
b98f52bc6495110 Jim Quinlan 2020-09-11 1245 reset_control_assert(pcie->rescal);
b98f52bc6495110 Jim Quinlan 2020-09-11 1246 return ret;
b98f52bc6495110 Jim Quinlan 2020-09-11 1247 }
c0452137034bda8 Jim Quinlan 2019-12-16 1248
c0452137034bda8 Jim Quinlan 2019-12-16 1249 ret = brcm_pcie_setup(pcie);
c0452137034bda8 Jim Quinlan 2019-12-16 1250 if (ret)
c0452137034bda8 Jim Quinlan 2019-12-16 1251 goto fail;
c0452137034bda8 Jim Quinlan 2019-12-16 1252
40ca1bf580ef24d Jim Quinlan 2019-12-16 1253 msi_np = of_parse_phandle(pcie->np, "msi-parent", 0);
40ca1bf580ef24d Jim Quinlan 2019-12-16 1254 if (pci_msi_enabled() && msi_np == pcie->np) {
40ca1bf580ef24d Jim Quinlan 2019-12-16 1255 ret = brcm_pcie_enable_msi(pcie);
40ca1bf580ef24d Jim Quinlan 2019-12-16 1256 if (ret) {
40ca1bf580ef24d Jim Quinlan 2019-12-16 1257 dev_err(pcie->dev, "probe of internal MSI failed");
40ca1bf580ef24d Jim Quinlan 2019-12-16 1258 goto fail;
40ca1bf580ef24d Jim Quinlan 2019-12-16 1259 }
40ca1bf580ef24d Jim Quinlan 2019-12-16 1260 }
40ca1bf580ef24d Jim Quinlan 2019-12-16 1261
c0452137034bda8 Jim Quinlan 2019-12-16 1262 bridge->ops = &brcm_pcie_ops;
c0452137034bda8 Jim Quinlan 2019-12-16 1263 bridge->sysdata = pcie;
c0452137034bda8 Jim Quinlan 2019-12-16 1264
c0452137034bda8 Jim Quinlan 2019-12-16 1265 platform_set_drvdata(pdev, pcie);
c0452137034bda8 Jim Quinlan 2019-12-16 1266
a37571fa9c04a9e Rob Herring 2020-05-22 1267 return pci_host_probe(bridge);
c0452137034bda8 Jim Quinlan 2019-12-16 1268 fail:
c0452137034bda8 Jim Quinlan 2019-12-16 1269 __brcm_pcie_remove(pcie);
c0452137034bda8 Jim Quinlan 2019-12-16 @1270 return ret;
c0452137034bda8 Jim Quinlan 2019-12-16 1271 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
6 months
drivers/crypto/chelsio/chcr_ktls.c:1078: undefined reference to `tls_get_record'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 86cfccb66937dd6cbf26ed619958b9e587e6a115
commit: 5a4b9fe7fece62ecab6fb28fe92362f83b41c33e cxgb4/chcr: complete record tx handling
date: 5 months ago
config: parisc-randconfig-r013-20200807 (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 5a4b9fe7fece62ecab6fb28fe92362f83b41c33e
# 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 errors (new ones prefixed by >>):
hppa-linux-ld: drivers/crypto/chelsio/chcr_ktls.o: in function `chcr_ktls_xmit':
>> drivers/crypto/chelsio/chcr_ktls.c:1078: undefined reference to `tls_get_record'
hppa-linux-ld: drivers/crypto/chelsio/chcr_ktls.o: in function `.LC10':
>> chcr_ktls.c:(.rodata.cst4+0x0): undefined reference to `tls_validate_xmit_skb'
vim +1078 drivers/crypto/chelsio/chcr_ktls.c
996
997 /* nic tls TX handler */
998 int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev)
999 {
1000 struct chcr_ktls_ofld_ctx_tx *tx_ctx;
1001 struct tcphdr *th = tcp_hdr(skb);
1002 int data_len, qidx, ret = 0, mss;
1003 struct tls_record_info *record;
1004 struct chcr_ktls_info *tx_info;
1005 u32 tls_end_offset, tcp_seq;
1006 struct tls_context *tls_ctx;
1007 struct sk_buff *local_skb;
1008 int new_connection_state;
1009 struct sge_eth_txq *q;
1010 struct adapter *adap;
1011 unsigned long flags;
1012
1013 tcp_seq = ntohl(th->seq);
1014
1015 mss = skb_is_gso(skb) ? skb_shinfo(skb)->gso_size : skb->data_len;
1016
1017 /* check if we haven't set it for ktls offload */
1018 if (!skb->sk || !tls_is_sk_tx_device_offloaded(skb->sk))
1019 goto out;
1020
1021 tls_ctx = tls_get_ctx(skb->sk);
1022 if (unlikely(tls_ctx->netdev != dev))
1023 goto out;
1024
1025 tx_ctx = chcr_get_ktls_tx_context(tls_ctx);
1026 tx_info = tx_ctx->chcr_info;
1027
1028 if (unlikely(!tx_info))
1029 goto out;
1030
1031 /* check the connection state, we don't need to pass new connection
1032 * state, state machine will check and update the new state if it is
1033 * stuck due to responses not received from HW.
1034 * Start the tx handling only if state is KTLS_CONN_TX_READY.
1035 */
1036 new_connection_state = chcr_ktls_update_connection_state(tx_info, 0);
1037 if (new_connection_state != KTLS_CONN_TX_READY)
1038 goto out;
1039
1040 /* don't touch the original skb, make a new skb to extract each records
1041 * and send them separately.
1042 */
1043 local_skb = alloc_skb(0, GFP_KERNEL);
1044
1045 if (unlikely(!local_skb))
1046 return NETDEV_TX_BUSY;
1047
1048 adap = tx_info->adap;
1049 qidx = skb->queue_mapping;
1050 q = &adap->sge.ethtxq[qidx + tx_info->first_qset];
1051 cxgb4_reclaim_completed_tx(adap, &q->q, true);
1052 /* update tcb */
1053 ret = chcr_ktls_xmit_tcb_cpls(tx_info, q, ntohl(th->seq),
1054 ntohl(th->ack_seq),
1055 ntohs(th->window));
1056 if (ret) {
1057 dev_kfree_skb_any(local_skb);
1058 return NETDEV_TX_BUSY;
1059 }
1060
1061 /* copy skb contents into local skb */
1062 chcr_ktls_skb_copy(skb, local_skb);
1063
1064 /* go through the skb and send only one record at a time. */
1065 data_len = skb->data_len;
1066 /* TCP segments can be in received from host either complete or partial.
1067 * chcr_end_part_handler will handle cases if complete record or end
1068 * part of the record is received. Incase of partial end part of record,
1069 * we will send the complete record again.
1070 */
1071 do {
1072 int i;
1073
1074 cxgb4_reclaim_completed_tx(adap, &q->q, true);
1075 /* lock taken */
1076 spin_lock_irqsave(&tx_ctx->base.lock, flags);
1077 /* fetch the tls record */
> 1078 record = tls_get_record(&tx_ctx->base, tcp_seq,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
6 months
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:483:35: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd9fb9bb3340c791a2be106fdc895db75f177343
commit: 1e02e6fbdadb3a0cb56294ff37eeeb8109e1f493 crypto: sun4i-ss - add the A33 variant of SS
date: 9 months ago
config: arm64-randconfig-s031-20200906 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout 1e02e6fbdadb3a0cb56294ff37eeeb8109e1f493
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
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/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:412:28: sparse: sparse: invalid assignment: &=
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:412:28: sparse: left side has type restricted __le32
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:412:28: sparse: right side has type unsigned long
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:419:12: sparse: sparse: invalid assignment: |=
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:419:12: sparse: left side has type restricted __le32
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:419:12: sparse: right side has type int
>> drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:483:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] v @@ got restricted __le32 [usertype] @@
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:483:35: sparse: expected unsigned int [assigned] [usertype] v
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:483:35: sparse: got restricted __le32 [usertype]
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:485:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] v @@ got restricted __be32 [usertype] @@
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:485:35: sparse: expected unsigned int [assigned] [usertype] v
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:485:35: sparse: got restricted __be32 [usertype]
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:490:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [addressable] [assigned] [usertype] v @@ got restricted __le32 [usertype] @@
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:490:27: sparse: expected unsigned int [addressable] [assigned] [usertype] v
drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c:490:27: sparse: got restricted __le32 [usertype]
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1e02e6fbdadb3a0cb56294ff37eeeb8109e1f493
vim +483 drivers/crypto/allwinner/sun4i-ss/sun4i-ss-hash.c
148
149 /*
150 * sun4i_hash_update: update hash engine
151 *
152 * Could be used for both SHA1 and MD5
153 * Write data by step of 32bits and put then in the SS.
154 *
155 * Since we cannot leave partial data and hash state in the engine,
156 * we need to get the hash state at the end of this function.
157 * We can get the hash state every 64 bytes
158 *
159 * So the first work is to get the number of bytes to write to SS modulo 64
160 * The extra bytes will go to a temporary buffer op->buf storing op->len bytes
161 *
162 * So at the begin of update()
163 * if op->len + areq->nbytes < 64
164 * => all data will be written to wait buffer (op->buf) and end=0
165 * if not, write all data from op->buf to the device and position end to
166 * complete to 64bytes
167 *
168 * example 1:
169 * update1 60o => op->len=60
170 * update2 60o => need one more word to have 64 bytes
171 * end=4
172 * so write all data from op->buf and one word of SGs
173 * write remaining data in op->buf
174 * final state op->len=56
175 */
176 static int sun4i_hash(struct ahash_request *areq)
177 {
178 /*
179 * i is the total bytes read from SGs, to be compared to areq->nbytes
180 * i is important because we cannot rely on SG length since the sum of
181 * SG->length could be greater than areq->nbytes
182 *
183 * end is the position when we need to stop writing to the device,
184 * to be compared to i
185 *
186 * in_i: advancement in the current SG
187 */
188 unsigned int i = 0, end, fill, min_fill, nwait, nbw = 0, j = 0, todo;
189 unsigned int in_i = 0;
190 u32 spaces, rx_cnt = SS_RX_DEFAULT, bf[32] = {0}, v, ivmode = 0;
191 struct sun4i_req_ctx *op = ahash_request_ctx(areq);
192 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
193 struct sun4i_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
194 struct sun4i_ss_ctx *ss = tfmctx->ss;
195 struct scatterlist *in_sg = areq->src;
196 struct sg_mapping_iter mi;
197 int in_r, err = 0;
198 size_t copied = 0;
199 __le32 wb = 0;
200
201 dev_dbg(ss->dev, "%s %s bc=%llu len=%u mode=%x wl=%u h0=%0x",
202 __func__, crypto_tfm_alg_name(areq->base.tfm),
203 op->byte_count, areq->nbytes, op->mode,
204 op->len, op->hash[0]);
205
206 if (unlikely(!areq->nbytes) && !(op->flags & SS_HASH_FINAL))
207 return 0;
208
209 /* protect against overflow */
210 if (unlikely(areq->nbytes > UINT_MAX - op->len)) {
211 dev_err(ss->dev, "Cannot process too large request\n");
212 return -EINVAL;
213 }
214
215 if (op->len + areq->nbytes < 64 && !(op->flags & SS_HASH_FINAL)) {
216 /* linearize data to op->buf */
217 copied = sg_pcopy_to_buffer(areq->src, sg_nents(areq->src),
218 op->buf + op->len, areq->nbytes, 0);
219 op->len += copied;
220 return 0;
221 }
222
223 spin_lock_bh(&ss->slock);
224
225 /*
226 * if some data have been processed before,
227 * we need to restore the partial hash state
228 */
229 if (op->byte_count) {
230 ivmode = SS_IV_ARBITRARY;
231 for (i = 0; i < crypto_ahash_digestsize(tfm) / 4; i++)
232 writel(op->hash[i], ss->base + SS_IV0 + i * 4);
233 }
234 /* Enable the device */
235 writel(op->mode | SS_ENABLED | ivmode, ss->base + SS_CTL);
236
237 if (!(op->flags & SS_HASH_UPDATE))
238 goto hash_final;
239
240 /* start of handling data */
241 if (!(op->flags & SS_HASH_FINAL)) {
242 end = ((areq->nbytes + op->len) / 64) * 64 - op->len;
243
244 if (end > areq->nbytes || areq->nbytes - end > 63) {
245 dev_err(ss->dev, "ERROR: Bound error %u %u\n",
246 end, areq->nbytes);
247 err = -EINVAL;
248 goto release_ss;
249 }
250 } else {
251 /* Since we have the flag final, we can go up to modulo 4 */
252 if (areq->nbytes < 4)
253 end = 0;
254 else
255 end = ((areq->nbytes + op->len) / 4) * 4 - op->len;
256 }
257
258 /* TODO if SGlen % 4 and !op->len then DMA */
259 i = 1;
260 while (in_sg && i == 1) {
261 if (in_sg->length % 4)
262 i = 0;
263 in_sg = sg_next(in_sg);
264 }
265 if (i == 1 && !op->len && areq->nbytes)
266 dev_dbg(ss->dev, "We can DMA\n");
267
268 i = 0;
269 sg_miter_start(&mi, areq->src, sg_nents(areq->src),
270 SG_MITER_FROM_SG | SG_MITER_ATOMIC);
271 sg_miter_next(&mi);
272 in_i = 0;
273
274 do {
275 /*
276 * we need to linearize in two case:
277 * - the buffer is already used
278 * - the SG does not have enough byte remaining ( < 4)
279 */
280 if (op->len || (mi.length - in_i) < 4) {
281 /*
282 * if we have entered here we have two reason to stop
283 * - the buffer is full
284 * - reach the end
285 */
286 while (op->len < 64 && i < end) {
287 /* how many bytes we can read from current SG */
288 in_r = min(end - i, 64 - op->len);
289 in_r = min_t(size_t, mi.length - in_i, in_r);
290 memcpy(op->buf + op->len, mi.addr + in_i, in_r);
291 op->len += in_r;
292 i += in_r;
293 in_i += in_r;
294 if (in_i == mi.length) {
295 sg_miter_next(&mi);
296 in_i = 0;
297 }
298 }
299 if (op->len > 3 && !(op->len % 4)) {
300 /* write buf to the device */
301 writesl(ss->base + SS_RXFIFO, op->buf,
302 op->len / 4);
303 op->byte_count += op->len;
304 op->len = 0;
305 }
306 }
307 if (mi.length - in_i > 3 && i < end) {
308 /* how many bytes we can read from current SG */
309 in_r = min_t(size_t, mi.length - in_i, areq->nbytes - i);
310 in_r = min_t(size_t, ((mi.length - in_i) / 4) * 4, in_r);
311 /* how many bytes we can write in the device*/
312 todo = min3((u32)(end - i) / 4, rx_cnt, (u32)in_r / 4);
313 writesl(ss->base + SS_RXFIFO, mi.addr + in_i, todo);
314 op->byte_count += todo * 4;
315 i += todo * 4;
316 in_i += todo * 4;
317 rx_cnt -= todo;
318 if (!rx_cnt) {
319 spaces = readl(ss->base + SS_FCSR);
320 rx_cnt = SS_RXFIFO_SPACES(spaces);
321 }
322 if (in_i == mi.length) {
323 sg_miter_next(&mi);
324 in_i = 0;
325 }
326 }
327 } while (i < end);
328
329 /*
330 * Now we have written to the device all that we can,
331 * store the remaining bytes in op->buf
332 */
333 if ((areq->nbytes - i) < 64) {
334 while (i < areq->nbytes && in_i < mi.length && op->len < 64) {
335 /* how many bytes we can read from current SG */
336 in_r = min(areq->nbytes - i, 64 - op->len);
337 in_r = min_t(size_t, mi.length - in_i, in_r);
338 memcpy(op->buf + op->len, mi.addr + in_i, in_r);
339 op->len += in_r;
340 i += in_r;
341 in_i += in_r;
342 if (in_i == mi.length) {
343 sg_miter_next(&mi);
344 in_i = 0;
345 }
346 }
347 }
348
349 sg_miter_stop(&mi);
350
351 /*
352 * End of data process
353 * Now if we have the flag final go to finalize part
354 * If not, store the partial hash
355 */
356 if (op->flags & SS_HASH_FINAL)
357 goto hash_final;
358
359 writel(op->mode | SS_ENABLED | SS_DATA_END, ss->base + SS_CTL);
360 i = 0;
361 do {
362 v = readl(ss->base + SS_CTL);
363 i++;
364 } while (i < SS_TIMEOUT && (v & SS_DATA_END));
365 if (unlikely(i >= SS_TIMEOUT)) {
366 dev_err_ratelimited(ss->dev,
367 "ERROR: hash end timeout %d>%d ctl=%x len=%u\n",
368 i, SS_TIMEOUT, v, areq->nbytes);
369 err = -EIO;
370 goto release_ss;
371 }
372
373 /*
374 * The datasheet isn't very clear about when to retrieve the digest. The
375 * bit SS_DATA_END is cleared when the engine has processed the data and
376 * when the digest is computed *but* it doesn't mean the digest is
377 * available in the digest registers. Hence the delay to be sure we can
378 * read it.
379 */
380 ndelay(1);
381
382 for (i = 0; i < crypto_ahash_digestsize(tfm) / 4; i++)
383 op->hash[i] = readl(ss->base + SS_MD0 + i * 4);
384
385 goto release_ss;
386
387 /*
388 * hash_final: finalize hashing operation
389 *
390 * If we have some remaining bytes, we write them.
391 * Then ask the SS for finalizing the hashing operation
392 *
393 * I do not check RX FIFO size in this function since the size is 32
394 * after each enabling and this function neither write more than 32 words.
395 * If we come from the update part, we cannot have more than
396 * 3 remaining bytes to write and SS is fast enough to not care about it.
397 */
398
399 hash_final:
400
401 /* write the remaining words of the wait buffer */
402 if (op->len) {
403 nwait = op->len / 4;
404 if (nwait) {
405 writesl(ss->base + SS_RXFIFO, op->buf, nwait);
406 op->byte_count += 4 * nwait;
407 }
408
409 nbw = op->len - 4 * nwait;
410 if (nbw) {
411 wb = cpu_to_le32(*(u32 *)(op->buf + nwait * 4));
412 wb &= GENMASK((nbw * 8) - 1, 0);
413
414 op->byte_count += nbw;
415 }
416 }
417
418 /* write the remaining bytes of the nbw buffer */
419 wb |= ((1 << 7) << (nbw * 8));
420 bf[j++] = le32_to_cpu(wb);
421
422 /*
423 * number of space to pad to obtain 64o minus 8(size) minus 4 (final 1)
424 * I take the operations from other MD5/SHA1 implementations
425 */
426
427 /* last block size */
428 fill = 64 - (op->byte_count % 64);
429 min_fill = 2 * sizeof(u32) + (nbw ? 0 : sizeof(u32));
430
431 /* if we can't fill all data, jump to the next 64 block */
432 if (fill < min_fill)
433 fill += 64;
434
435 j += (fill - min_fill) / sizeof(u32);
436
437 /* write the length of data */
438 if (op->mode == SS_OP_SHA1) {
439 __be64 *bits = (__be64 *)&bf[j];
440 *bits = cpu_to_be64(op->byte_count << 3);
441 j += 2;
442 } else {
443 __le64 *bits = (__le64 *)&bf[j];
444 *bits = cpu_to_le64(op->byte_count << 3);
445 j += 2;
446 }
447 writesl(ss->base + SS_RXFIFO, bf, j);
448
449 /* Tell the SS to stop the hashing */
450 writel(op->mode | SS_ENABLED | SS_DATA_END, ss->base + SS_CTL);
451
452 /*
453 * Wait for SS to finish the hash.
454 * The timeout could happen only in case of bad overclocking
455 * or driver bug.
456 */
457 i = 0;
458 do {
459 v = readl(ss->base + SS_CTL);
460 i++;
461 } while (i < SS_TIMEOUT && (v & SS_DATA_END));
462 if (unlikely(i >= SS_TIMEOUT)) {
463 dev_err_ratelimited(ss->dev,
464 "ERROR: hash end timeout %d>%d ctl=%x len=%u\n",
465 i, SS_TIMEOUT, v, areq->nbytes);
466 err = -EIO;
467 goto release_ss;
468 }
469
470 /*
471 * The datasheet isn't very clear about when to retrieve the digest. The
472 * bit SS_DATA_END is cleared when the engine has processed the data and
473 * when the digest is computed *but* it doesn't mean the digest is
474 * available in the digest registers. Hence the delay to be sure we can
475 * read it.
476 */
477 ndelay(1);
478
479 /* Get the hash from the device */
480 if (op->mode == SS_OP_SHA1) {
481 for (i = 0; i < 5; i++) {
482 if (ss->variant->sha1_in_be)
> 483 v = cpu_to_le32(readl(ss->base + SS_MD0 + i * 4));
484 else
485 v = cpu_to_be32(readl(ss->base + SS_MD0 + i * 4));
486 memcpy(areq->result + i * 4, &v, 4);
487 }
488 } else {
489 for (i = 0; i < 4; i++) {
490 v = cpu_to_le32(readl(ss->base + SS_MD0 + i * 4));
491 memcpy(areq->result + i * 4, &v, 4);
492 }
493 }
494
495 release_ss:
496 writel(0, ss->base + SS_CTL);
497 spin_unlock_bh(&ss->slock);
498 return err;
499 }
500
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
6 months
[linux-next:master 7640/10763] drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d1d2220c7f39d0fca302c4ba6cca4ede01660a2b
commit: b89c01c960511dcffe3666d89645c95445d00902 [7640/10763] cpufreq: tegra186: Fix initial frequency
config: arm64-randconfig-s031-20200923 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout b89c01c960511dcffe3666d89645c95445d00902
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
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/cpufreq/tegra186-cpufreq.c:72:37: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *driver_data @@ got void [noderef] __iomem * @@
drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: expected void *driver_data
drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: got void [noderef] __iomem *
drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *edvd_reg @@ got void *driver_data @@
drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: expected void [noderef] __iomem *edvd_reg
drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: got void *driver_data
>> drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *edvd_reg @@ got void *driver_data @@
drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: expected void [noderef] __iomem *edvd_reg
drivers/cpufreq/tegra186-cpufreq.c:108:18: sparse: got void *driver_data
vim +108 drivers/cpufreq/tegra186-cpufreq.c
53
54 static int tegra186_cpufreq_init(struct cpufreq_policy *policy)
55 {
56 struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
57 unsigned int i;
58
59 for (i = 0; i < data->num_clusters; i++) {
60 struct tegra186_cpufreq_cluster *cluster = &data->clusters[i];
61 const struct tegra186_cpufreq_cluster_info *info =
62 cluster->info;
63 int core;
64
65 for (core = 0; core < ARRAY_SIZE(info->cpus); core++) {
66 if (info->cpus[core] == policy->cpu)
67 break;
68 }
69 if (core == ARRAY_SIZE(info->cpus))
70 continue;
71
> 72 policy->driver_data =
73 data->regs + info->offset + EDVD_CORE_VOLT_FREQ(core);
74 policy->freq_table = cluster->table;
75 break;
76 }
77
78 policy->cpuinfo.transition_latency = 300 * 1000;
79
80 return 0;
81 }
82
83 static int tegra186_cpufreq_set_target(struct cpufreq_policy *policy,
84 unsigned int index)
85 {
86 struct cpufreq_frequency_table *tbl = policy->freq_table + index;
87 void __iomem *edvd_reg = policy->driver_data;
88 u32 edvd_val = tbl->driver_data;
89
90 writel(edvd_val, edvd_reg);
91
92 return 0;
93 }
94
95 static unsigned int tegra186_cpufreq_get(unsigned int cpu)
96 {
97 struct cpufreq_frequency_table *tbl;
98 struct cpufreq_policy *policy;
99 void __iomem *edvd_reg;
100 unsigned int i, freq = 0;
101 u32 ndiv;
102
103 policy = cpufreq_cpu_get(cpu);
104 if (!policy)
105 return 0;
106
107 tbl = policy->freq_table;
> 108 edvd_reg = policy->driver_data;
109 ndiv = readl(edvd_reg) & EDVD_CORE_VOLT_FREQ_F_MASK;
110
111 for (i = 0; tbl[i].frequency != CPUFREQ_TABLE_END; i++) {
112 if ((tbl[i].driver_data & EDVD_CORE_VOLT_FREQ_F_MASK) == ndiv) {
113 freq = tbl[i].frequency;
114 break;
115 }
116 }
117
118 cpufreq_cpu_put(policy);
119
120 return freq;
121 }
122
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
6 months, 1 week
[phy-linux-phy:next 70/71] drivers/phy/qualcomm/phy-qcom-qmp.c:3899 qcom_qmp_phy_probe() error: uninitialized symbol 'dp_cfg'.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git next
head: 7612f4e2bc0e4a7dbbebafc077d220385ab63fbb
commit: 52e013d0bffa2238746b246074272817ec8e0807 [70/71] phy: qcom-qmp: Add support for DP in USB3+DP combo phy
config: x86_64-randconfig-m001-20200928 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/phy/qualcomm/phy-qcom-qmp.c:3899 qcom_qmp_phy_probe() error: uninitialized symbol 'dp_cfg'.
drivers/phy/qualcomm/phy-qcom-qmp.c:3900 qcom_qmp_phy_probe() error: uninitialized symbol 'dp_serdes'.
drivers/phy/qualcomm/phy-qcom-qmp.c:3902 qcom_qmp_phy_probe() error: uninitialized symbol 'usb_cfg'.
vim +/dp_cfg +3899 drivers/phy/qualcomm/phy-qcom-qmp.c
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3797 static int qcom_qmp_phy_probe(struct platform_device *pdev)
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3798 {
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3799 struct qcom_qmp *qmp;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3800 struct device *dev = &pdev->dev;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3801 struct device_node *child;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3802 struct phy_provider *phy_provider;
aa968cb1a67e27 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3803 void __iomem *serdes;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3804 void __iomem *usb_serdes;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3805 void __iomem *dp_serdes;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3806 const struct qmp_phy_combo_cfg *combo_cfg = NULL;
aa968cb1a67e27 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3807 const struct qmp_phy_cfg *cfg;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3808 const struct qmp_phy_cfg *usb_cfg;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3809 const struct qmp_phy_cfg *dp_cfg;
^^^^^^^^^
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3810 int num, id, expected_phys;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3811 int ret;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3812
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3813 qmp = devm_kzalloc(dev, sizeof(*qmp), GFP_KERNEL);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3814 if (!qmp)
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3815 return -ENOMEM;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3816
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3817 qmp->dev = dev;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3818 dev_set_drvdata(dev, qmp);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3819
efb05a50c956b4 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3820 /* Get the specific init parameters of QMP phy */
aa968cb1a67e27 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3821 cfg = of_device_get_match_data(dev);
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3822 if (!cfg) {
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3823 const struct of_device_id *match;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3824
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3825 match = of_match_device(qcom_qmp_combo_phy_of_match_table, dev);
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3826 if (!match)
efb05a50c956b4 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3827 return -EINVAL;
efb05a50c956b4 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3828
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3829 combo_cfg = match->data;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3830 if (!combo_cfg)
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3831 return -EINVAL;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3832
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3833 usb_cfg = combo_cfg->usb_cfg;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3834 cfg = usb_cfg; /* Setup clks and regulators */
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3835 }
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3836
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3837 /* per PHY serdes; usually located at base address */
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3838 usb_serdes = serdes = devm_platform_ioremap_resource(pdev, 0);
f385b73192c584 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3839 if (IS_ERR(serdes))
f385b73192c584 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3840 return PTR_ERR(serdes);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3841
efb05a50c956b4 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3842 /* per PHY dp_com; if PHY has dp_com control block */
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3843 if (combo_cfg || cfg->has_phy_dp_com_ctrl) {
dab7b10ddc83e5 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3844 qmp->dp_com = devm_platform_ioremap_resource(pdev, 1);
dab7b10ddc83e5 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3845 if (IS_ERR(qmp->dp_com))
dab7b10ddc83e5 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3846 return PTR_ERR(qmp->dp_com);
efb05a50c956b4 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3847 }
efb05a50c956b4 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3848
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3849 if (combo_cfg) {
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3850 /* Only two serdes for combo PHY */
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3851 dp_serdes = devm_platform_ioremap_resource(pdev, 2);
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3852 if (IS_ERR(dp_serdes))
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3853 return PTR_ERR(dp_serdes);
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3854
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3855 dp_cfg = combo_cfg->dp_cfg;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3856 expected_phys = 2;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3857 } else {
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3858 expected_phys = cfg->nlanes;
Not initialized on the else path.
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3859 }
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3860
efb05a50c956b4 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3861 mutex_init(&qmp->phy_mutex);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3862
aa968cb1a67e27 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3863 ret = qcom_qmp_phy_clk_init(dev, cfg);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3864 if (ret)
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3865 return ret;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3866
aa968cb1a67e27 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3867 ret = qcom_qmp_phy_reset_init(dev, cfg);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3868 if (ret)
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3869 return ret;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3870
aa968cb1a67e27 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3871 ret = qcom_qmp_phy_vreg_init(dev, cfg);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3872 if (ret) {
22fa10e52ab30c drivers/phy/qualcomm/phy-qcom-qmp.c Douglas Anderson 2018-05-14 3873 if (ret != -EPROBE_DEFER)
22fa10e52ab30c drivers/phy/qualcomm/phy-qcom-qmp.c Douglas Anderson 2018-05-14 3874 dev_err(dev, "failed to get regulator supplies: %d\n",
22fa10e52ab30c drivers/phy/qualcomm/phy-qcom-qmp.c Douglas Anderson 2018-05-14 3875 ret);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3876 return ret;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3877 }
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3878
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3879 num = of_get_available_child_count(dev->of_node);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3880 /* do we have a rogue child node ? */
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3881 if (num > expected_phys)
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3882 return -EINVAL;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3883
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3884 qmp->phys = devm_kcalloc(dev, num, sizeof(*qmp->phys), GFP_KERNEL);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3885 if (!qmp->phys)
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3886 return -ENOMEM;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3887
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3888 pm_runtime_set_active(dev);
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3889 pm_runtime_enable(dev);
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3890 /*
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3891 * Prevent runtime pm from being ON by default. Users can enable
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3892 * it using power/control in sysfs.
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3893 */
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3894 pm_runtime_forbid(dev);
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3895
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3896 id = 0;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3897 for_each_available_child_of_node(dev->of_node, child) {
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3898 if (of_node_name_eq(child, "dp-phy")) {
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 @3899 cfg = dp_cfg;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 @3900 serdes = dp_serdes;
^^^^^^^^^^^^^^^^^^^
Smatch isn't able to tie the "if (of_node_name_eq(child, "dp-phy"))" to
the "if (combo_cfg) {" check.
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3901 } else if (of_node_name_eq(child, "usb3-phy")) {
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 @3902 cfg = usb_cfg;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3903 serdes = usb_serdes;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3904 }
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3905
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3906 /* Create per-lane phy */
aa968cb1a67e27 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3907 ret = qcom_qmp_phy_create(dev, child, id, serdes, cfg);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3908 if (ret) {
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3909 dev_err(dev, "failed to create lane%d phy, %d\n",
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3910 id, ret);
be0345b2cc1f3e drivers/phy/qualcomm/phy-qcom-qmp.c Nishka Dasgupta 2019-08-08 3911 goto err_node_put;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3912 }
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3913
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3914 /*
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3915 * Register the pipe clock provided by phy.
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3916 * See function description to see details of this pipe clock.
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3917 */
aa968cb1a67e27 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3918 if (cfg->type == PHY_TYPE_USB3 || cfg->type == PHY_TYPE_PCIE) {
2a9316b04605a0 drivers/phy/qualcomm/phy-qcom-qmp.c Varadarajan Narayanan 2017-07-31 3919 ret = phy_pipe_clk_register(qmp, child);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3920 if (ret) {
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3921 dev_err(qmp->dev,
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3922 "failed to register pipe clock source\n");
be0345b2cc1f3e drivers/phy/qualcomm/phy-qcom-qmp.c Nishka Dasgupta 2019-08-08 3923 goto err_node_put;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3924 }
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3925 } else if (cfg->type == PHY_TYPE_DP) {
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3926 ret = phy_dp_clks_register(qmp, qmp->phys[id], child);
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3927 if (ret) {
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3928 dev_err(qmp->dev,
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3929 "failed to register DP clock source\n");
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3930 goto err_node_put;
52e013d0bffa22 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3931 }
aa968cb1a67e27 drivers/phy/qualcomm/phy-qcom-qmp.c Stephen Boyd 2020-09-16 3932 }
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3933 id++;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3934 }
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3935
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3936 phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3937 if (!IS_ERR(phy_provider))
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3938 dev_info(dev, "Registered Qcom-QMP phy\n");
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3939 else
ac0d239936bd87 drivers/phy/qualcomm/phy-qcom-qmp.c Manu Gautam 2018-01-16 3940 pm_runtime_disable(dev);
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3941
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3942 return PTR_ERR_OR_ZERO(phy_provider);
be0345b2cc1f3e drivers/phy/qualcomm/phy-qcom-qmp.c Nishka Dasgupta 2019-08-08 3943
be0345b2cc1f3e drivers/phy/qualcomm/phy-qcom-qmp.c Nishka Dasgupta 2019-08-08 3944 err_node_put:
be0345b2cc1f3e drivers/phy/qualcomm/phy-qcom-qmp.c Nishka Dasgupta 2019-08-08 3945 pm_runtime_disable(dev);
be0345b2cc1f3e drivers/phy/qualcomm/phy-qcom-qmp.c Nishka Dasgupta 2019-08-08 3946 of_node_put(child);
be0345b2cc1f3e drivers/phy/qualcomm/phy-qcom-qmp.c Nishka Dasgupta 2019-08-08 3947 return ret;
e78f3d15e115e8 drivers/phy/phy-qcom-qmp.c Vivek Gautam 2017-04-06 3948 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
6 months, 2 weeks
Re: [PATCH net-next RFC v1 09/10] net/mlx5e: Add NVMEoTCP offload
by kernel test robot
Hi Boris,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/nvme-tcp-receive-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 879456bedbe54f2d38b15c21dc5e3c30232b53e1
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-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
# https://github.com/0day-ci/linux/commit/990254a46f72010830cdf80ed80ed506f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Boris-Pismenny/nvme-tcp-receive-offloads/20201001-002308
git checkout 990254a46f72010830cdf80ed80ed506f268e759
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:24,
from drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:4:
include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
include/linux/mlx5/mlx5_ifc.h:10680:64: note: in expansion of macro 'BIT'
10680 | MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_NVMEOTCP_TAG_BUFFER_TABLE = BIT(0x21),
| ^~~
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:68:6: error: redefinition of 'mlx5e_accel_fs_del_sk'
68 | void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:5:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.h:23:20: note: previous definition of 'mlx5e_accel_fs_del_sk' was here
23 | static inline void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule) {}
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:73:26: error: redefinition of 'mlx5e_accel_fs_add_sk'
73 | struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_priv *priv,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:5:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.h:19:40: note: previous definition of 'mlx5e_accel_fs_add_sk' was here
19 | static inline struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_priv *priv,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'mlx5e_accel_fs_add_sk':
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:88:19: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
88 | fs_tcp = priv->fs.accel_tcp;
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'accel_fs_tcp_add_default_rule':
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:160:19: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
160 | fs_tcp = priv->fs.accel_tcp;
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'accel_fs_tcp_create_table':
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:269:41: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
269 | struct mlx5e_flow_table *ft = &priv->fs.accel_tcp->tables[type];
| ^
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:276:18: error: 'MLX5E_ACCEL_FS_TCP_FT_LEVEL' undeclared (first use in this function); did you mean 'MLX5E_ACCEL_FS_ESP_FT_LEVEL'?
276 | ft_attr.level = MLX5E_ACCEL_FS_TCP_FT_LEVEL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| MLX5E_ACCEL_FS_ESP_FT_LEVEL
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:276:18: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'accel_fs_tcp_enable':
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:328:21: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
328 | dest.ft = priv->fs.accel_tcp->tables[i].t;
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:339:24: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
339 | refcount_set(&priv->fs.accel_tcp->ref_count, 1);
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'accel_fs_tcp_destroy_table':
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:347:19: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
347 | fs_tcp = priv->fs.accel_tcp;
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: At top level:
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:356:6: error: redefinition of 'mlx5e_accel_fs_tcp_destroy'
356 | void mlx5e_accel_fs_tcp_destroy(struct mlx5e_priv *priv)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:5:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.h:18:20: note: previous definition of 'mlx5e_accel_fs_tcp_destroy' was here
18 | static inline void mlx5e_accel_fs_tcp_destroy(struct mlx5e_priv *priv) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'mlx5e_accel_fs_tcp_destroy':
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:360:15: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
360 | if (!priv->fs.accel_tcp)
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:363:38: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
363 | if (!refcount_dec_and_test(&priv->fs.accel_tcp->ref_count))
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:371:16: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
371 | kfree(priv->fs.accel_tcp);
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:372:10: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
372 | priv->fs.accel_tcp = NULL;
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: At top level:
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:375:5: error: redefinition of 'mlx5e_accel_fs_tcp_create'
375 | int mlx5e_accel_fs_tcp_create(struct mlx5e_priv *priv)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:5:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.h:17:19: note: previous definition of 'mlx5e_accel_fs_tcp_create' was here
17 | static inline int mlx5e_accel_fs_tcp_create(struct mlx5e_priv *priv) { return 0; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'mlx5e_accel_fs_tcp_create':
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:382:14: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
382 | if (priv->fs.accel_tcp) {
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:383:25: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
383 | refcount_inc(&priv->fs.accel_tcp->ref_count);
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:387:10: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
387 | priv->fs.accel_tcp = kzalloc(sizeof(*priv->fs.accel_tcp), GFP_KERNEL);
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:387:47: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
387 | priv->fs.accel_tcp = kzalloc(sizeof(*priv->fs.accel_tcp), GFP_KERNEL);
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:388:15: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
388 | if (!priv->fs.accel_tcp)
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:407:16: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
407 | kfree(priv->fs.accel_tcp);
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:408:10: error: 'struct mlx5e_flow_steering' has no member named 'accel_tcp'
408 | priv->fs.accel_tcp = NULL;
| ^
--
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:24,
from drivers/net/ethernet/mellanox/mlx5/core/en_accel/nvmeotcp.c:4:
include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
include/linux/mlx5/mlx5_ifc.h:10680:64: note: in expansion of macro 'BIT'
10680 | MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_NVMEOTCP_TAG_BUFFER_TABLE = BIT(0x21),
| ^~~
drivers/net/ethernet/mellanox/mlx5/core/en_accel/nvmeotcp.c: In function 'mlx5e_nvmeotcp_queue_init':
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/nvmeotcp.c:613:7: warning: 'stats' is used uninitialized in this function [-Wuninitialized]
613 | stats->nvmeotcp_queue_init_fail++;
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/mlx5e_accel_fs_del_sk +68 drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
5229a96e59ec324 Tariq Toukan 2020-06-16 67
5229a96e59ec324 Tariq Toukan 2020-06-16 @68 void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule)
5229a96e59ec324 Tariq Toukan 2020-06-16 69 {
5229a96e59ec324 Tariq Toukan 2020-06-16 70 mlx5_del_flow_rules(rule);
5229a96e59ec324 Tariq Toukan 2020-06-16 71 }
5229a96e59ec324 Tariq Toukan 2020-06-16 72
5229a96e59ec324 Tariq Toukan 2020-06-16 @73 struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_priv *priv,
5229a96e59ec324 Tariq Toukan 2020-06-16 74 struct sock *sk, u32 tirn,
5229a96e59ec324 Tariq Toukan 2020-06-16 75 uint32_t flow_tag)
5229a96e59ec324 Tariq Toukan 2020-06-16 76 {
5229a96e59ec324 Tariq Toukan 2020-06-16 77 struct mlx5_flow_destination dest = {};
5229a96e59ec324 Tariq Toukan 2020-06-16 78 struct mlx5e_flow_table *ft = NULL;
5229a96e59ec324 Tariq Toukan 2020-06-16 79 struct mlx5e_accel_fs_tcp *fs_tcp;
5229a96e59ec324 Tariq Toukan 2020-06-16 80 MLX5_DECLARE_FLOW_ACT(flow_act);
5229a96e59ec324 Tariq Toukan 2020-06-16 81 struct mlx5_flow_handle *flow;
5229a96e59ec324 Tariq Toukan 2020-06-16 82 struct mlx5_flow_spec *spec;
5229a96e59ec324 Tariq Toukan 2020-06-16 83
5229a96e59ec324 Tariq Toukan 2020-06-16 84 spec = kvzalloc(sizeof(*spec), GFP_KERNEL);
5229a96e59ec324 Tariq Toukan 2020-06-16 85 if (!spec)
5229a96e59ec324 Tariq Toukan 2020-06-16 86 return ERR_PTR(-ENOMEM);
5229a96e59ec324 Tariq Toukan 2020-06-16 87
5229a96e59ec324 Tariq Toukan 2020-06-16 @88 fs_tcp = priv->fs.accel_tcp;
5229a96e59ec324 Tariq Toukan 2020-06-16 89
5229a96e59ec324 Tariq Toukan 2020-06-16 90 spec->match_criteria_enable = MLX5_MATCH_OUTER_HEADERS;
5229a96e59ec324 Tariq Toukan 2020-06-16 91
5229a96e59ec324 Tariq Toukan 2020-06-16 92 switch (sk->sk_family) {
5229a96e59ec324 Tariq Toukan 2020-06-16 93 case AF_INET:
5229a96e59ec324 Tariq Toukan 2020-06-16 94 accel_fs_tcp_set_ipv4_flow(spec, sk);
5229a96e59ec324 Tariq Toukan 2020-06-16 95 ft = &fs_tcp->tables[ACCEL_FS_IPV4_TCP];
5229a96e59ec324 Tariq Toukan 2020-06-16 96 mlx5e_dbg(HW, priv, "%s flow is %pI4:%d -> %pI4:%d\n", __func__,
5229a96e59ec324 Tariq Toukan 2020-06-16 97 &inet_sk(sk)->inet_rcv_saddr,
5229a96e59ec324 Tariq Toukan 2020-06-16 98 inet_sk(sk)->inet_sport,
5229a96e59ec324 Tariq Toukan 2020-06-16 99 &inet_sk(sk)->inet_daddr,
5229a96e59ec324 Tariq Toukan 2020-06-16 100 inet_sk(sk)->inet_dport);
5229a96e59ec324 Tariq Toukan 2020-06-16 101 break;
5229a96e59ec324 Tariq Toukan 2020-06-16 102 #if IS_ENABLED(CONFIG_IPV6)
5229a96e59ec324 Tariq Toukan 2020-06-16 103 case AF_INET6:
5229a96e59ec324 Tariq Toukan 2020-06-16 104 if (!sk->sk_ipv6only &&
5229a96e59ec324 Tariq Toukan 2020-06-16 105 ipv6_addr_type(&sk->sk_v6_daddr) == IPV6_ADDR_MAPPED) {
5229a96e59ec324 Tariq Toukan 2020-06-16 106 accel_fs_tcp_set_ipv4_flow(spec, sk);
5229a96e59ec324 Tariq Toukan 2020-06-16 107 ft = &fs_tcp->tables[ACCEL_FS_IPV4_TCP];
5229a96e59ec324 Tariq Toukan 2020-06-16 108 } else {
5229a96e59ec324 Tariq Toukan 2020-06-16 109 accel_fs_tcp_set_ipv6_flow(spec, sk);
5229a96e59ec324 Tariq Toukan 2020-06-16 110 ft = &fs_tcp->tables[ACCEL_FS_IPV6_TCP];
5229a96e59ec324 Tariq Toukan 2020-06-16 111 }
5229a96e59ec324 Tariq Toukan 2020-06-16 112 break;
5229a96e59ec324 Tariq Toukan 2020-06-16 113 #endif
5229a96e59ec324 Tariq Toukan 2020-06-16 114 default:
5229a96e59ec324 Tariq Toukan 2020-06-16 115 break;
5229a96e59ec324 Tariq Toukan 2020-06-16 116 }
5229a96e59ec324 Tariq Toukan 2020-06-16 117
5229a96e59ec324 Tariq Toukan 2020-06-16 118 if (!ft) {
5229a96e59ec324 Tariq Toukan 2020-06-16 119 flow = ERR_PTR(-EINVAL);
5229a96e59ec324 Tariq Toukan 2020-06-16 120 goto out;
5229a96e59ec324 Tariq Toukan 2020-06-16 121 }
5229a96e59ec324 Tariq Toukan 2020-06-16 122
5229a96e59ec324 Tariq Toukan 2020-06-16 123 MLX5_SET_TO_ONES(fte_match_param, spec->match_criteria,
5229a96e59ec324 Tariq Toukan 2020-06-16 124 outer_headers.tcp_dport);
5229a96e59ec324 Tariq Toukan 2020-06-16 125 MLX5_SET_TO_ONES(fte_match_param, spec->match_criteria,
5229a96e59ec324 Tariq Toukan 2020-06-16 126 outer_headers.tcp_sport);
5229a96e59ec324 Tariq Toukan 2020-06-16 127 MLX5_SET(fte_match_param, spec->match_value, outer_headers.tcp_dport,
5229a96e59ec324 Tariq Toukan 2020-06-16 128 ntohs(inet_sk(sk)->inet_sport));
5229a96e59ec324 Tariq Toukan 2020-06-16 129 MLX5_SET(fte_match_param, spec->match_value, outer_headers.tcp_sport,
5229a96e59ec324 Tariq Toukan 2020-06-16 130 ntohs(inet_sk(sk)->inet_dport));
5229a96e59ec324 Tariq Toukan 2020-06-16 131
5229a96e59ec324 Tariq Toukan 2020-06-16 132 dest.type = MLX5_FLOW_DESTINATION_TYPE_TIR;
5229a96e59ec324 Tariq Toukan 2020-06-16 133 dest.tir_num = tirn;
5229a96e59ec324 Tariq Toukan 2020-06-16 134 if (flow_tag != MLX5_FS_DEFAULT_FLOW_TAG) {
5229a96e59ec324 Tariq Toukan 2020-06-16 135 spec->flow_context.flow_tag = flow_tag;
5229a96e59ec324 Tariq Toukan 2020-06-16 136 spec->flow_context.flags = FLOW_CONTEXT_HAS_TAG;
5229a96e59ec324 Tariq Toukan 2020-06-16 137 }
5229a96e59ec324 Tariq Toukan 2020-06-16 138
5229a96e59ec324 Tariq Toukan 2020-06-16 139 flow = mlx5_add_flow_rules(ft->t, spec, &flow_act, &dest, 1);
5229a96e59ec324 Tariq Toukan 2020-06-16 140
5229a96e59ec324 Tariq Toukan 2020-06-16 141 if (IS_ERR(flow))
5229a96e59ec324 Tariq Toukan 2020-06-16 142 netdev_err(priv->netdev, "mlx5_add_flow_rules() failed, flow is %ld\n",
5229a96e59ec324 Tariq Toukan 2020-06-16 143 PTR_ERR(flow));
5229a96e59ec324 Tariq Toukan 2020-06-16 144
5229a96e59ec324 Tariq Toukan 2020-06-16 145 out:
5229a96e59ec324 Tariq Toukan 2020-06-16 146 kvfree(spec);
5229a96e59ec324 Tariq Toukan 2020-06-16 147 return flow;
5229a96e59ec324 Tariq Toukan 2020-06-16 148 }
5229a96e59ec324 Tariq Toukan 2020-06-16 149
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
6 months, 2 weeks