drivers/ata/sata_fsl.c:335:6: warning: %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 555f3d7be91a873114c9656069f1a9fa476ec41a
commit: 87924c5b4094f195507bebcab96e141e48c947d7 ata: sata_fsl: add compile test support
date: 5 weeks ago
compiler: powerpc-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/ata/sata_fsl.c:335:6: warning: %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int]
if (sscanf(buf, "%d%d",
^
drivers/ata/sata_fsl.c:335:6: warning: %d in format string (no. 2) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int]
if (sscanf(buf, "%d%d",
^
drivers/ata/sata_fsl.c:376:6: warning: %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int]
if (sscanf(buf, "%d", &rx_watermark) != 1) {
^
vim +335 drivers/ata/sata_fsl.c
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 328
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 329 static ssize_t fsl_sata_intr_coalescing_store(struct device *dev,
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 330 struct device_attribute *attr,
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 331 const char *buf, size_t count)
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 332 {
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 333 unsigned int coalescing_count, coalescing_ticks;
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 334
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 @335 if (sscanf(buf, "%d%d",
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 336 &coalescing_count,
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 337 &coalescing_ticks) != 2) {
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 338 printk(KERN_ERR "fsl-sata: wrong parameter format.\n");
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 339 return -EINVAL;
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 340 }
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 341
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 342 fsl_sata_set_irq_coalescing(dev_get_drvdata(dev),
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 343 coalescing_count, coalescing_ticks);
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 344
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 345 return strlen(buf);
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 346 }
6b4b8fc87dc5cbf Qiang Liu 2012-02-15 347
:::::: The code at line 335 was first introduced by commit
:::::: 6b4b8fc87dc5cbfcfb5c749dc200906471fb854c sata_fsl: add support for interrupt coalsecing feature
:::::: TO: Qiang Liu <qiang.liu(a)freescale.com>
:::::: CC: Jeff Garzik <jgarzik(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
Re: [PATCH v3 7/7] media: subdev: rename v4l2_subdev_pad_config.try_* fields
by kernel test robot
Hi Tomi,
I love your patch! Yet something to improve:
[auto build test ERROR on media-tree/master]
[also build test ERROR on tegra/for-next v5.17-rc3]
[cannot apply to next-20220207]
[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/Tomi-Valkeinen/v4l-subdev-active...
base: git://linuxtv.org/media_tree.git master
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220208/202202081223.gzH6LYK9-lk...)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/8283dea08111c6a813e9340d735c158df...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tomi-Valkeinen/v4l-subdev-active-state/20220208-002350
git checkout 8283dea08111c6a813e9340d735c158df3fcbe5f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/staging/
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/staging/media/tegra-video/vi.c: In function '__tegra_channel_try_format':
>> drivers/staging/media/tegra-video/vi.c:544:39: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
544 | sd_state->pads->try_crop.width = 0;
| ^~
drivers/staging/media/tegra-video/vi.c:545:39: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
545 | sd_state->pads->try_crop.height = 0;
| ^~
drivers/staging/media/tegra-video/vi.c:552:39: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
552 | sd_state->pads->try_crop.width = sdsel.r.width;
| ^~
drivers/staging/media/tegra-video/vi.c:553:39: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
553 | sd_state->pads->try_crop.height = sdsel.r.height;
| ^~
drivers/staging/media/tegra-video/vi.c:556:31: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
556 | sd_state->pads->try_crop.width = fse.max_width;
| ^~
drivers/staging/media/tegra-video/vi.c:557:31: error: 'struct v4l2_subdev_pad_config' has no member named 'try_crop'
557 | sd_state->pads->try_crop.height = fse.max_height;
| ^~
vim +544 drivers/staging/media/tegra-video/vi.c
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 489
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 490 static int __tegra_channel_try_format(struct tegra_vi_channel *chan,
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 491 struct v4l2_pix_format *pix)
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 492 {
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 493 const struct tegra_video_format *fmtinfo;
d156949c999153 Tomi Valkeinen 2022-02-07 494 static struct lock_class_key key;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 495 struct v4l2_subdev *subdev;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 496 struct v4l2_subdev_format fmt;
0d346d2a6f54f0 Tomi Valkeinen 2021-06-10 497 struct v4l2_subdev_state *sd_state;
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 498 struct v4l2_subdev_frame_size_enum fse = {
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 499 .which = V4L2_SUBDEV_FORMAT_TRY,
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 500 };
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 501 struct v4l2_subdev_selection sdsel = {
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 502 .which = V4L2_SUBDEV_FORMAT_ACTIVE,
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 503 .target = V4L2_SEL_TGT_CROP_BOUNDS,
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 504 };
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12 505 int ret;
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12 506
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12 507 subdev = tegra_channel_get_remote_source_subdev(chan);
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12 508 if (!subdev)
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12 509 return -ENODEV;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 510
d156949c999153 Tomi Valkeinen 2022-02-07 511 /*
d156949c999153 Tomi Valkeinen 2022-02-07 512 * FIXME: Drop this call, drivers are not supposed to use
d156949c999153 Tomi Valkeinen 2022-02-07 513 * __v4l2_subdev_state_alloc().
d156949c999153 Tomi Valkeinen 2022-02-07 514 */
d156949c999153 Tomi Valkeinen 2022-02-07 515 sd_state = __v4l2_subdev_state_alloc(subdev, "tegra:state->lock",
d156949c999153 Tomi Valkeinen 2022-02-07 516 &key);
ba7a93e507f883 Dan Carpenter 2021-06-22 517 if (IS_ERR(sd_state))
ba7a93e507f883 Dan Carpenter 2021-06-22 518 return PTR_ERR(sd_state);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 519 /*
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 520 * Retrieve the format information and if requested format isn't
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 521 * supported, keep the current format.
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 522 */
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 523 fmtinfo = tegra_get_format_by_fourcc(chan->vi, pix->pixelformat);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 524 if (!fmtinfo) {
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 525 pix->pixelformat = chan->format.pixelformat;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 526 pix->colorspace = chan->format.colorspace;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 527 fmtinfo = tegra_get_format_by_fourcc(chan->vi,
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 528 pix->pixelformat);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 529 }
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 530
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 531 pix->field = V4L2_FIELD_NONE;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 532 fmt.which = V4L2_SUBDEV_FORMAT_TRY;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 533 fmt.pad = 0;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 534 v4l2_fill_mbus_format(&fmt.format, pix, fmtinfo->code);
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 535
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 536 /*
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 537 * Attempt to obtain the format size from subdev.
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 538 * If not available, try to get crop boundary from subdev.
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 539 */
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 540 fse.code = fmtinfo->code;
0d346d2a6f54f0 Tomi Valkeinen 2021-06-10 541 ret = v4l2_subdev_call(subdev, pad, enum_frame_size, sd_state, &fse);
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 542 if (ret) {
56f64b82356b74 Sowjanya Komatineni 2020-12-11 543 if (!v4l2_subdev_has_op(subdev, pad, get_selection)) {
0d346d2a6f54f0 Tomi Valkeinen 2021-06-10 @544 sd_state->pads->try_crop.width = 0;
0d346d2a6f54f0 Tomi Valkeinen 2021-06-10 545 sd_state->pads->try_crop.height = 0;
56f64b82356b74 Sowjanya Komatineni 2020-12-11 546 } else {
56f64b82356b74 Sowjanya Komatineni 2020-12-11 547 ret = v4l2_subdev_call(subdev, pad, get_selection,
56f64b82356b74 Sowjanya Komatineni 2020-12-11 548 NULL, &sdsel);
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 549 if (ret)
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 550 return -EINVAL;
56f64b82356b74 Sowjanya Komatineni 2020-12-11 551
0d346d2a6f54f0 Tomi Valkeinen 2021-06-10 552 sd_state->pads->try_crop.width = sdsel.r.width;
0d346d2a6f54f0 Tomi Valkeinen 2021-06-10 553 sd_state->pads->try_crop.height = sdsel.r.height;
56f64b82356b74 Sowjanya Komatineni 2020-12-11 554 }
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 555 } else {
0d346d2a6f54f0 Tomi Valkeinen 2021-06-10 556 sd_state->pads->try_crop.width = fse.max_width;
0d346d2a6f54f0 Tomi Valkeinen 2021-06-10 557 sd_state->pads->try_crop.height = fse.max_height;
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 558 }
bdcad5ce6dde6e Sowjanya Komatineni 2020-08-12 559
0d346d2a6f54f0 Tomi Valkeinen 2021-06-10 560 ret = v4l2_subdev_call(subdev, pad, set_fmt, sd_state, &fmt);
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12 561 if (ret < 0)
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12 562 return ret;
1ebaeb09830f36 Sowjanya Komatineni 2020-08-12 563
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 564 v4l2_fill_pix_format(pix, &fmt.format);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 565 tegra_channel_fmt_align(chan, pix, fmtinfo->bpp);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 566
a702cbb5ddd2f7 Tomi Valkeinen 2022-02-07 567 __v4l2_subdev_state_free(sd_state);
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 568
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 569 return 0;
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 570 }
3d8a97eabef088 Sowjanya Komatineni 2020-05-04 571
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
Re: [Intel-gfx] [PATCH v6 6/6] drm: Add arch arm64 for drm_clflush_virt_range
by kernel test robot
Hi Michael,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm/drm-next v5.17-rc3 next-20220207]
[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/Michael-Cheng/Use-drm_clflush-in...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20220208/202202081258.VY7Y7JnA-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.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/f2fb6ade1531d88b046e245e8b854a742...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Cheng/Use-drm_clflush-instead-of-clflush/20220208-041326
git checkout f2fb6ade1531d88b046e245e8b854a7422a05a14
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/
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 >>):
drivers/gpu/drm/drm_cache.c: In function 'drm_clflush_virt_range':
>> drivers/gpu/drm/drm_cache.c:182:32: warning: dereferencing 'void *' pointer
182 | flush_tlb_kernel_range(*addr, *end);
| ^~~~~
drivers/gpu/drm/drm_cache.c:182:39: warning: dereferencing 'void *' pointer
182 | flush_tlb_kernel_range(*addr, *end);
| ^~~~
>> drivers/gpu/drm/drm_cache.c:182:32: error: invalid use of void expression
182 | flush_tlb_kernel_range(*addr, *end);
| ^~~~~
drivers/gpu/drm/drm_cache.c:182:39: error: invalid use of void expression
182 | flush_tlb_kernel_range(*addr, *end);
| ^~~~
vim +182 drivers/gpu/drm/drm_cache.c
151
152 /**
153 * drm_clflush_virt_range - Flush dcache lines of a region
154 * @addr: Initial kernel memory address.
155 * @length: Region size.
156 *
157 * Flush every data cache line entry that points to an address in the
158 * region requested.
159 */
160 void
161 drm_clflush_virt_range(void *addr, unsigned long length)
162 {
163 #if defined(CONFIG_X86)
164 if (static_cpu_has(X86_FEATURE_CLFLUSH)) {
165 const int size = boot_cpu_data.x86_clflush_size;
166 void *end = addr + length;
167
168 addr = (void *)(((unsigned long)addr) & -size);
169 mb(); /*CLFLUSH is only ordered with a full memory barrier*/
170 for (; addr < end; addr += size)
171 clflushopt(addr);
172 clflushopt(end - 1); /* force serialisation */
173 mb(); /*Ensure that every data cache line entry is flushed*/
174 return;
175 }
176
177 if (wbinvd_on_all_cpus())
178 pr_err("Timed out waiting for cache flush\n");
179
180 #elif defined(CONFIG_ARM64)
181 void *end = addr + length;
> 182 flush_tlb_kernel_range(*addr, *end);
183 #else
184 pr_err("Architecture has no drm_cache.c support\n");
185 WARN_ON_ONCE(1);
186 #endif
187 }
188 EXPORT_SYMBOL(drm_clflush_virt_range);
189
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks
Re: [Intel-gfx] [PATCH v6 6/6] drm: Add arch arm64 for drm_clflush_virt_range
by kernel test robot
Hi Michael,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm/drm-next v5.17-rc3 next-20220207]
[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/Michael-Cheng/Use-drm_clflush-in...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm64-randconfig-r005-20220207 (https://download.01.org/0day-ci/archive/20220208/202202081151.wYD1tE4p-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0d8850ae2cae85d49bea6ae0799fa41c7202c05c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/f2fb6ade1531d88b046e245e8b854a742...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Cheng/Use-drm_clflush-instead-of-clflush/20220208-041326
git checkout f2fb6ade1531d88b046e245e8b854a7422a05a14
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash
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/gpu/drm/drm_cache.c:182:25: error: passing 'void' to parameter of incompatible type 'unsigned long'
flush_tlb_kernel_range(*addr, *end);
^~~~~
arch/arm64/include/asm/tlbflush.h:374:57: note: passing argument to parameter 'start' here
static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end)
^
1 error generated.
vim +182 drivers/gpu/drm/drm_cache.c
151
152 /**
153 * drm_clflush_virt_range - Flush dcache lines of a region
154 * @addr: Initial kernel memory address.
155 * @length: Region size.
156 *
157 * Flush every data cache line entry that points to an address in the
158 * region requested.
159 */
160 void
161 drm_clflush_virt_range(void *addr, unsigned long length)
162 {
163 #if defined(CONFIG_X86)
164 if (static_cpu_has(X86_FEATURE_CLFLUSH)) {
165 const int size = boot_cpu_data.x86_clflush_size;
166 void *end = addr + length;
167
168 addr = (void *)(((unsigned long)addr) & -size);
169 mb(); /*CLFLUSH is only ordered with a full memory barrier*/
170 for (; addr < end; addr += size)
171 clflushopt(addr);
172 clflushopt(end - 1); /* force serialisation */
173 mb(); /*Ensure that every data cache line entry is flushed*/
174 return;
175 }
176
177 if (wbinvd_on_all_cpus())
178 pr_err("Timed out waiting for cache flush\n");
179
180 #elif defined(CONFIG_ARM64)
181 void *end = addr + length;
> 182 flush_tlb_kernel_range(*addr, *end);
183 #else
184 pr_err("Architecture has no drm_cache.c support\n");
185 WARN_ON_ONCE(1);
186 #endif
187 }
188 EXPORT_SYMBOL(drm_clflush_virt_range);
189
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 2 weeks