Re: [PATCH v3] fs/btrfs: Fix uninitialized variable
by kernel test robot
Hi Khaled,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on v5.12-rc8 next-20210420]
[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/Khaled-ROMDHANI/fs-btrfs-Fix-uni...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: arm-randconfig-r021-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/c05b2a58c9ed11bd753f1e64695bd89da...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Khaled-ROMDHANI/fs-btrfs-Fix-uninitialized-variable/20210420-231754
git checkout c05b2a58c9ed11bd753f1e64695bd89da715fbaa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/btrfs/zoned.c:146:2: warning: variable 'zone' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
default:
^~~~~~~
fs/btrfs/zoned.c:153:14: note: uninitialized use occurs here
return (u32)zone;
^~~~
fs/btrfs/zoned.c:139:10: note: initialize the variable 'zone' to silence this warning
u64 zone;
^
= 0
1 warning generated.
vim +/zone +146 fs/btrfs/zoned.c
133
134 /*
135 * Get the first zone number of the superblock mirror
136 */
137 static inline u32 sb_zone_number(int shift, int mirror)
138 {
139 u64 zone;
140
141 ASSERT(mirror < BTRFS_SUPER_MIRROR_MAX);
142 switch (mirror) {
143 case 0: zone = 0; break;
144 case 1: zone = 1ULL << (BTRFS_SB_LOG_FIRST_SHIFT - shift); break;
145 case 2: zone = 1ULL << (BTRFS_SB_LOG_SECOND_SHIFT - shift); break;
> 146 default:
147 ASSERT(zone);
148 break;
149 }
150
151 ASSERT(zone <= U32_MAX);
152
153 return (u32)zone;
154 }
155
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [v7 2/4] ASoC: Add Rockchip rk817 audio CODEC support
by kernel test robot
Hi Chris,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[also build test ERROR on lee-mfd/for-mfd-next sound/for-next v5.12-rc8 next-20210420]
[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/Chris-Morgan/mfd-Add-Rockchip-rk...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: nds32-randconfig-r004-20210420 (attached as .config)
compiler: nds32le-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/438ec6f1ceec6d4d7cde8169bc8011010...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chris-Morgan/mfd-Add-Rockchip-rk817-audio-CODEC-support/20210421-000916
git checkout 438ec6f1ceec6d4d7cde8169bc80110102e6a396
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=nds32
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 >>):
sound/soc/codecs/rk817_codec.c: In function 'rk817_probe':
>> sound/soc/codecs/rk817_codec.c:418:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
418 | int ret;
| ^~~
In file included from include/linux/bpf.h:19,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/regulator/machine.h:15,
from include/linux/mfd/rk808.h:18,
from sound/soc/codecs/rk817_codec.c:10:
sound/soc/codecs/rk817_codec.c: At top level:
>> sound/soc/codecs/rk817_codec.c:546:25: error: 'rk817_codec_dt_ids' undeclared here (not in a function); did you mean 'rk817_codec_priv'?
546 | MODULE_DEVICE_TABLE(of, rk817_codec_dt_ids);
| ^~~~~~~~~~~~~~~~~~
include/linux/module.h:238:15: note: in definition of macro 'MODULE_DEVICE_TABLE'
238 | extern typeof(name) __mod_##type##__##name##_device_table \
| ^~~~
>> include/linux/module.h:238:21: error: '__mod_of__rk817_codec_dt_ids_device_table' aliased to undefined symbol 'rk817_codec_dt_ids'
238 | extern typeof(name) __mod_##type##__##name##_device_table \
| ^~~~~~
sound/soc/codecs/rk817_codec.c:546:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
546 | MODULE_DEVICE_TABLE(of, rk817_codec_dt_ids);
| ^~~~~~~~~~~~~~~~~~~
vim +546 sound/soc/codecs/rk817_codec.c
413
414 static int rk817_probe(struct snd_soc_component *component)
415 {
416 struct rk817_codec_priv *rk817 = snd_soc_component_get_drvdata(component);
417 struct rk808 *rk808 = dev_get_drvdata(component->dev->parent);
> 418 int ret;
419
420 snd_soc_component_init_regmap(component, rk808->regmap);
421 rk817->component = component;
422
423 ret = snd_soc_component_write(component, RK817_CODEC_DTOP_LPT_SRST, 0x40);
424
425 rk817_init(component);
426
427 /* setting initial pll values so that we can continue to leverage simple-audio-card.
428 * The values aren't important since no parameters are used.
429 */
430
431 snd_soc_component_set_pll(component, 0, 0, 0, 0);
432
433 return 0;
434 }
435
436 static void rk817_remove(struct snd_soc_component *component)
437 {
438 snd_soc_component_exit_regmap(component);
439 }
440
441 static const struct snd_soc_component_driver soc_codec_dev_rk817 = {
442 .probe = rk817_probe,
443 .remove = rk817_remove,
444 .idle_bias_on = 1,
445 .use_pmdown_time = 1,
446 .endianness = 1,
447 .non_legacy_dai_naming = 1,
448 .controls = rk817_volume_controls,
449 .num_controls = ARRAY_SIZE(rk817_volume_controls),
450 .dapm_routes = rk817_dapm_routes,
451 .num_dapm_routes = ARRAY_SIZE(rk817_dapm_routes),
452 .dapm_widgets = rk817_dapm_widgets,
453 .num_dapm_widgets = ARRAY_SIZE(rk817_dapm_widgets),
454 .set_pll = rk817_set_component_pll,
455 };
456
457 static int rk817_codec_parse_dt_property(struct device *dev,
458 struct rk817_codec_priv *rk817)
459 {
460 struct device_node *node = dev->parent->of_node;
461
462 if (!node) {
463 dev_err(dev, "%s() dev->parent->of_node is NULL\n",
464 __func__);
465 return -ENODEV;
466 }
467
468 node = of_get_child_by_name(dev->parent->of_node, "codec");
469 if (!node) {
470 dev_err(dev, "%s() Can not get child: codec\n",
471 __func__);
472 return -ENODEV;
473 }
474
475 rk817->mic_in_differential =
476 of_property_read_bool(node, "mic-in-differential");
477
478 return 0;
479 }
480
481 static int rk817_platform_probe(struct platform_device *pdev)
482 {
483 struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent);
484 struct rk817_codec_priv *rk817_codec_data;
485 int ret;
486
487 if (!rk808) {
488 dev_err(&pdev->dev, "%s : rk817 is NULL\n", __func__);
489 return -EINVAL;
490 }
491
492 rk817_codec_data = devm_kzalloc(&pdev->dev,
493 sizeof(struct rk817_codec_priv),
494 GFP_KERNEL);
495 if (!rk817_codec_data)
496 return -ENOMEM;
497
498 platform_set_drvdata(pdev, rk817_codec_data);
499
500 rk817_codec_data->rk808 = rk808;
501
502 ret = rk817_codec_parse_dt_property(&pdev->dev, rk817_codec_data);
503 if (ret < 0) {
504 dev_err(&pdev->dev, "%s() parse device tree property error %d\n",
505 __func__, ret);
506 goto err_;
507 }
508
509 rk817_codec_data->mclk = clk_get(pdev->dev.parent, "mclk");
510 if (IS_ERR(rk817_codec_data->mclk)) {
511 dev_err(&pdev->dev, "Unable to get mclk\n");
512 ret = -ENXIO;
513 goto err_;
514 }
515
516 ret = clk_prepare_enable(rk817_codec_data->mclk);
517 if (ret < 0) {
518 dev_err(&pdev->dev, "%s() clock prepare error %d\n",
519 __func__, ret);
520 goto err_;
521 }
522
523 ret = devm_snd_soc_register_component(&pdev->dev, &soc_codec_dev_rk817,
524 rk817_dai, ARRAY_SIZE(rk817_dai));
525 if (ret < 0) {
526 dev_err(&pdev->dev, "%s() register codec error %d\n",
527 __func__, ret);
528 goto err_;
529 }
530
531 return 0;
532 err_:
533
534 return ret;
535 }
536
537 static int rk817_platform_remove(struct platform_device *pdev)
538 {
539 struct rk817_codec_priv *rk817 = platform_get_drvdata(pdev);
540
541 clk_disable_unprepare(rk817->mclk);
542
543 return 0;
544 }
545
> 546 MODULE_DEVICE_TABLE(of, rk817_codec_dt_ids);
547
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[chrome-os:chromeos-4.19 29831/29836] drivers/usb/host/mausb/ip_link.c:100:17: sparse: sparse: cast from restricted __be16
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: ebdaf7021fb9a412f3c7e2f731537c27e52eb09d
commit: c9047afcfaf4a9d17038c794a9650c8b4c44a44c [29831/29836] CHROMIUM: Add ma-usb kernel module
config: powerpc-randconfig-s032-20210420 (attached as .config)
compiler: powerpc64-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.3-341-g8af24329-dirty
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.19
git checkout c9047afcfaf4a9d17038c794a9650c8b4c44a44c
# 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__' W=1 ARCH=powerpc
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/usb/host/mausb/ip_link.c:100:17: sparse: sparse: cast from restricted __be16
vim +100 drivers/usb/host/mausb/ip_link.c
65
66 static void __mausb_ip_connect(struct work_struct *work)
67 {
68 int status = 0;
69 struct sockaddr *sa;
70 int sa_size;
71 struct mausb_ip_ctx *ip_ctx = container_of(work, struct mausb_ip_ctx,
72 connect_work);
73 unsigned short int family = ip_ctx->dev_addr_in.sa_in.sin_family;
74
75 if (!ip_ctx->udp) {
76 status = sock_create_kern(ip_ctx->net_ns, family,
77 SOCK_STREAM, IPPROTO_TCP,
78 &ip_ctx->client_socket);
79 if (status < 0) {
80 dev_err(mausb_host_dev.this_device, "Failed to create socket: status=%d",
81 status);
82 goto callback;
83 }
84 } else {
85 status = sock_create_kern(ip_ctx->net_ns, family, SOCK_DGRAM,
86 IPPROTO_UDP, &ip_ctx->client_socket);
87 if (status < 0) {
88 dev_err(mausb_host_dev.this_device, "Failed to create socket: status=%d",
89 status);
90 goto callback;
91 }
92 }
93
94 __mausb_ip_set_options((struct socket *)ip_ctx->client_socket,
95 ip_ctx->udp);
96
97 if (family == AF_INET) {
98 sa = (struct sockaddr *)&ip_ctx->dev_addr_in.sa_in;
99 sa_size = sizeof(ip_ctx->dev_addr_in.sa_in);
> 100 dev_info(mausb_host_dev.this_device, "Connecting to %pI4:%d, status=%d",
101 &ip_ctx->dev_addr_in.sa_in.sin_addr,
102 htons(ip_ctx->dev_addr_in.sa_in.sin_port), status);
103 #if IS_ENABLED(CONFIG_IPV6)
104 } else if (family == AF_INET6) {
105 sa = (struct sockaddr *)&ip_ctx->dev_addr_in.sa_in6;
106 sa_size = sizeof(ip_ctx->dev_addr_in.sa_in6);
107 dev_info(mausb_host_dev.this_device, "Connecting to %pI6c:%d, status=%d",
108 &ip_ctx->dev_addr_in.sa_in6.sin6_addr,
109 htons(ip_ctx->dev_addr_in.sa_in6.sin6_port), status);
110 #endif
111 } else {
112 dev_err(mausb_host_dev.this_device, "Wrong network family provided");
113 status = -EINVAL;
114 goto callback;
115 }
116
117 status = kernel_connect(ip_ctx->client_socket, sa, sa_size, O_RDWR);
118 if (status < 0) {
119 dev_err(mausb_host_dev.this_device, "Failed to connect to host, status=%d",
120 status);
121 goto clear_socket;
122 }
123
124 queue_work(ip_ctx->recv_workq, &ip_ctx->recv_work);
125
126 goto callback;
127
128 clear_socket:
129 sock_release(ip_ctx->client_socket);
130 ip_ctx->client_socket = NULL;
131 callback:
132 ip_ctx->fn_callback(ip_ctx->ctx, ip_ctx->channel, MAUSB_LINK_CONNECT,
133 status, NULL);
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[chrome-os:chromeos-5.4 31/243] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_hw.c:56:41: sparse: sparse: Using plain integer as NULL pointer
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 52d269f32500581166246e0e494b2b62d979dba6
commit: f04d055758de31185e1b298147cae3de6349dba1 [31/243] CHROMIUM: media: mtk-vcodec: Use component framework to manage each hardware information
config: nios2-randconfig-s032-20210420 (attached as .config)
compiler: nios2-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.3-341-g8af24329-dirty
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout f04d055758de31185e1b298147cae3de6349dba1
# 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__' W=1 ARCH=nios2
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/media/platform/mtk-vcodec/mtk_vcodec_dec_hw.c:56:41: sparse: sparse: Using plain integer as NULL pointer
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_hw.c: note: in included file (through arch/nios2/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
vim +56 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_hw.c
50
51 static void mtk_vdec_hw_unbind(struct device *dev, struct device *master,
52 void *data)
53 {
54 struct mtk_vcodec_dev *comp_priv = dev_get_drvdata(dev);
55
> 56 comp_priv->reg_base[VDEC_SYS] = 0;
57 }
58
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[android-common:android-4.14-stable 22/22] drivers/gpu/drm/virtio/virtgpu_vq.c:1130:23: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-4.14-stable
head: 4d701a3899580b291122ab7b147bc20981afd349
commit: 4d701a3899580b291122ab7b147bc20981afd349 [22/22] CHROMIUM: drm/virtio: rebase zero-copy patches to virgl/drm-misc-next
config: i386-randconfig-s001-20210420 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.14-stable
git checkout 4d701a3899580b291122ab7b147bc20981afd349
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 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/gpu/drm/virtio/virtgpu_vq.c:200:33: sparse: sparse: restricted __le32 degrades to integer
drivers/gpu/drm/virtio/virtgpu_vq.c:200:43: sparse: sparse: restricted __le32 degrades to integer
>> drivers/gpu/drm/virtio/virtgpu_vq.c:1130:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le64 [usertype] offset @@ got unsigned long long [usertype] offset @@
drivers/gpu/drm/virtio/virtgpu_vq.c:1130:23: sparse: expected restricted __le64 [usertype] offset
drivers/gpu/drm/virtio/virtgpu_vq.c:1130:23: sparse: got unsigned long long [usertype] offset
vim +1130 drivers/gpu/drm/virtio/virtgpu_vq.c
1107
1108 void virtio_gpu_cmd_map(struct virtio_gpu_device *vgdev,
1109 struct virtio_gpu_object *bo,
1110 uint64_t offset,
1111 struct virtio_gpu_fence *fence)
1112 {
1113 struct virtio_gpu_resource_map *cmd_p;
1114 struct virtio_gpu_vbuffer *vbuf;
1115 struct virtio_gpu_resp_map_info *resp_buf;
1116
1117 resp_buf = kzalloc(sizeof(*resp_buf), GFP_KERNEL);
1118 if (!resp_buf) {
1119 DRM_ERROR("allocation failure\n");
1120 return;
1121 }
1122
1123 cmd_p = virtio_gpu_alloc_cmd_resp(vgdev,
1124 virtio_gpu_cmd_resource_map_cb, &vbuf, sizeof(*cmd_p),
1125 sizeof(struct virtio_gpu_resp_map_info), resp_buf);
1126 memset(cmd_p, 0, sizeof(*cmd_p));
1127
1128 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_MAP);
1129 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle);
> 1130 cmd_p->offset = offset;
1131
1132 virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, &cmd_p->hdr, fence);
1133 }
1134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[intel-linux-intel-lts:5.4/preempt-rt 15/16] fs/squashfs/decompressor_multi_percpu.c:27:30: warning: unused variable 'stream_lock'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/preempt-rt
head: 2046457bf9f4a420f69e915453d59db5b38edbaa
commit: 3c3f9863f8b96ccbf6fd420c93f1685f6085651a [15/16] Merge tag 'lts-v5.4.58-yocto-200825T002733Z' into lts2019/yocto-rt
config: powerpc-randconfig-r003-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/intel/linux-intel-lts/commit/3c3f9863f8b96ccbf6fd420c9...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/preempt-rt
git checkout 3c3f9863f8b96ccbf6fd420c93f1685f6085651a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:81:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/squashfs/decompressor_multi_percpu.c:10:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:86:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:544:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/squashfs/decompressor_multi_percpu.c:10:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:91:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/squashfs/decompressor_multi_percpu.c:10:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:96:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/squashfs/decompressor_multi_percpu.c:10:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:9:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:605:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:602:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:101:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:547:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> fs/squashfs/decompressor_multi_percpu.c:27:30: warning: unused variable 'stream_lock' [-Wunused-const-variable]
static DEFINE_LOCAL_IRQ_LOCK(stream_lock);
^
13 warnings generated.
vim +/stream_lock +27 fs/squashfs/decompressor_multi_percpu.c
d208383d640727 Phillip Lougher 2013-11-18 26
b45f39e849edf7 Julia Cartwright 2018-05-07 @27 static DEFINE_LOCAL_IRQ_LOCK(stream_lock);
b45f39e849edf7 Julia Cartwright 2018-05-07 28
:::::: The code at line 27 was first introduced by commit
:::::: b45f39e849edf78b6cd90edd28f3ef179fd65218 squashfs: make use of local lock in multi_cpu decompressor
:::::: TO: Julia Cartwright <julia(a)ni.com>
:::::: CC: Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [thermal: thermal/next] thermal/drivers/tsens: Convert msm8960 to reg_field
by kernel test robot
Hi thermal-bot,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.12-rc7]
[cannot apply to thermal/next next-20210415]
[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/thermal-bot-for-Ansuel-Smith/the...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7f75285ca572eaabc028cf78c6ab5473d0d160be
config: arm-randconfig-r015-20210415 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/efea0f0570b6b581bdb2fad978a35fd1a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review thermal-bot-for-Ansuel-Smith/thermal-drivers-tsens-Convert-msm8960-to-reg_field/20210415-200542
git checkout efea0f0570b6b581bdb2fad978a35fd1a521385b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm
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/thermal/qcom/tsens-8960.c: In function 'init_8960':
>> drivers/thermal/qcom/tsens-8960.c:193:29: error: 'S0_STATUS_ADDR' undeclared (first use in this function); did you mean 'INT_STATUS_ADDR'?
193 | priv->sensor[i].status = S0_STATUS_ADDR + 40;
| ^~~~~~~~~~~~~~
| INT_STATUS_ADDR
drivers/thermal/qcom/tsens-8960.c:193:29: note: each undeclared identifier is reported only once for each function it appears in
drivers/thermal/qcom/tsens-8960.c: At top level:
>> drivers/thermal/qcom/tsens-8960.c:284:15: error: 'VER_0' undeclared here (not in a function); did you mean 'VER_0_1'?
284 | .ver_major = VER_0,
| ^~~~~
| VER_0_1
vim +193 drivers/thermal/qcom/tsens-8960.c
20d4fd84bf524ad Rajendra Nayak 2016-05-05 175
69b628ac71f07d6 Amit Kucheria 2019-03-20 176 static int init_8960(struct tsens_priv *priv)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 177 {
20d4fd84bf524ad Rajendra Nayak 2016-05-05 178 int ret, i;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 179 u32 reg_cntl;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 180
69b628ac71f07d6 Amit Kucheria 2019-03-20 181 priv->tm_map = dev_get_regmap(priv->dev, NULL);
69b628ac71f07d6 Amit Kucheria 2019-03-20 182 if (!priv->tm_map)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 183 return -ENODEV;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 184
20d4fd84bf524ad Rajendra Nayak 2016-05-05 185 /*
20d4fd84bf524ad Rajendra Nayak 2016-05-05 186 * The status registers for each sensor are discontiguous
20d4fd84bf524ad Rajendra Nayak 2016-05-05 187 * because some SoCs have 5 sensors while others have more
20d4fd84bf524ad Rajendra Nayak 2016-05-05 188 * but the control registers stay in the same place, i.e
20d4fd84bf524ad Rajendra Nayak 2016-05-05 189 * directly after the first 5 status registers.
20d4fd84bf524ad Rajendra Nayak 2016-05-05 190 */
69b628ac71f07d6 Amit Kucheria 2019-03-20 191 for (i = 0; i < priv->num_sensors; i++) {
20d4fd84bf524ad Rajendra Nayak 2016-05-05 192 if (i >= 5)
69b628ac71f07d6 Amit Kucheria 2019-03-20 @193 priv->sensor[i].status = S0_STATUS_ADDR + 40;
69b628ac71f07d6 Amit Kucheria 2019-03-20 194 priv->sensor[i].status += i * 4;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 195 }
20d4fd84bf524ad Rajendra Nayak 2016-05-05 196
20d4fd84bf524ad Rajendra Nayak 2016-05-05 197 reg_cntl = SW_RST;
69b628ac71f07d6 Amit Kucheria 2019-03-20 198 ret = regmap_update_bits(priv->tm_map, CNTL_ADDR, SW_RST, reg_cntl);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 199 if (ret)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 200 return ret;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 201
69b628ac71f07d6 Amit Kucheria 2019-03-20 202 if (priv->num_sensors > 1) {
20d4fd84bf524ad Rajendra Nayak 2016-05-05 203 reg_cntl |= SLP_CLK_ENA | (MEASURE_PERIOD << 18);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 204 reg_cntl &= ~SW_RST;
69b628ac71f07d6 Amit Kucheria 2019-03-20 205 ret = regmap_update_bits(priv->tm_map, CONFIG_ADDR,
20d4fd84bf524ad Rajendra Nayak 2016-05-05 206 CONFIG_MASK, CONFIG);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 207 } else {
20d4fd84bf524ad Rajendra Nayak 2016-05-05 208 reg_cntl |= SLP_CLK_ENA_8660 | (MEASURE_PERIOD << 16);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 209 reg_cntl &= ~CONFIG_MASK_8660;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 210 reg_cntl |= CONFIG_8660 << CONFIG_SHIFT_8660;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 211 }
20d4fd84bf524ad Rajendra Nayak 2016-05-05 212
69b628ac71f07d6 Amit Kucheria 2019-03-20 213 reg_cntl |= GENMASK(priv->num_sensors - 1, 0) << SENSOR0_SHIFT;
69b628ac71f07d6 Amit Kucheria 2019-03-20 214 ret = regmap_write(priv->tm_map, CNTL_ADDR, reg_cntl);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 215 if (ret)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 216 return ret;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 217
20d4fd84bf524ad Rajendra Nayak 2016-05-05 218 reg_cntl |= EN;
69b628ac71f07d6 Amit Kucheria 2019-03-20 219 ret = regmap_write(priv->tm_map, CNTL_ADDR, reg_cntl);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 220 if (ret)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 221 return ret;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 222
20d4fd84bf524ad Rajendra Nayak 2016-05-05 223 return 0;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 224 }
20d4fd84bf524ad Rajendra Nayak 2016-05-05 225
69b628ac71f07d6 Amit Kucheria 2019-03-20 226 static int calibrate_8960(struct tsens_priv *priv)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 227 {
20d4fd84bf524ad Rajendra Nayak 2016-05-05 228 int i;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 229 char *data;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 230
69b628ac71f07d6 Amit Kucheria 2019-03-20 231 ssize_t num_read = priv->num_sensors;
69b628ac71f07d6 Amit Kucheria 2019-03-20 232 struct tsens_sensor *s = priv->sensor;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 233
69b628ac71f07d6 Amit Kucheria 2019-03-20 234 data = qfprom_read(priv->dev, "calib");
20d4fd84bf524ad Rajendra Nayak 2016-05-05 235 if (IS_ERR(data))
69b628ac71f07d6 Amit Kucheria 2019-03-20 236 data = qfprom_read(priv->dev, "calib_backup");
20d4fd84bf524ad Rajendra Nayak 2016-05-05 237 if (IS_ERR(data))
20d4fd84bf524ad Rajendra Nayak 2016-05-05 238 return PTR_ERR(data);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 239
20d4fd84bf524ad Rajendra Nayak 2016-05-05 240 for (i = 0; i < num_read; i++, s++)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 241 s->offset = data[i];
20d4fd84bf524ad Rajendra Nayak 2016-05-05 242
6b8249abb093551 Srinivas Kandagatla 2019-08-23 243 kfree(data);
6b8249abb093551 Srinivas Kandagatla 2019-08-23 244
20d4fd84bf524ad Rajendra Nayak 2016-05-05 245 return 0;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 246 }
20d4fd84bf524ad Rajendra Nayak 2016-05-05 247
20d4fd84bf524ad Rajendra Nayak 2016-05-05 248 /* Temperature on y axis and ADC-code on x-axis */
20d4fd84bf524ad Rajendra Nayak 2016-05-05 249 static inline int code_to_mdegC(u32 adc_code, const struct tsens_sensor *s)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 250 {
20d4fd84bf524ad Rajendra Nayak 2016-05-05 251 int slope, offset;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 252
20d4fd84bf524ad Rajendra Nayak 2016-05-05 253 slope = thermal_zone_get_slope(s->tzd);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 254 offset = CAL_MDEGC - slope * s->offset;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 255
20d4fd84bf524ad Rajendra Nayak 2016-05-05 256 return adc_code * slope + offset;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 257 }
20d4fd84bf524ad Rajendra Nayak 2016-05-05 258
e604bdd2a7e1087 Amit Kucheria 2020-03-12 259 static int get_temp_8960(const struct tsens_sensor *s, int *temp)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 260 {
20d4fd84bf524ad Rajendra Nayak 2016-05-05 261 int ret;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 262 u32 code, trdy;
8b71bce407b3f13 Amit Kucheria 2019-11-01 263 struct tsens_priv *priv = s->priv;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 264 unsigned long timeout;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 265
20d4fd84bf524ad Rajendra Nayak 2016-05-05 266 timeout = jiffies + usecs_to_jiffies(TIMEOUT_US);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 267 do {
69b628ac71f07d6 Amit Kucheria 2019-03-20 268 ret = regmap_read(priv->tm_map, INT_STATUS_ADDR, &trdy);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 269 if (ret)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 270 return ret;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 271 if (!(trdy & TRDY_MASK))
20d4fd84bf524ad Rajendra Nayak 2016-05-05 272 continue;
69b628ac71f07d6 Amit Kucheria 2019-03-20 273 ret = regmap_read(priv->tm_map, s->status, &code);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 274 if (ret)
20d4fd84bf524ad Rajendra Nayak 2016-05-05 275 return ret;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 276 *temp = code_to_mdegC(code, s);
20d4fd84bf524ad Rajendra Nayak 2016-05-05 277 return 0;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 278 } while (time_before(jiffies, timeout));
20d4fd84bf524ad Rajendra Nayak 2016-05-05 279
20d4fd84bf524ad Rajendra Nayak 2016-05-05 280 return -ETIMEDOUT;
20d4fd84bf524ad Rajendra Nayak 2016-05-05 281 }
20d4fd84bf524ad Rajendra Nayak 2016-05-05 282
efea0f0570b6b58 thermal-bot for Ansuel Smith 2021-04-15 283 static struct tsens_features tsens_8960_feat = {
efea0f0570b6b58 thermal-bot for Ansuel Smith 2021-04-15 @284 .ver_major = VER_0,
efea0f0570b6b58 thermal-bot for Ansuel Smith 2021-04-15 285 .crit_int = 0,
efea0f0570b6b58 thermal-bot for Ansuel Smith 2021-04-15 286 .adc = 1,
efea0f0570b6b58 thermal-bot for Ansuel Smith 2021-04-15 287 .srot_split = 0,
efea0f0570b6b58 thermal-bot for Ansuel Smith 2021-04-15 288 .max_sensors = 11,
efea0f0570b6b58 thermal-bot for Ansuel Smith 2021-04-15 289 };
efea0f0570b6b58 thermal-bot for Ansuel Smith 2021-04-15 290
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months