[RFC PATCH] bpf: bpf_get_skb_hash_proto can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/filter.c b/net/core/filter.c
index 9f6ad7209b448..85b741884443b 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -3806,7 +3806,7 @@ BPF_CALL_1(bpf_get_skb_hash, struct xdp_buff *, xdp)
return ret;
}
-const struct bpf_func_proto bpf_get_skb_hash_proto = {
+static const struct bpf_func_proto bpf_get_skb_hash_proto = {
.func = bpf_get_skb_hash,
.gpl_only = false,
.ret_type = RET_INTEGER,
2 years, 1 month
Re: [RFC PATCH bpf-next] bpf: add bpf_get_skb_hash helper function
by kernel test robot
Hi Harshitha,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Harshitha-Ramamurthy/bpf-add-bpf...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-s022-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
net/core/filter.c:426:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:429:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:432:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:435:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:438:33: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:512:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:515:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:518:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:1406:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sock_filter const *filter @@ got struct sock_filter [noderef] __user *filter @@
net/core/filter.c:1406:39: sparse: expected struct sock_filter const *filter
net/core/filter.c:1406:39: sparse: got struct sock_filter [noderef] __user *filter
net/core/filter.c:1484:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sock_filter const *filter @@ got struct sock_filter [noderef] __user *filter @@
net/core/filter.c:1484:39: sparse: expected struct sock_filter const *filter
net/core/filter.c:1484:39: sparse: got struct sock_filter [noderef] __user *filter
>> net/core/filter.c:3809:29: sparse: sparse: symbol 'bpf_get_skb_hash_proto' was not declared. Should it be static?
net/core/filter.c:7130:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:7133:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:7136:27: sparse: sparse: subtraction of functions? Share your drugs
net/core/filter.c:8856:31: sparse: sparse: symbol 'sk_filter_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8863:27: sparse: sparse: symbol 'sk_filter_prog_ops' was not declared. Should it be static?
net/core/filter.c:8867:31: sparse: sparse: symbol 'tc_cls_act_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8875:27: sparse: sparse: symbol 'tc_cls_act_prog_ops' was not declared. Should it be static?
net/core/filter.c:8879:31: sparse: sparse: symbol 'xdp_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8890:31: sparse: sparse: symbol 'cg_skb_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8896:27: sparse: sparse: symbol 'cg_skb_prog_ops' was not declared. Should it be static?
net/core/filter.c:8900:31: sparse: sparse: symbol 'lwt_in_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8906:27: sparse: sparse: symbol 'lwt_in_prog_ops' was not declared. Should it be static?
net/core/filter.c:8910:31: sparse: sparse: symbol 'lwt_out_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8916:27: sparse: sparse: symbol 'lwt_out_prog_ops' was not declared. Should it be static?
net/core/filter.c:8920:31: sparse: sparse: symbol 'lwt_xmit_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8927:27: sparse: sparse: symbol 'lwt_xmit_prog_ops' was not declared. Should it be static?
net/core/filter.c:8931:31: sparse: sparse: symbol 'lwt_seg6local_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8937:27: sparse: sparse: symbol 'lwt_seg6local_prog_ops' was not declared. Should it be static?
net/core/filter.c:8941:31: sparse: sparse: symbol 'cg_sock_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8947:27: sparse: sparse: symbol 'cg_sock_prog_ops' was not declared. Should it be static?
net/core/filter.c:8950:31: sparse: sparse: symbol 'cg_sock_addr_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8956:27: sparse: sparse: symbol 'cg_sock_addr_prog_ops' was not declared. Should it be static?
net/core/filter.c:8959:31: sparse: sparse: symbol 'sock_ops_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8965:27: sparse: sparse: symbol 'sock_ops_prog_ops' was not declared. Should it be static?
net/core/filter.c:8968:31: sparse: sparse: symbol 'sk_skb_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8975:27: sparse: sparse: symbol 'sk_skb_prog_ops' was not declared. Should it be static?
net/core/filter.c:8978:31: sparse: sparse: symbol 'sk_msg_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8985:27: sparse: sparse: symbol 'sk_msg_prog_ops' was not declared. Should it be static?
net/core/filter.c:8988:31: sparse: sparse: symbol 'flow_dissector_verifier_ops' was not declared. Should it be static?
net/core/filter.c:8994:27: sparse: sparse: symbol 'flow_dissector_prog_ops' was not declared. Should it be static?
net/core/filter.c:9300:31: sparse: sparse: symbol 'sk_reuseport_verifier_ops' was not declared. Should it be static?
net/core/filter.c:9306:27: sparse: sparse: symbol 'sk_reuseport_prog_ops' was not declared. Should it be static?
net/core/filter.c:9482:27: sparse: sparse: symbol 'sk_lookup_prog_ops' was not declared. Should it be static?
net/core/filter.c:9485:31: sparse: sparse: symbol 'sk_lookup_verifier_ops' was not declared. Should it be static?
net/core/filter.c:241:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:241:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:241:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:241:32: sparse: sparse: cast to restricted __be16
net/core/filter.c:268:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:268:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:268:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:268:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:268:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:268:32: sparse: sparse: cast to restricted __be32
net/core/filter.c:1908:43: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __wsum [usertype] diff @@ got unsigned long long [usertype] to @@
net/core/filter.c:1908:43: sparse: expected restricted __wsum [usertype] diff
net/core/filter.c:1908:43: sparse: got unsigned long long [usertype] to
net/core/filter.c:1911:36: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be16 [usertype] old @@ got unsigned long long [usertype] from @@
net/core/filter.c:1911:36: sparse: expected restricted __be16 [usertype] old
net/core/filter.c:1911:36: sparse: got unsigned long long [usertype] from
net/core/filter.c:1911:42: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be16 [usertype] new @@ got unsigned long long [usertype] to @@
net/core/filter.c:1911:42: sparse: expected restricted __be16 [usertype] new
net/core/filter.c:1911:42: sparse: got unsigned long long [usertype] to
net/core/filter.c:1914:36: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be32 [usertype] from @@ got unsigned long long [usertype] from @@
net/core/filter.c:1914:36: sparse: expected restricted __be32 [usertype] from
net/core/filter.c:1914:36: sparse: got unsigned long long [usertype] from
net/core/filter.c:1914:42: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be32 [usertype] to @@ got unsigned long long [usertype] to @@
net/core/filter.c:1914:42: sparse: expected restricted __be32 [usertype] to
net/core/filter.c:1914:42: sparse: got unsigned long long [usertype] to
net/core/filter.c:1959:59: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] diff @@ got unsigned long long [usertype] to @@
net/core/filter.c:1959:59: sparse: expected restricted __wsum [usertype] diff
net/core/filter.c:1959:59: sparse: got unsigned long long [usertype] to
net/core/filter.c:1962:52: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be16 [usertype] from @@ got unsigned long long [usertype] from @@
net/core/filter.c:1962:52: sparse: expected restricted __be16 [usertype] from
net/core/filter.c:1962:52: sparse: got unsigned long long [usertype] from
net/core/filter.c:1962:58: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be16 [usertype] to @@ got unsigned long long [usertype] to @@
net/core/filter.c:1962:58: sparse: expected restricted __be16 [usertype] to
net/core/filter.c:1962:58: sparse: got unsigned long long [usertype] to
net/core/filter.c:1965:52: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be32 [usertype] from @@ got unsigned long long [usertype] from @@
net/core/filter.c:1965:52: sparse: expected restricted __be32 [usertype] from
net/core/filter.c:1965:52: sparse: got unsigned long long [usertype] from
net/core/filter.c:1965:58: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __be32 [usertype] to @@ got unsigned long long [usertype] to @@
net/core/filter.c:1965:58: sparse: expected restricted __be32 [usertype] to
net/core/filter.c:1965:58: sparse: got unsigned long long [usertype] to
net/core/filter.c:2011:28: sparse: sparse: incorrect type in return expression (different base types) @@ expected unsigned long long @@ got restricted __wsum @@
net/core/filter.c:2011:28: sparse: expected unsigned long long
net/core/filter.c:2011:28: sparse: got restricted __wsum
net/core/filter.c:2033:35: sparse: sparse: incorrect type in return expression (different base types) @@ expected unsigned long long @@ got restricted __wsum [usertype] csum @@
net/core/filter.c:2033:35: sparse: expected unsigned long long
net/core/filter.c:2033:35: sparse: got restricted __wsum [usertype] csum
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH 1/6] drm: Add connector atomic_begin/atomic_flush
by kernel test robot
Hi Algea,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on linus/master drm-exynos/exynos-drm-next v5.8 next-20200812]
[cannot apply to rockchip/for-next drm-intel/for-linux-next tegra-drm/drm/tegra/for-next drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Algea-Cao/Support-change-dw-hdmi...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: m68k-randconfig-s032-20200812 (attached as .config)
compiler: m68k-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-168-g9554805c-dirty
# 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=m68k
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/err.h:5,
from include/linux/dma-fence.h:16,
from drivers/gpu/drm/drm_atomic_helper.c:28:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/drm_atomic_helper.c: In function 'drm_atomic_helper_commit_planes':
>> drivers/gpu/drm/drm_atomic_helper.c:2475:52: warning: variable 'new_connector_state' set but not used [-Wunused-but-set-variable]
2475 | struct drm_connector_state *old_connector_state, *new_connector_state;
| ^~~~~~~~~~~~~~~~~~~
vim +/new_connector_state +2475 drivers/gpu/drm/drm_atomic_helper.c
2428
2429 /**
2430 * drm_atomic_helper_commit_planes - commit plane state
2431 * @dev: DRM device
2432 * @old_state: atomic state object with old state structures
2433 * @flags: flags for committing plane state
2434 *
2435 * This function commits the new plane state using the plane and atomic helper
2436 * functions for planes and CRTCs. It assumes that the atomic state has already
2437 * been pushed into the relevant object state pointers, since this step can no
2438 * longer fail.
2439 *
2440 * It still requires the global state object @old_state to know which planes and
2441 * crtcs need to be updated though.
2442 *
2443 * Note that this function does all plane updates across all CRTCs in one step.
2444 * If the hardware can't support this approach look at
2445 * drm_atomic_helper_commit_planes_on_crtc() instead.
2446 *
2447 * Plane parameters can be updated by applications while the associated CRTC is
2448 * disabled. The DRM/KMS core will store the parameters in the plane state,
2449 * which will be available to the driver when the CRTC is turned on. As a result
2450 * most drivers don't need to be immediately notified of plane updates for a
2451 * disabled CRTC.
2452 *
2453 * Unless otherwise needed, drivers are advised to set the ACTIVE_ONLY flag in
2454 * @flags in order not to receive plane update notifications related to a
2455 * disabled CRTC. This avoids the need to manually ignore plane updates in
2456 * driver code when the driver and/or hardware can't or just don't need to deal
2457 * with updates on disabled CRTCs, for example when supporting runtime PM.
2458 *
2459 * Drivers may set the NO_DISABLE_AFTER_MODESET flag in @flags if the relevant
2460 * display controllers require to disable a CRTC's planes when the CRTC is
2461 * disabled. This function would skip the &drm_plane_helper_funcs.atomic_disable
2462 * call for a plane if the CRTC of the old plane state needs a modesetting
2463 * operation. Of course, the drivers need to disable the planes in their CRTC
2464 * disable callbacks since no one else would do that.
2465 *
2466 * The drm_atomic_helper_commit() default implementation doesn't set the
2467 * ACTIVE_ONLY flag to most closely match the behaviour of the legacy helpers.
2468 * This should not be copied blindly by drivers.
2469 */
2470 void drm_atomic_helper_commit_planes(struct drm_device *dev,
2471 struct drm_atomic_state *old_state,
2472 uint32_t flags)
2473 {
2474 struct drm_connector *connector;
> 2475 struct drm_connector_state *old_connector_state, *new_connector_state;
2476 struct drm_crtc *crtc;
2477 struct drm_crtc_state *old_crtc_state, *new_crtc_state;
2478 struct drm_plane *plane;
2479 struct drm_plane_state *old_plane_state, *new_plane_state;
2480 int i;
2481 bool active_only = flags & DRM_PLANE_COMMIT_ACTIVE_ONLY;
2482 bool no_disable = flags & DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET;
2483
2484 for_each_oldnew_connector_in_state(old_state, connector,
2485 old_connector_state,
2486 new_connector_state, i) {
2487 const struct drm_connector_helper_funcs *funcs;
2488
2489 if (!connector->state->crtc)
2490 continue;
2491
2492 if (!connector->state->crtc->state->active)
2493 continue;
2494
2495 funcs = connector->helper_private;
2496
2497 if (!funcs || !funcs->atomic_begin)
2498 continue;
2499
2500 DRM_DEBUG_ATOMIC("flush beginning [CONNECTOR:%d:%s]\n",
2501 connector->base.id, connector->name);
2502
2503 funcs->atomic_begin(connector, old_connector_state);
2504 }
2505
2506 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
2507 const struct drm_crtc_helper_funcs *funcs;
2508
2509 funcs = crtc->helper_private;
2510
2511 if (!funcs || !funcs->atomic_begin)
2512 continue;
2513
2514 if (active_only && !new_crtc_state->active)
2515 continue;
2516
2517 funcs->atomic_begin(crtc, old_crtc_state);
2518 }
2519
2520 for_each_oldnew_plane_in_state(old_state, plane, old_plane_state, new_plane_state, i) {
2521 const struct drm_plane_helper_funcs *funcs;
2522 bool disabling;
2523
2524 funcs = plane->helper_private;
2525
2526 if (!funcs)
2527 continue;
2528
2529 disabling = drm_atomic_plane_disabling(old_plane_state,
2530 new_plane_state);
2531
2532 if (active_only) {
2533 /*
2534 * Skip planes related to inactive CRTCs. If the plane
2535 * is enabled use the state of the current CRTC. If the
2536 * plane is being disabled use the state of the old
2537 * CRTC to avoid skipping planes being disabled on an
2538 * active CRTC.
2539 */
2540 if (!disabling && !plane_crtc_active(new_plane_state))
2541 continue;
2542 if (disabling && !plane_crtc_active(old_plane_state))
2543 continue;
2544 }
2545
2546 /*
2547 * Special-case disabling the plane if drivers support it.
2548 */
2549 if (disabling && funcs->atomic_disable) {
2550 struct drm_crtc_state *crtc_state;
2551
2552 crtc_state = old_plane_state->crtc->state;
2553
2554 if (drm_atomic_crtc_needs_modeset(crtc_state) &&
2555 no_disable)
2556 continue;
2557
2558 funcs->atomic_disable(plane, old_plane_state);
2559 } else if (new_plane_state->crtc || disabling) {
2560 funcs->atomic_update(plane, old_plane_state);
2561 }
2562 }
2563
2564 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
2565 const struct drm_crtc_helper_funcs *funcs;
2566
2567 funcs = crtc->helper_private;
2568
2569 if (!funcs || !funcs->atomic_flush)
2570 continue;
2571
2572 if (active_only && !new_crtc_state->active)
2573 continue;
2574
2575 funcs->atomic_flush(crtc, old_crtc_state);
2576 }
2577
2578 for_each_oldnew_connector_in_state(old_state, connector,
2579 old_connector_state,
2580 new_connector_state, i) {
2581 const struct drm_connector_helper_funcs *funcs;
2582
2583 if (!connector->state->crtc)
2584 continue;
2585
2586 if (!connector->state->crtc->state->active)
2587 continue;
2588
2589 funcs = connector->helper_private;
2590
2591 if (!funcs || !funcs->atomic_flush)
2592 continue;
2593
2594 DRM_DEBUG_ATOMIC("flushing [CONNECTOR:%d:%s]\n",
2595 connector->base.id, connector->name);
2596
2597 funcs->atomic_flush(connector, old_connector_state);
2598 }
2599 }
2600 EXPORT_SYMBOL(drm_atomic_helper_commit_planes);
2601
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[xlnx:xlnx_rebase_v5.4 1277/1452] drivers/gpio/gpio-xilinx.c:277:8: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
by kernel test robot
Hi Michal,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: bb8c1c9c0b132b50f6199d2e8cfcf0157544e9cc
commit: af0c19b6f15388c554317280433100fd9f3d7d0a [1277/1452] gpio: xilinx: Use xilinx tested gpio driver
config: alpha-randconfig-r034-20200812 (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
git checkout af0c19b6f15388c554317280433100fd9f3d7d0a
# 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 errors (new ones prefixed by >>):
drivers/gpio/gpio-xilinx.c:68:25: error: field 'mmchip' has incomplete type
68 | struct of_mm_gpio_chip mmchip;
| ^~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_get':
drivers/gpio/gpio-xilinx.c:94:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror=implicit-function-declaration]
94 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:94:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
In file included from arch/alpha/include/asm/compiler.h:11,
from arch/alpha/include/asm/bitops.h:9,
from include/linux/bitops.h:26,
from drivers/gpio/gpio-xilinx.c:15:
include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct of_mm_gpio_chip'
994 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
994 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
994 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:96:6: note: in expansion of macro 'container_of'
96 | container_of(mm_gc, struct xgpio_instance, mmchip);
| ^~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_set':
drivers/gpio/gpio-xilinx.c:115:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
115 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_set_multiple':
drivers/gpio/gpio-xilinx.c:147:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
147 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_dir_in':
drivers/gpio/gpio-xilinx.c:187:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
187 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_dir_out':
drivers/gpio/gpio-xilinx.c:218:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
218 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_xlate':
drivers/gpio/gpio-xilinx.c:274:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
274 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-xilinx.c:277:8: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
277 | if (gc->of_gpio_n_cells == 3 && flags)
| ^~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_irq_mask':
drivers/gpio/gpio-xilinx.c:315:12: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744071562067967' to '2147483647' [-Woverflow]
315 | ~XGPIO_GIER_IE);
drivers/gpio/gpio-xilinx.c:50:51: note: in definition of macro 'xgpio_writereg'
50 | # define xgpio_writereg(offset, val) __raw_writel(val, offset)
| ^~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_to_irq':
drivers/gpio/gpio-xilinx.c:392:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
392 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_remove':
drivers/gpio/gpio-xilinx.c:576:2: error: implicit declaration of function 'of_mm_gpiochip_remove'; did you mean 'gpiochip_remove'? [-Werror=implicit-function-declaration]
576 | of_mm_gpiochip_remove(&chip->mmchip);
| ^~~~~~~~~~~~~~~~~~~~~
| gpiochip_remove
drivers/gpio/gpio-xilinx.c: In function 'xgpio_of_probe':
drivers/gpio/gpio-xilinx.c:676:11: error: implicit declaration of function 'of_mm_gpiochip_add'; did you mean 'gpiochip_add'? [-Werror=implicit-function-declaration]
676 | status = of_mm_gpiochip_add(np, &chip->mmchip);
| ^~~~~~~~~~~~~~~~~~
| gpiochip_add
cc1: some warnings being treated as errors
vim +277 drivers/gpio/gpio-xilinx.c
261
262 /**
263 * xgpio_xlate - Translate gpio_spec to the GPIO number and flags
264 * @gc: Pointer to gpio_chip device structure.
265 * @gpiospec: gpio specifier as found in the device tree
266 * @flags: A flags pointer based on binding
267 *
268 * Return:
269 * irq number otherwise -EINVAL
270 */
271 static int xgpio_xlate(struct gpio_chip *gc,
272 const struct of_phandle_args *gpiospec, u32 *flags)
273 {
274 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
275 struct xgpio_instance *chip = container_of(mm_gc, struct xgpio_instance,
276 mmchip);
> 277 if (gc->of_gpio_n_cells == 3 && flags)
278 *flags = gpiospec->args[2];
279
280 if (gpiospec->args[1] == chip->offset)
281 return gpiospec->args[0];
282
283 return -EINVAL;
284 }
285
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[sashal-linux-stable:queue-4.4 47/54] /tmp/userfaultfd-135315.s:1715: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head: 813cee1479363cb63ba20209f773ce41dde02255
commit: 7300c13f15e64c60c2dad13d546b801695c7da28 [47/54] ipv4: Silence suspicious RCU usage warning
config: x86_64-randconfig-a015-20200811 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 30c1633386e7cfb01c0a54b31ccf4c3a3873e71b)
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 7300c13f15e64c60c2dad13d546b801695c7da28
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from mm/userfaultfd.c:11:
In file included from include/linux/pagemap.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/uaccess.h:4:
In file included from include/linux/sched.h:61:
In file included from include/linux/cgroup-defs.h:16:
include/linux/percpu-refcount.h:177:3: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
this_cpu_add(*percpu_count, nr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
case 8: stem##8(variable, __VA_ARGS__);break; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:65:1: note: expanded from here
this_cpu_add_8
^
arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
((val) == 1 || (val) == -1)) ? \
~~~ ^ ~~
In file included from mm/userfaultfd.c:11:
In file included from include/linux/pagemap.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/uaccess.h:4:
In file included from include/linux/sched.h:61:
In file included from include/linux/cgroup-defs.h:16:
include/linux/percpu-refcount.h:276:3: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
this_cpu_sub(*percpu_count, nr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:536:33: note: expanded from macro 'this_cpu_sub'
#define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
case 8: stem##8(variable, __VA_ARGS__);break; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:225:1: note: expanded from here
this_cpu_add_8
^
arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
((val) == 1 || (val) == -1)) ? \
~~~ ^ ~~
In file included from mm/userfaultfd.c:11:
In file included from include/linux/pagemap.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/uaccess.h:8:
arch/x86/include/asm/uaccess.h:754:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
~~ ^ ~
include/linux/compiler.h:181:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from mm/userfaultfd.c:11:
In file included from include/linux/pagemap.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/uaccess.h:8:
arch/x86/include/asm/uaccess.h:772:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
~~ ^ ~
include/linux/compiler.h:181:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
4 warnings generated.
/tmp/userfaultfd-135315.s: Assembler messages:
>> /tmp/userfaultfd-135315.s:1715: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH] net: untag pointer in sockptr_is_kernel
by kernel test robot
Hi Miles,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[also build test ERROR on linus/master]
[cannot apply to net/master hch-configfs/for-next sparc-next/master v5.8 next-20200811]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Miles-Chen/net-untag-pointer-in-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git bfdd5aaa54b0a44d9df550fe4c9db7e1470a11b8
config: x86_64-randconfig-a013-20200811 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4f2ad15db535873dda9bfe248a2771023b64a43c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from net/ipv6/af_inet6.c:29:
In file included from include/linux/net.h:24:
>> include/linux/sockptr.h:23:24: error: implicit declaration of function 'untagged_addr' [-Werror,-Wimplicit-function-declaration]
return (unsigned long)untagged_addr(sockptr.kernel) >= TASK_SIZE;
^
1 error generated.
--
In file included from net/ipv6/udp.c:24:
In file included from include/linux/net.h:24:
>> include/linux/sockptr.h:23:24: error: implicit declaration of function 'untagged_addr' [-Werror,-Wimplicit-function-declaration]
return (unsigned long)untagged_addr(sockptr.kernel) >= TASK_SIZE;
^
net/ipv6/udp.c:1029:30: warning: no previous prototype for function 'udp_v6_early_demux' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
^
net/ipv6/udp.c:1029:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
^
static
net/ipv6/udp.c:1070:29: warning: no previous prototype for function 'udpv6_rcv' [-Wmissing-prototypes]
INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
^
net/ipv6/udp.c:1070:25: note: declare 'static' if the function is not intended to be used outside of this translation unit
INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
^
static
2 warnings and 1 error generated.
vim +/untagged_addr +23 include/linux/sockptr.h
20
21 static inline bool sockptr_is_kernel(sockptr_t sockptr)
22 {
> 23 return (unsigned long)untagged_addr(sockptr.kernel) >= TASK_SIZE;
24 }
25
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH V7 2/2] pm80xx : Staggered spin up support.
by kernel test robot
Hi Deepak,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on v5.8]
[cannot apply to mkp-scsi/for-next scsi/for-next next-20200812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Deepak-Ukey/pm80xx-Updates-for-t...
base: bcf876870b95592b52519ed4aafcf9d95999bc9c
config: x86_64-randconfig-c002-20200812 (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>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/scsi/pm8001/pm8001_init.c:733:3-24: ERROR: reference preceded by free on line 708
vim +733 drivers/scsi/pm8001/pm8001_init.c
624
625 /**
626 * pm8001_init_sas_add - initialize sas address
627 * @chip_info: our ha struct.
628 *
629 * Currently we just set the fixed SAS address to our HBA,for manufacture,
630 * it should read from the EEPROM
631 */
632 static void pm8001_init_sas_add_and_spinup_config
633 (struct pm8001_hba_info *pm8001_ha)
634 {
635 u8 i, j;
636 u8 sas_add[8];
637 #ifdef PM8001_READ_VPD
638 /* For new SPC controllers WWN is stored in flash vpd
639 * For SPC/SPCve controllers WWN is stored in EEPROM
640 * For Older SPC WWN is stored in NVMD
641 */
642 DECLARE_COMPLETION_ONSTACK(completion);
643 struct pm8001_ioctl_payload payload;
644 u16 deviceid;
645 int rc;
646
647 pci_read_config_word(pm8001_ha->pdev, PCI_DEVICE_ID, &deviceid);
648 pm8001_ha->nvmd_completion = &completion;
649
650 if (pm8001_ha->chip_id == chip_8001) {
651 if (deviceid == 0x8081 || deviceid == 0x0042) {
652 payload.minor_function = 4;
653 payload.rd_length = 4096;
654 } else {
655 payload.minor_function = 0;
656 payload.rd_length = 128;
657 }
658 } else if ((pm8001_ha->chip_id == chip_8070 ||
659 pm8001_ha->chip_id == chip_8072) &&
660 pm8001_ha->pdev->subsystem_vendor == PCI_VENDOR_ID_ATTO) {
661 payload.minor_function = 4;
662 payload.rd_length = 4096;
663 } else {
664 payload.minor_function = 1;
665 payload.rd_length = 4096;
666 }
667 payload.offset = 0;
668 payload.func_specific = kzalloc(payload.rd_length, GFP_KERNEL);
669 if (!payload.func_specific) {
670 PM8001_INIT_DBG(pm8001_ha, pm8001_printk("mem alloc fail\n"));
671 return;
672 }
673 rc = PM8001_CHIP_DISP->get_nvmd_req(pm8001_ha, &payload);
674 if (rc) {
675 kfree(payload.func_specific);
676 PM8001_INIT_DBG(pm8001_ha, pm8001_printk("nvmd failed\n"));
677 return;
678 }
679 wait_for_completion(&completion);
680
681 for (i = 0, j = 0; i <= 7; i++, j++) {
682 if (pm8001_ha->chip_id == chip_8001) {
683 if (deviceid == 0x8081)
684 pm8001_ha->sas_addr[j] =
685 payload.func_specific[0x704 + i];
686 else if (deviceid == 0x0042)
687 pm8001_ha->sas_addr[j] =
688 payload.func_specific[0x010 + i];
689 } else if ((pm8001_ha->chip_id == chip_8070 ||
690 pm8001_ha->chip_id == chip_8072) &&
691 pm8001_ha->pdev->subsystem_vendor == PCI_VENDOR_ID_ATTO) {
692 pm8001_ha->sas_addr[j] =
693 payload.func_specific[0x010 + i];
694 } else
695 pm8001_ha->sas_addr[j] =
696 payload.func_specific[0x804 + i];
697 }
698 memcpy(sas_add, pm8001_ha->sas_addr, SAS_ADDR_SIZE);
699 for (i = 0; i < pm8001_ha->chip->n_phy; i++) {
700 if (i && ((i % 4) == 0))
701 sas_add[7] = sas_add[7] + 4;
702 memcpy(&pm8001_ha->phy[i].dev_sas_addr,
703 sas_add, SAS_ADDR_SIZE);
704 PM8001_INIT_DBG(pm8001_ha,
705 pm8001_printk("phy %d sas_addr = %016llx\n", i,
706 pm8001_ha->phy[i].dev_sas_addr));
707 }
> 708 kfree(payload.func_specific);
709 #else
710 for (i = 0; i < pm8001_ha->chip->n_phy; i++) {
711 pm8001_ha->phy[i].dev_sas_addr = 0x50010c600047f9d0ULL;
712 pm8001_ha->phy[i].dev_sas_addr =
713 cpu_to_be64((u64)
714 (*(u64 *)&pm8001_ha->phy[i].dev_sas_addr));
715 }
716 memcpy(pm8001_ha->sas_addr, &pm8001_ha->phy[0].dev_sas_addr,
717 SAS_ADDR_SIZE);
718 #endif
719
720 /* For spinning up drives in group */
721 pm8001_ha->phy_head = -1;
722 pm8001_ha->phy_tail = -1;
723
724 for (i = 0; i < PM8001_MAX_PHYS; i++)
725 pm8001_ha->phy_up[i] = 0xff;
726
727 timer_setup(&pm8001_ha->spinup_timer,
728 (void *)pm8001_spinup_timedout, 0);
729
730 if (pm8001_ha->staggered_spinup == true) {
731 /* spinup interval in unit of 100 ms */
732 pm8001_ha->spinup_interval =
> 733 payload.func_specific[SPINUP_DELAY_OFFSET] * 100;
734 pm8001_ha->spinup_group =
735 payload.func_specific[SPINUP_GROUP_OFFSET];
736 } else {
737 pm8001_ha->spinup_interval = 0;
738 pm8001_ha->spinup_group = pm8001_ha->chip->n_phy;
739 }
740
741 if (pm8001_ha->spinup_interval > PM80XX_MAX_SPINUP_DELAY) {
742 PM8001_DISC_DBG(pm8001_ha, pm8001_printk(
743 "Spinup delay from Seeprom is %d ms, reset to %d ms\n",
744 pm8001_ha->spinup_interval * 100, PM80XX_MAX_SPINUP_DELAY));
745 pm8001_ha->spinup_interval = PM80XX_MAX_SPINUP_DELAY;
746 }
747
748 if (pm8001_ha->spinup_group > pm8001_ha->chip->n_phy) {
749 PM8001_DISC_DBG(pm8001_ha, pm8001_printk(
750 "Spinup group from Seeprom is %d, reset to %d\n",
751 pm8001_ha->spinup_group, pm8001_ha->chip->n_phy));
752 pm8001_ha->spinup_group = pm8001_ha->chip->n_phy;
753 }
754
755 PM8001_MSG_DBG(pm8001_ha, pm8001_printk(
756 "Spinup interval : %d Spinup group %d\n",
757 pm8001_ha->spinup_interval, pm8001_ha->spinup_group));
758 }
759
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/wireless/intel/iwlwifi/pcie/trans.c:3730 iwl_trans_pcie_alloc() warn: passing zero to 'ERR_PTR'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fb893de323e2d39f7a1f6df425703a2edbdf56ea
commit: c239feec5038585d8ba622ecc97322e0e2f3398c iwlwifi: pcie: gen2: use DMA pool for byte-count tables
date: 3 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-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>
New smatch warnings:
drivers/net/wireless/intel/iwlwifi/pcie/trans.c:3730 iwl_trans_pcie_alloc() warn: passing zero to 'ERR_PTR'
Old smatch warnings:
drivers/net/wireless/intel/iwlwifi/pcie/trans.c:236 iwl_pcie_alloc_fw_monitor_block() warn: should '(((1))) << (power - 10)' be a 64 bit type?
drivers/net/wireless/intel/iwlwifi/pcie/trans.c:236 iwl_pcie_alloc_fw_monitor_block() warn: should '(((1))) << (max_power - 10)' be a 64 bit type?
vim +/ERR_PTR +3730 drivers/net/wireless/intel/iwlwifi/pcie/trans.c
f7805b33f9b13a drivers/net/wireless/intel/iwlwifi/pcie/trans.c Lior Cohen 2018-05-03 3718
a9248de42464e5 drivers/net/wireless/intel/iwlwifi/pcie/trans.c Shahar S Matityahu 2019-07-23 3719 iwl_dbg_tlv_init(trans);
a9248de42464e5 drivers/net/wireless/intel/iwlwifi/pcie/trans.c Shahar S Matityahu 2019-07-23 3720
a42a184458ae95 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c Emmanuel Grumbach 2012-02-02 3721 return trans;
a42a184458ae95 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c Emmanuel Grumbach 2012-02-02 3722
a8b691e6104e6b drivers/net/wireless/iwlwifi/pcie/trans.c Johannes Berg 2012-12-27 3723 out_free_ict:
a8b691e6104e6b drivers/net/wireless/iwlwifi/pcie/trans.c Johannes Berg 2012-12-27 3724 iwl_pcie_free_ict(trans);
a42a184458ae95 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c Emmanuel Grumbach 2012-02-02 3725 out_no_pci:
6eb5e529d7e3bf drivers/net/wireless/intel/iwlwifi/pcie/trans.c Emmanuel Grumbach 2015-10-18 3726 free_percpu(trans_pcie->tso_hdr_page);
8188a18ee2e48c drivers/net/wireless/intel/iwlwifi/pcie/trans.c Johannes Berg 2019-09-19 3727 destroy_workqueue(trans_pcie->rba.alloc_wq);
8188a18ee2e48c drivers/net/wireless/intel/iwlwifi/pcie/trans.c Johannes Berg 2019-09-19 3728 out_free_trans:
7b501d10b18bc3 drivers/net/wireless/iwlwifi/pcie/trans.c Johannes Berg 2015-05-22 3729 iwl_trans_free(trans);
af3f2f740173f8 drivers/net/wireless/iwlwifi/pcie/trans.c Emmanuel Grumbach 2015-06-04 @3730 return ERR_PTR(ret);
a42a184458ae95 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c Emmanuel Grumbach 2012-02-02 3731 }
b8a7547d77782b drivers/net/wireless/intel/iwlwifi/pcie/trans.c Shahar S Matityahu 2018-12-05 3732
:::::: The code at line 3730 was first introduced by commit
:::::: af3f2f740173f8b5c61dba46f900998c5984ccd9 iwlwifi: pcie: don't panic if pcie transport alloc fails
:::::: TO: Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
:::::: CC: Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[linux-stable-rc:linux-4.19.y 7521/9999] drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:321:39: sparse: sparse: cast to restricted __le16
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: e864f43593ccf9180c61738abdf1c1dde091367d
commit: 2c00f819a72150708b9f9e0a2b031a8fdafa7b15 [7521/9999] iwlwifi: Don't ignore the cap field upon mcc update
config: i386-randconfig-s001-20200812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
git checkout 2c00f819a72150708b9f9e0a2b031a8fdafa7b15
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/net/wireless/intel/iwlwifi/mvm/mac80211.c: note: in included file (through drivers/net/wireless/intel/iwlwifi/mvm/..//fw/img.h, drivers/net/wireless/intel/iwlwifi/mvm/..//iwl-trans.h, ...):
drivers/net/wireless/intel/iwlwifi/mvm/..//fw/file.h:286:19: sparse: sparse: mixed bitwiseness
drivers/net/wireless/intel/iwlwifi/mvm/..//fw/file.h:405:19: sparse: sparse: mixed bitwiseness
>> drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:321:39: sparse: sparse: cast to restricted __le16
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c: In function '__iwl_mvm_assign_vif_chanctx':
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:3754:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
3754 | if (switching_chanctx) {
| ^
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:3758:2: note: here
3758 | case NL80211_IFTYPE_ADHOC:
| ^~~~
In file included from drivers/net/wireless/intel/iwlwifi/mvm/../iwl-trans.h:76,
from drivers/net/wireless/intel/iwlwifi/mvm/../iwl-devtrace.h:32,
from drivers/net/wireless/intel/iwlwifi/mvm/../iwl-io.h:32,
from drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:82:
At top level:
drivers/net/wireless/intel/iwlwifi/mvm/../iwl-config.h:472:36: warning: 'iwl_csr_v2' defined but not used [-Wunused-const-variable=]
472 | static const struct iwl_csr_params iwl_csr_v2 = {
| ^~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/mvm/../iwl-config.h:457:36: warning: 'iwl_csr_v1' defined but not used [-Wunused-const-variable=]
457 | static const struct iwl_csr_params iwl_csr_v1 = {
| ^~~~~~~~~~
vim +321 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
287
288 struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy,
289 const char *alpha2,
290 enum iwl_mcc_source src_id,
291 bool *changed)
292 {
293 struct ieee80211_regdomain *regd = NULL;
294 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
295 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
296 struct iwl_mcc_update_resp *resp;
297
298 IWL_DEBUG_LAR(mvm, "Getting regdomain data for %s from FW\n", alpha2);
299
300 lockdep_assert_held(&mvm->mutex);
301
302 resp = iwl_mvm_update_mcc(mvm, alpha2, src_id);
303 if (IS_ERR_OR_NULL(resp)) {
304 IWL_DEBUG_LAR(mvm, "Could not get update from FW %d\n",
305 PTR_ERR_OR_ZERO(resp));
306 goto out;
307 }
308
309 if (changed) {
310 u32 status = le32_to_cpu(resp->status);
311
312 *changed = (status == MCC_RESP_NEW_CHAN_PROFILE ||
313 status == MCC_RESP_ILLEGAL);
314 }
315
316 regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg,
317 __le32_to_cpu(resp->n_channels),
318 resp->channels,
319 __le16_to_cpu(resp->mcc),
320 __le16_to_cpu(resp->geo_info),
> 321 __le16_to_cpu(resp->cap));
322 /* Store the return source id */
323 src_id = resp->source_id;
324 kfree(resp);
325 if (IS_ERR_OR_NULL(regd)) {
326 IWL_DEBUG_LAR(mvm, "Could not get parse update from FW %d\n",
327 PTR_ERR_OR_ZERO(regd));
328 goto out;
329 }
330
331 IWL_DEBUG_LAR(mvm, "setting alpha2 from FW to %s (0x%x, 0x%x) src=%d\n",
332 regd->alpha2, regd->alpha2[0], regd->alpha2[1], src_id);
333 mvm->lar_regdom_set = true;
334 mvm->mcc_src = src_id;
335
336 out:
337 return regd;
338 }
339
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1130 mt7915_mac_sta_stats_work() warn: test_bit() takes a bit number
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fb893de323e2d39f7a1f6df425703a2edbdf56ea
commit: e57b7901469fc0b021930b83a8094baaf3d81b09 mt76: add mac80211 driver for MT7915 PCIe-based chipsets
date: 3 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-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>
smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1130 mt7915_mac_sta_stats_work() warn: test_bit() takes a bit number
vim +1130 drivers/net/wireless/mediatek/mt76/mt7915/mac.c
1107
1108 void mt7915_mac_sta_stats_work(struct work_struct *work)
1109 {
1110 struct ieee80211_sta *sta;
1111 struct ieee80211_vif *vif;
1112 struct mt7915_sta_stats *stats;
1113 struct mt7915_sta *msta;
1114 struct mt7915_dev *dev;
1115
1116 msta = container_of(work, struct mt7915_sta, stats_work);
1117 sta = container_of((void *)msta, struct ieee80211_sta, drv_priv);
1118 vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
1119 dev = msta->vif->dev;
1120 stats = &msta->stats;
1121
1122 /* use MT_TX_FREE_RATE to report Tx rate for further devices */
1123 if (time_after(jiffies, stats->jiffies + HZ)) {
1124 mt7915_mcu_get_rate_info(dev, RATE_CTRL_RU_INFO,
1125 msta->wcid.idx);
1126
1127 stats->jiffies = jiffies;
1128 }
1129
> 1130 if (test_and_clear_bit(IEEE80211_RC_SUPP_RATES_CHANGED |
1131 IEEE80211_RC_NSS_CHANGED |
1132 IEEE80211_RC_BW_CHANGED, &stats->changed))
1133 mt7915_mcu_add_rate_ctrl(dev, vif, sta);
1134
1135 if (test_and_clear_bit(IEEE80211_RC_SMPS_CHANGED, &stats->changed))
1136 mt7915_mcu_add_smps(dev, vif, sta);
1137
1138 spin_lock_bh(&dev->sta_poll_lock);
1139 if (list_empty(&msta->poll_list))
1140 list_add_tail(&msta->poll_list, &dev->sta_poll_list);
1141 spin_unlock_bh(&dev->sta_poll_lock);
1142 }
1143
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month