Re: [PATCH 3/5] media: adv748x: Move format to subdev state
by kernel test robot
Hi Jacopo,
I love your patch! Yet something to improve:
[auto build test ERROR on media-tree/master]
[also build test ERROR on v5.16-rc5 next-20211216]
[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/Jacopo-Mondi/media-adv748x-Add-C...
base: git://linuxtv.org/media_tree.git master
config: arc-randconfig-r043-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171539.cPT19ZOz-lk...)
compiler: arc-elf-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/90158bf217d9df03d83fac378198a756a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jacopo-Mondi/media-adv748x-Add-CSI-2-VC-support/20211217-010519
git checkout 90158bf217d9df03d83fac378198a756af229010
# 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=arc 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/media/i2c/adv748x/adv748x-csi2.c: In function 'adv748x_csi2_init_cfg':
drivers/media/i2c/adv748x/adv748x-csi2.c:146:34: error: array type has incomplete element type 'struct v4l2_subdev_route'
146 | struct v4l2_subdev_route routes[ADV748X_CSI2_STREAMS] = {
| ^~~~~~
drivers/media/i2c/adv748x/adv748x-csi2.c:152:34: error: 'V4L2_SUBDEV_ROUTE_FL_ACTIVE' undeclared (first use in this function); did you mean 'V4L2_SUBDEV_FORMAT_ACTIVE'?
152 | .flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| V4L2_SUBDEV_FORMAT_ACTIVE
drivers/media/i2c/adv748x/adv748x-csi2.c:152:34: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/i2c/adv748x/adv748x-csi2.c:173:37: error: storage size of 'routing' isn't known
173 | struct v4l2_subdev_krouting routing;
| ^~~~~~~
drivers/media/i2c/adv748x/adv748x-csi2.c:179:9: error: implicit declaration of function 'v4l2_subdev_lock_state'; did you mean 'v4l2_subdev_alloc_state'? [-Werror=implicit-function-declaration]
179 | v4l2_subdev_lock_state(state);
| ^~~~~~~~~~~~~~~~~~~~~~
| v4l2_subdev_alloc_state
drivers/media/i2c/adv748x/adv748x-csi2.c:180:15: error: implicit declaration of function 'v4l2_subdev_set_routing'; did you mean 'v4l2_subdev_notify'? [-Werror=implicit-function-declaration]
180 | ret = v4l2_subdev_set_routing(sd, state, &routing);
| ^~~~~~~~~~~~~~~~~~~~~~~
| v4l2_subdev_notify
drivers/media/i2c/adv748x/adv748x-csi2.c:181:9: error: implicit declaration of function 'v4l2_subdev_unlock_state'; did you mean 'v4l2_subdev_alloc_state'? [-Werror=implicit-function-declaration]
181 | v4l2_subdev_unlock_state(state);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| v4l2_subdev_alloc_state
drivers/media/i2c/adv748x/adv748x-csi2.c:173:37: warning: unused variable 'routing' [-Wunused-variable]
173 | struct v4l2_subdev_krouting routing;
| ^~~~~~~
drivers/media/i2c/adv748x/adv748x-csi2.c:146:34: warning: unused variable 'routes' [-Wunused-variable]
146 | struct v4l2_subdev_route routes[ADV748X_CSI2_STREAMS] = {
| ^~~~~~
drivers/media/i2c/adv748x/adv748x-csi2.c: In function 'adv748x_csi2_set_format':
>> drivers/media/i2c/adv748x/adv748x-csi2.c:198:15: error: implicit declaration of function 'v4l2_state_get_stream_format'; did you mean 'v4l2_subdev_get_try_format'? [-Werror=implicit-function-declaration]
198 | fmt = v4l2_state_get_stream_format(sd_state, sdformat->pad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| v4l2_subdev_get_try_format
>> drivers/media/i2c/adv748x/adv748x-csi2.c:199:52: error: 'struct v4l2_subdev_format' has no member named 'stream'
199 | sdformat->stream);
| ^~
>> drivers/media/i2c/adv748x/adv748x-csi2.c:207:15: error: implicit declaration of function 'v4l2_subdev_state_get_opposite_stream_format' [-Werror=implicit-function-declaration]
207 | fmt = v4l2_subdev_state_get_opposite_stream_format(sd_state, sdformat->pad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-csi2.c:208:68: error: 'struct v4l2_subdev_format' has no member named 'stream'
208 | sdformat->stream);
| ^~
drivers/media/i2c/adv748x/adv748x-csi2.c: At top level:
>> drivers/media/i2c/adv748x/adv748x-csi2.c:253:20: error: 'v4l2_subdev_get_fmt' undeclared here (not in a function); did you mean 'v4l2_subdev_notify'?
253 | .get_fmt = v4l2_subdev_get_fmt,
| ^~~~~~~~~~~~~~~~~~~
| v4l2_subdev_notify
drivers/media/i2c/adv748x/adv748x-csi2.c: In function 'adv748x_csi2_init':
drivers/media/i2c/adv748x/adv748x-csi2.c:323:29: error: 'V4L2_SUBDEV_FL_MULTIPLEXED' undeclared (first use in this function)
323 | V4L2_SUBDEV_FL_MULTIPLEXED,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-csi2.c:340:15: error: implicit declaration of function 'v4l2_subdev_init_finalize'; did you mean 'v4l2_subdev_init'? [-Werror=implicit-function-declaration]
340 | ret = v4l2_subdev_init_finalize(&tx->sd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| v4l2_subdev_init
drivers/media/i2c/adv748x/adv748x-csi2.c:357:9: error: implicit declaration of function 'v4l2_subdev_cleanup'; did you mean 'v4l2_subdev_call'? [-Werror=implicit-function-declaration]
357 | v4l2_subdev_cleanup(&tx->sd);
| ^~~~~~~~~~~~~~~~~~~
| v4l2_subdev_call
cc1: some warnings being treated as errors
vim +198 drivers/media/i2c/adv748x/adv748x-csi2.c
185
186 static int adv748x_csi2_set_format(struct v4l2_subdev *sd,
187 struct v4l2_subdev_state *sd_state,
188 struct v4l2_subdev_format *sdformat)
189 {
190 struct v4l2_mbus_framefmt *fmt;
191 int ret = 0;
192
193 /* Do not allow to set format on the multiplexed source pad. */
194 if (sdformat->pad == ADV748X_CSI2_SOURCE)
195 return -EINVAL;
196
197 v4l2_subdev_lock_state(sd_state);
> 198 fmt = v4l2_state_get_stream_format(sd_state, sdformat->pad,
> 199 sdformat->stream);
200 if (!fmt) {
201 ret = -EINVAL;
202 goto out;
203 };
204 *fmt = sdformat->format;
205
206 /* Propagate format to the other end of the route. */
> 207 fmt = v4l2_subdev_state_get_opposite_stream_format(sd_state, sdformat->pad,
208 sdformat->stream);
209 if (!fmt) {
210 ret = -EINVAL;
211 goto out;
212 }
213 *fmt = sdformat->format;
214
215 out:
216 v4l2_subdev_unlock_state(sd_state);
217
218 return ret;
219 }
220
221 static int adv748x_csi2_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
222 struct v4l2_mbus_config *config)
223 {
224 struct adv748x_csi2 *tx = adv748x_sd_to_csi2(sd);
225
226 if (pad != ADV748X_CSI2_SOURCE)
227 return -EINVAL;
228
229 config->type = V4L2_MBUS_CSI2_DPHY;
230 switch (tx->active_lanes) {
231 case 1:
232 config->flags = V4L2_MBUS_CSI2_1_LANE;
233 break;
234
235 case 2:
236 config->flags = V4L2_MBUS_CSI2_2_LANE;
237 break;
238
239 case 3:
240 config->flags = V4L2_MBUS_CSI2_3_LANE;
241 break;
242
243 case 4:
244 config->flags = V4L2_MBUS_CSI2_4_LANE;
245 break;
246 }
247
248 return 0;
249 }
250
251 static const struct v4l2_subdev_pad_ops adv748x_csi2_pad_ops = {
252 .init_cfg = adv748x_csi2_init_cfg,
> 253 .get_fmt = v4l2_subdev_get_fmt,
254 .set_fmt = adv748x_csi2_set_format,
255 .get_mbus_config = adv748x_csi2_get_mbus_config,
256 };
257
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c:765 dcn30_apply_idle_power_optimizations() error: we previously assumed 'stream' could be null (see line 749)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2b14864acbaaf03d9c01982e243a84632524c3ac
commit: ea7154d8d9fb26129f51e4d763febe97a13228a5 drm/amd/display: Update dcn30_apply_idle_power_optimizations() code
config: x86_64-randconfig-m001-20211207 (https://download.01.org/0day-ci/archive/20211216/202112161717.aP6FA32v-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c:765 dcn30_apply_idle_power_optimizations() error: we previously assumed 'stream' could be null (see line 749)
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c:767 dcn30_apply_idle_power_optimizations() error: we previously assumed 'plane' could be null (see line 749)
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c:483 dcn30_init_hw() warn: variable dereferenced before check 'res_pool->dccg' (see line 435)
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c:636 dcn30_init_hw() error: we previously assumed 'dc->clk_mgr' could be null (see line 431)
vim +/stream +765 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c
d99f13878d6f9c Bhawanpreet Lakha 2020-05-21 710 bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable)
d99f13878d6f9c Bhawanpreet Lakha 2020-05-21 711 {
52f2e83e2fe559 Bhawanpreet Lakha 2020-05-29 712 union dmub_rb_cmd cmd;
52f2e83e2fe559 Bhawanpreet Lakha 2020-05-29 713 uint32_t tmr_delay = 0, tmr_scale = 0;
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 714 struct dc_cursor_attributes cursor_attr;
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 715 bool cursor_cache_enable = false;
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 716 struct dc_stream_state *stream = NULL;
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 717 struct dc_plane_state *plane = NULL;
52f2e83e2fe559 Bhawanpreet Lakha 2020-05-29 718
d99f13878d6f9c Bhawanpreet Lakha 2020-05-21 719 if (!dc->ctx->dmub_srv)
d99f13878d6f9c Bhawanpreet Lakha 2020-05-21 720 return false;
d99f13878d6f9c Bhawanpreet Lakha 2020-05-21 721
d99f13878d6f9c Bhawanpreet Lakha 2020-05-21 722 if (enable) {
48e48e59847821 Zhan Liu 2020-08-28 723 if (dc->current_state) {
48e48e59847821 Zhan Liu 2020-08-28 724 int i;
48e48e59847821 Zhan Liu 2020-08-28 725
48e48e59847821 Zhan Liu 2020-08-28 726 /* First, check no-memory-requests case */
48e48e59847821 Zhan Liu 2020-08-28 727 for (i = 0; i < dc->current_state->stream_count; i++) {
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 728 if (dc->current_state->stream_status[i].plane_count)
48e48e59847821 Zhan Liu 2020-08-28 729 /* Fail eligibility on a visible stream */
48e48e59847821 Zhan Liu 2020-08-28 730 break;
48e48e59847821 Zhan Liu 2020-08-28 731 }
52f2e83e2fe559 Bhawanpreet Lakha 2020-05-29 732
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 733 if (i == dc->current_state->stream_count) {
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 734 /* Enable no-memory-requests case */
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 735 memset(&cmd, 0, sizeof(cmd));
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 736 cmd.mall.header.type = DMUB_CMD__MALL;
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 737 cmd.mall.header.sub_type = DMUB_CMD__MALL_ACTION_NO_DF_REQ;
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 738 cmd.mall.header.payload_bytes = sizeof(cmd.mall) - sizeof(cmd.mall.header);
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 739
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 740 dc_dmub_srv_cmd_queue(dc->ctx->dmub_srv, &cmd);
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 741 dc_dmub_srv_cmd_execute(dc->ctx->dmub_srv);
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 742
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 743 return true;
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 744 }
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 745
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 746 stream = dc->current_state->streams[0];
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 747 plane = (stream ? dc->current_state->stream_status[0].plane_states[0] : NULL);
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 748
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 @749 if (stream && plane) {
^^^^^^^^^^^^^^^
Checks for NULL
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 750 cursor_cache_enable = stream->cursor_position.enable &&
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 751 plane->address.grph.cursor_cache_addr.quad_part;
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 752 cursor_attr = stream->cursor_attributes;
a87a9a73d0e283 Alex Deucher 2020-10-26 753 }
a87a9a73d0e283 Alex Deucher 2020-10-26 754
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 755 /*
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 756 * Second, check MALL eligibility
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 757 *
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 758 * single display only, single surface only, 8 and 16 bit formats only, no VM,
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 759 * do not use MALL for displays that support PSR as they use D0i3.2 in DMCUB FW
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 760 *
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 761 * TODO: When we implement multi-display, PSR displays will be allowed if there is
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 762 * a non-PSR display present, since in that case we can't do D0i3.2
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 763 */
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 764 if (dc->current_state->stream_count == 1 &&
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 @765 stream->link->psr_settings.psr_version == DC_PSR_VERSION_UNSUPPORTED &&
^^^^^^^^
Unchecked dereferences.
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 766 dc->current_state->stream_status[0].plane_count == 1 &&
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 @767 plane->format <= SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F &&
^^^^^^^^^^^^^
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 768 plane->format >= SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 &&
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 769 plane->address.page_table_base.quad_part == 0 &&
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 770 dc->hwss.does_plane_fit_in_mall &&
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 771 dc->hwss.does_plane_fit_in_mall(dc, plane,
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 772 cursor_cache_enable ? &cursor_attr : NULL)) {
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 773 unsigned int v_total = stream->adjust.v_total_max ?
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 774 stream->adjust.v_total_max : stream->timing.v_total;
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 775 unsigned int refresh_hz = (unsigned long long) stream->timing.pix_clk_100hz *
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 776 100LL / (v_total * stream->timing.h_total);
52f2e83e2fe559 Bhawanpreet Lakha 2020-05-29 777
52f2e83e2fe559 Bhawanpreet Lakha 2020-05-29 778 /*
ea7154d8d9fb26 Bhawanpreet Lakha 2021-01-19 779 * one frame time in microsec:
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.10 711/1981] drivers/remoteproc/omap_remoteproc.c:760:27: error: initialization of 'void * (*)(struct rproc *, u64, int)' {aka 'void * (*)(struct rproc *, long long unsigned int, int)'} from incompatible pointer type 'void * (*)(struct rproc *, u64, size_t)' {aka '...
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: 87ec9a2d98a7a7dfc98b57348a0ec310fd170e4b
commit: dbb49124cb3ba0ebd03cca4efa2c91cf0164d071 [711/1981] remoteproc: Add support for peek from remote and acking kick from remote
config: arm-omap2plus_defconfig (https://download.01.org/0day-ci/archive/20211217/202112171543.NBBFgvB7-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/Xilinx/linux-xlnx/commit/dbb49124cb3ba0ebd03cca4efa2c9...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.10
git checkout dbb49124cb3ba0ebd03cca4efa2c91cf0164d071
# 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 arch/arm/mach-omap2/ arch/arm/mm/ drivers/gpu/drm/omapdrm/ drivers/remoteproc/
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/remoteproc/omap_remoteproc.c:760:27: error: initialization of 'void * (*)(struct rproc *, u64, int)' {aka 'void * (*)(struct rproc *, long long unsigned int, int)'} from incompatible pointer type 'void * (*)(struct rproc *, u64, size_t)' {aka 'void * (*)(struct rproc *, long long unsigned int, unsigned int)'} [-Werror=incompatible-pointer-types]
760 | .da_to_va = omap_rproc_da_to_va,
| ^~~~~~~~~~~~~~~~~~~
drivers/remoteproc/omap_remoteproc.c:760:27: note: (near initialization for 'omap_rproc_ops.da_to_va')
cc1: some warnings being treated as errors
--
>> drivers/remoteproc/wkup_m3_rproc.c:109:27: error: initialization of 'void * (*)(struct rproc *, u64, int)' {aka 'void * (*)(struct rproc *, long long unsigned int, int)'} from incompatible pointer type 'void * (*)(struct rproc *, u64, size_t)' {aka 'void * (*)(struct rproc *, long long unsigned int, unsigned int)'} [-Werror=incompatible-pointer-types]
109 | .da_to_va = wkup_m3_rproc_da_to_va,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/remoteproc/wkup_m3_rproc.c:109:27: note: (near initialization for 'wkup_m3_rproc_ops.da_to_va')
cc1: some warnings being treated as errors
vim +760 drivers/remoteproc/omap_remoteproc.c
530a1b57e8590f2 Suman Anna 2020-03-24 755
c008fad264f61ef Bhumika Goyal 2017-01-01 756 static const struct rproc_ops omap_rproc_ops = {
34ed5a33b1218ef Ohad Ben-Cohen 2011-10-20 757 .start = omap_rproc_start,
34ed5a33b1218ef Ohad Ben-Cohen 2011-10-20 758 .stop = omap_rproc_stop,
34ed5a33b1218ef Ohad Ben-Cohen 2011-10-20 759 .kick = omap_rproc_kick,
530a1b57e8590f2 Suman Anna 2020-03-24 @760 .da_to_va = omap_rproc_da_to_va,
34ed5a33b1218ef Ohad Ben-Cohen 2011-10-20 761 };
34ed5a33b1218ef Ohad Ben-Cohen 2011-10-20 762
:::::: The code at line 760 was first introduced by commit
:::::: 530a1b57e8590f2ebbb6a35effa0efa988aabf6c remoteproc/omap: Add the rproc ops .da_to_va() implementation
:::::: TO: Suman Anna <s-anna(a)ti.com>
:::::: CC: Bjorn Andersson <bjorn.andersson(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[pinchartl-media:gmsl/max9286/bindings 2/45] drivers/media/v4l2-core/v4l2-subdev.c:951:17: error: implicit declaration of function '__v4l2_subdev_state_alloc'
by kernel test robot
tree: git://linuxtv.org/pinchartl/media.git gmsl/max9286/bindings
head: b551a93fb443867f1a950d6063910639bd303daf
commit: 3e5486c9f448f3d9067b1050ed189db7d062fdf4 [2/45] media: subdev: add active state to struct v4l2_subdev
config: sparc64-randconfig-r014-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171508.QfPJWLAu-lk...)
compiler: sparc64-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
git remote add pinchartl-media git://linuxtv.org/pinchartl/media.git
git fetch --no-tags pinchartl-media gmsl/max9286/bindings
git checkout 3e5486c9f448f3d9067b1050ed189db7d062fdf4
# 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=sparc64 SHELL=/bin/bash drivers/media/v4l2-core/
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/media/v4l2-core/v4l2-subdev.c: In function 'v4l2_subdev_init_finalize':
>> drivers/media/v4l2-core/v4l2-subdev.c:951:17: error: implicit declaration of function '__v4l2_subdev_state_alloc' [-Werror=implicit-function-declaration]
951 | state = __v4l2_subdev_state_alloc(sd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/v4l2-core/v4l2-subdev.c:951:15: warning: assignment to 'struct v4l2_subdev_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
951 | state = __v4l2_subdev_state_alloc(sd);
| ^
drivers/media/v4l2-core/v4l2-subdev.c: In function 'v4l2_subdev_cleanup':
>> drivers/media/v4l2-core/v4l2-subdev.c:963:9: error: implicit declaration of function '__v4l2_subdev_state_free' [-Werror=implicit-function-declaration]
963 | __v4l2_subdev_state_free(sd->active_state);
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/__v4l2_subdev_state_alloc +951 drivers/media/v4l2-core/v4l2-subdev.c
946
947 int v4l2_subdev_init_finalize(struct v4l2_subdev *sd)
948 {
949 struct v4l2_subdev_state *state;
950
> 951 state = __v4l2_subdev_state_alloc(sd);
952 if (IS_ERR(state))
953 return PTR_ERR(state);
954
955 sd->active_state = state;
956
957 return 0;
958 }
959 EXPORT_SYMBOL_GPL(v4l2_subdev_init_finalize);
960
961 void v4l2_subdev_cleanup(struct v4l2_subdev *sd)
962 {
> 963 __v4l2_subdev_state_free(sd->active_state);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 06/18] MM: submit multipage reads for SWP_FS_OPS swap-space
by kernel test robot
Hi NeilBrown,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on cifs/for-next]
[also build test ERROR on axboe-block/for-next rostedt-trace/for-next linus/master v5.16-rc5]
[cannot apply to trondmy-nfs/linux-next hnaz-mm/master mszeredi-vfs/overlayfs-next next-20211216]
[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/NeilBrown/Repair-SWAP-over-NFS/2...
base: git://git.samba.org/sfrench/cifs-2.6.git for-next
config: nds32-allnoconfig (https://download.01.org/0day-ci/archive/20211217/202112171515.XWCl9bpF-lk...)
compiler: nds32le-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/d34716a962c31e9e0a6e40a702e581a02...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review NeilBrown/Repair-SWAP-over-NFS/20211217-075659
git checkout d34716a962c31e9e0a6e40a702e581a02b7e29f7
# 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=nds32 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 >>):
mm/memory.c: In function 'do_swap_page':
>> mm/memory.c:3541:33: error: too many arguments to function 'swap_readpage'
3541 | swap_readpage(page, true, NULL);
| ^~~~~~~~~~~~~
In file included from mm/memory.c:88:
mm/swap.h:61:19: note: declared here
61 | static inline int swap_readpage(struct page *page, bool do_poll)
| ^~~~~~~~~~~~~
vim +/swap_readpage +3541 mm/memory.c
3462
3463 /*
3464 * We enter with non-exclusive mmap_lock (to exclude vma changes,
3465 * but allow concurrent faults), and pte mapped but not yet locked.
3466 * We return with pte unmapped and unlocked.
3467 *
3468 * We return with the mmap_lock locked or unlocked in the same cases
3469 * as does filemap_fault().
3470 */
3471 vm_fault_t do_swap_page(struct vm_fault *vmf)
3472 {
3473 struct vm_area_struct *vma = vmf->vma;
3474 struct page *page = NULL, *swapcache;
3475 struct swap_info_struct *si = NULL;
3476 swp_entry_t entry;
3477 pte_t pte;
3478 int locked;
3479 int exclusive = 0;
3480 vm_fault_t ret = 0;
3481 void *shadow = NULL;
3482
3483 if (!pte_unmap_same(vmf))
3484 goto out;
3485
3486 entry = pte_to_swp_entry(vmf->orig_pte);
3487 if (unlikely(non_swap_entry(entry))) {
3488 if (is_migration_entry(entry)) {
3489 migration_entry_wait(vma->vm_mm, vmf->pmd,
3490 vmf->address);
3491 } else if (is_device_exclusive_entry(entry)) {
3492 vmf->page = pfn_swap_entry_to_page(entry);
3493 ret = remove_device_exclusive_entry(vmf);
3494 } else if (is_device_private_entry(entry)) {
3495 vmf->page = pfn_swap_entry_to_page(entry);
3496 ret = vmf->page->pgmap->ops->migrate_to_ram(vmf);
3497 } else if (is_hwpoison_entry(entry)) {
3498 ret = VM_FAULT_HWPOISON;
3499 } else {
3500 print_bad_pte(vma, vmf->address, vmf->orig_pte, NULL);
3501 ret = VM_FAULT_SIGBUS;
3502 }
3503 goto out;
3504 }
3505
3506 /* Prevent swapoff from happening to us. */
3507 si = get_swap_device(entry);
3508 if (unlikely(!si))
3509 goto out;
3510
3511 delayacct_set_flag(current, DELAYACCT_PF_SWAPIN);
3512 page = lookup_swap_cache(entry, vma, vmf->address);
3513 swapcache = page;
3514
3515 if (!page) {
3516 if (data_race(si->flags & SWP_SYNCHRONOUS_IO) &&
3517 __swap_count(entry) == 1) {
3518 /* skip swapcache */
3519 page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma,
3520 vmf->address);
3521 if (page) {
3522 __SetPageLocked(page);
3523 __SetPageSwapBacked(page);
3524
3525 if (mem_cgroup_swapin_charge_page(page,
3526 vma->vm_mm, GFP_KERNEL, entry)) {
3527 ret = VM_FAULT_OOM;
3528 goto out_page;
3529 }
3530 mem_cgroup_swapin_uncharge_swap(entry);
3531
3532 shadow = get_shadow_from_swap_cache(entry);
3533 if (shadow)
3534 workingset_refault(page_folio(page),
3535 shadow);
3536
3537 lru_cache_add(page);
3538
3539 /* To provide entry to swap_readpage() */
3540 set_page_private(page, entry.val);
> 3541 swap_readpage(page, true, NULL);
3542 set_page_private(page, 0);
3543 }
3544 } else {
3545 page = swapin_readahead(entry, GFP_HIGHUSER_MOVABLE,
3546 vmf);
3547 swapcache = page;
3548 }
3549
3550 if (!page) {
3551 /*
3552 * Back out if somebody else faulted in this pte
3553 * while we released the pte lock.
3554 */
3555 vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd,
3556 vmf->address, &vmf->ptl);
3557 if (likely(pte_same(*vmf->pte, vmf->orig_pte)))
3558 ret = VM_FAULT_OOM;
3559 delayacct_clear_flag(current, DELAYACCT_PF_SWAPIN);
3560 goto unlock;
3561 }
3562
3563 /* Had to read the page from swap area: Major fault */
3564 ret = VM_FAULT_MAJOR;
3565 count_vm_event(PGMAJFAULT);
3566 count_memcg_event_mm(vma->vm_mm, PGMAJFAULT);
3567 } else if (PageHWPoison(page)) {
3568 /*
3569 * hwpoisoned dirty swapcache pages are kept for killing
3570 * owner processes (which may be unknown at hwpoison time)
3571 */
3572 ret = VM_FAULT_HWPOISON;
3573 delayacct_clear_flag(current, DELAYACCT_PF_SWAPIN);
3574 goto out_release;
3575 }
3576
3577 locked = lock_page_or_retry(page, vma->vm_mm, vmf->flags);
3578
3579 delayacct_clear_flag(current, DELAYACCT_PF_SWAPIN);
3580 if (!locked) {
3581 ret |= VM_FAULT_RETRY;
3582 goto out_release;
3583 }
3584
3585 /*
3586 * Make sure try_to_free_swap or reuse_swap_page or swapoff did not
3587 * release the swapcache from under us. The page pin, and pte_same
3588 * test below, are not enough to exclude that. Even if it is still
3589 * swapcache, we need to check that the page's swap has not changed.
3590 */
3591 if (unlikely((!PageSwapCache(page) ||
3592 page_private(page) != entry.val)) && swapcache)
3593 goto out_page;
3594
3595 page = ksm_might_need_to_copy(page, vma, vmf->address);
3596 if (unlikely(!page)) {
3597 ret = VM_FAULT_OOM;
3598 page = swapcache;
3599 goto out_page;
3600 }
3601
3602 cgroup_throttle_swaprate(page, GFP_KERNEL);
3603
3604 /*
3605 * Back out if somebody else already faulted in this pte.
3606 */
3607 vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, vmf->address,
3608 &vmf->ptl);
3609 if (unlikely(!pte_same(*vmf->pte, vmf->orig_pte)))
3610 goto out_nomap;
3611
3612 if (unlikely(!PageUptodate(page))) {
3613 ret = VM_FAULT_SIGBUS;
3614 goto out_nomap;
3615 }
3616
3617 /*
3618 * The page isn't present yet, go ahead with the fault.
3619 *
3620 * Be careful about the sequence of operations here.
3621 * To get its accounting right, reuse_swap_page() must be called
3622 * while the page is counted on swap but not yet in mapcount i.e.
3623 * before page_add_anon_rmap() and swap_free(); try_to_free_swap()
3624 * must be called after the swap_free(), or it will never succeed.
3625 */
3626
3627 inc_mm_counter_fast(vma->vm_mm, MM_ANONPAGES);
3628 dec_mm_counter_fast(vma->vm_mm, MM_SWAPENTS);
3629 pte = mk_pte(page, vma->vm_page_prot);
3630 if ((vmf->flags & FAULT_FLAG_WRITE) && reuse_swap_page(page, NULL)) {
3631 pte = maybe_mkwrite(pte_mkdirty(pte), vma);
3632 vmf->flags &= ~FAULT_FLAG_WRITE;
3633 ret |= VM_FAULT_WRITE;
3634 exclusive = RMAP_EXCLUSIVE;
3635 }
3636 flush_icache_page(vma, page);
3637 if (pte_swp_soft_dirty(vmf->orig_pte))
3638 pte = pte_mksoft_dirty(pte);
3639 if (pte_swp_uffd_wp(vmf->orig_pte)) {
3640 pte = pte_mkuffd_wp(pte);
3641 pte = pte_wrprotect(pte);
3642 }
3643 set_pte_at(vma->vm_mm, vmf->address, vmf->pte, pte);
3644 arch_do_swap_page(vma->vm_mm, vma, vmf->address, pte, vmf->orig_pte);
3645 vmf->orig_pte = pte;
3646
3647 /* ksm created a completely new copy */
3648 if (unlikely(page != swapcache && swapcache)) {
3649 page_add_new_anon_rmap(page, vma, vmf->address, false);
3650 lru_cache_add_inactive_or_unevictable(page, vma);
3651 } else {
3652 do_page_add_anon_rmap(page, vma, vmf->address, exclusive);
3653 }
3654
3655 swap_free(entry);
3656 if (mem_cgroup_swap_full(page) ||
3657 (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
3658 try_to_free_swap(page);
3659 unlock_page(page);
3660 if (page != swapcache && swapcache) {
3661 /*
3662 * Hold the lock to avoid the swap entry to be reused
3663 * until we take the PT lock for the pte_same() check
3664 * (to avoid false positives from pte_same). For
3665 * further safety release the lock after the swap_free
3666 * so that the swap count won't change under a
3667 * parallel locked swapcache.
3668 */
3669 unlock_page(swapcache);
3670 put_page(swapcache);
3671 }
3672
3673 if (vmf->flags & FAULT_FLAG_WRITE) {
3674 ret |= do_wp_page(vmf);
3675 if (ret & VM_FAULT_ERROR)
3676 ret &= VM_FAULT_ERROR;
3677 goto out;
3678 }
3679
3680 /* No need to invalidate - it was non-present before */
3681 update_mmu_cache(vma, vmf->address, vmf->pte);
3682 unlock:
3683 pte_unmap_unlock(vmf->pte, vmf->ptl);
3684 out:
3685 if (si)
3686 put_swap_device(si);
3687 return ret;
3688 out_nomap:
3689 pte_unmap_unlock(vmf->pte, vmf->ptl);
3690 out_page:
3691 unlock_page(page);
3692 out_release:
3693 put_page(page);
3694 if (page != swapcache && swapcache) {
3695 unlock_page(swapcache);
3696 put_page(swapcache);
3697 }
3698 if (si)
3699 put_swap_device(si);
3700 return ret;
3701 }
3702
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH v3 17/25] iomap: Convert iomap_write_begin() and iomap_write_end() to folios
by kernel test robot
Hi "Matthew,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on linus/master v5.16-rc5 next-20211216]
[cannot apply to xfs-linux/for-next djwong-xfs/djwong-devel]
[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/Matthew-Wilcox-Oracle/iomap-xfs-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: riscv-buildonly-randconfig-r006-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171450.ZkHT3FCx-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9043c3d65b11b442226015acfbf8167684586cfa)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/2d3e5234105d9fb12c78cf6c09a20d65e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Matthew-Wilcox-Oracle/iomap-xfs-folio-patches/20211217-050934
git checkout 2d3e5234105d9fb12c78cf6c09a20d65e5a55e2f
# 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=riscv SHELL=/bin/bash fs/iomap/
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/iomap/buffered-io.c:620:9: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) << (12)) - ((unsigned long)(pos) & ~(~(((1UL) << (12)) - 1)))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
len = min(len, PAGE_SIZE - offset_in_page(pos));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +620 fs/iomap/buffered-io.c
602
603 static int iomap_write_begin(const struct iomap_iter *iter, loff_t pos,
604 size_t len, struct folio **foliop)
605 {
606 const struct iomap_page_ops *page_ops = iter->iomap.page_ops;
607 const struct iomap *srcmap = iomap_iter_srcmap(iter);
608 struct folio *folio;
609 unsigned fgp = FGP_LOCK | FGP_WRITE | FGP_CREAT | FGP_STABLE | FGP_NOFS;
610 int status = 0;
611
612 BUG_ON(pos + len > iter->iomap.offset + iter->iomap.length);
613 if (srcmap != &iter->iomap)
614 BUG_ON(pos + len > srcmap->offset + srcmap->length);
615
616 if (fatal_signal_pending(current))
617 return -EINTR;
618
619 if (!mapping_large_folio_support(iter->inode->i_mapping))
> 620 len = min(len, PAGE_SIZE - offset_in_page(pos));
621
622 if (page_ops && page_ops->page_prepare) {
623 status = page_ops->page_prepare(iter->inode, pos, len);
624 if (status)
625 return status;
626 }
627
628 folio = __filemap_get_folio(iter->inode->i_mapping, pos >> PAGE_SHIFT,
629 fgp, mapping_gfp_mask(iter->inode->i_mapping));
630 if (!folio) {
631 status = -ENOMEM;
632 goto out_no_page;
633 }
634 if (pos + len > folio_pos(folio) + folio_size(folio))
635 len = folio_pos(folio) + folio_size(folio) - pos;
636
637 if (srcmap->type == IOMAP_INLINE)
638 status = iomap_write_begin_inline(iter, folio);
639 else if (srcmap->flags & IOMAP_F_BUFFER_HEAD)
640 status = __block_write_begin_int(folio, pos, len, NULL, srcmap);
641 else
642 status = __iomap_write_begin(iter, pos, len, folio);
643
644 if (unlikely(status))
645 goto out_unlock;
646
647 *foliop = folio;
648 return 0;
649
650 out_unlock:
651 folio_unlock(folio);
652 folio_put(folio);
653 iomap_write_failed(iter->inode, pos, len);
654
655 out_no_page:
656 if (page_ops && page_ops->page_done)
657 page_ops->page_done(iter->inode, pos, 0, NULL);
658 return status;
659 }
660
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH v3 17/25] iomap: Convert iomap_write_begin() and iomap_write_end() to folios
by kernel test robot
Hi "Matthew,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on linus/master v5.16-rc5 next-20211216]
[cannot apply to xfs-linux/for-next djwong-xfs/djwong-devel]
[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/Matthew-Wilcox-Oracle/iomap-xfs-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: hexagon-randconfig-r045-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171400.vuSHf13n-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9043c3d65b11b442226015acfbf8167684586cfa)
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/2d3e5234105d9fb12c78cf6c09a20d65e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Matthew-Wilcox-Oracle/iomap-xfs-folio-patches/20211217-050934
git checkout 2d3e5234105d9fb12c78cf6c09a20d65e5a55e2f
# 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=hexagon SHELL=/bin/bash fs/iomap/
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/iomap/buffered-io.c:620:9: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof ((1UL << 14) - ((unsigned long)(pos) & ~(~((1 << 14) - 1)))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
len = min(len, PAGE_SIZE - offset_in_page(pos));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +620 fs/iomap/buffered-io.c
602
603 static int iomap_write_begin(const struct iomap_iter *iter, loff_t pos,
604 size_t len, struct folio **foliop)
605 {
606 const struct iomap_page_ops *page_ops = iter->iomap.page_ops;
607 const struct iomap *srcmap = iomap_iter_srcmap(iter);
608 struct folio *folio;
609 unsigned fgp = FGP_LOCK | FGP_WRITE | FGP_CREAT | FGP_STABLE | FGP_NOFS;
610 int status = 0;
611
612 BUG_ON(pos + len > iter->iomap.offset + iter->iomap.length);
613 if (srcmap != &iter->iomap)
614 BUG_ON(pos + len > srcmap->offset + srcmap->length);
615
616 if (fatal_signal_pending(current))
617 return -EINTR;
618
619 if (!mapping_large_folio_support(iter->inode->i_mapping))
> 620 len = min(len, PAGE_SIZE - offset_in_page(pos));
621
622 if (page_ops && page_ops->page_prepare) {
623 status = page_ops->page_prepare(iter->inode, pos, len);
624 if (status)
625 return status;
626 }
627
628 folio = __filemap_get_folio(iter->inode->i_mapping, pos >> PAGE_SHIFT,
629 fgp, mapping_gfp_mask(iter->inode->i_mapping));
630 if (!folio) {
631 status = -ENOMEM;
632 goto out_no_page;
633 }
634 if (pos + len > folio_pos(folio) + folio_size(folio))
635 len = folio_pos(folio) + folio_size(folio) - pos;
636
637 if (srcmap->type == IOMAP_INLINE)
638 status = iomap_write_begin_inline(iter, folio);
639 else if (srcmap->flags & IOMAP_F_BUFFER_HEAD)
640 status = __block_write_begin_int(folio, pos, len, NULL, srcmap);
641 else
642 status = __iomap_write_begin(iter, pos, len, folio);
643
644 if (unlikely(status))
645 goto out_unlock;
646
647 *foliop = folio;
648 return 0;
649
650 out_unlock:
651 folio_unlock(folio);
652 folio_put(folio);
653 iomap_write_failed(iter->inode, pos, len);
654
655 out_no_page:
656 if (page_ops && page_ops->page_done)
657 page_ops->page_done(iter->inode, pos, 0, NULL);
658 return status;
659 }
660
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[chrome-os:chromeos-5.10 9997/9999] drivers/staging/media/hantro/rk3399_vpu_hw_vp8_enc.c:124:18: error: 'zbin_boost' defined but not used
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: 641765639e49f85d50f9e846f0a736258a3b9421
commit: 284c868bb2d12f07bff08698afb1948bf361da27 [9997/9999] CHROMIUM: media: hantro: Add VP8 encoding support for RK3399
config: arm-chromiumos-arm-customedconfig-chrome-os:chromeos-5.10:641765639e49f85d50f9e846f0a736258a3b9421 (https://download.01.org/0day-ci/archive/20211217/202112171356.9UnQsxzF-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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout 284c868bb2d12f07bff08698afb1948bf361da27
# 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
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/hantro/rk3399_vpu_hw_vp8_enc.c:124:18: error: 'zbin_boost' defined but not used [-Werror=unused-const-variable=]
124 | static const s32 zbin_boost[16] = {
| ^~~~~~~~~~
cc1: all warnings being treated as errors
vim +/zbin_boost +124 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_enc.c
123
> 124 static const s32 zbin_boost[16] = {
125 0, 0, 8, 10, 12, 14, 16, 20, 24, 28,
126 32, 36, 40, 44, 44, 44
127 };
128
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[intel-tdx:kvm-upstream 116/152] arch/x86/kvm/vmx/tdx_stubs.c:17:6: warning: no previous prototype for function 'tdx_handle_exit_irqoff'
by kernel test robot
tree: https://github.com/intel/tdx.git kvm-upstream
head: bdfe06c17daab60c196ff80c1d98467a1d3734fa
commit: 23fe81f995e342b4152daa56cad4105a72277d4f [116/152] KVM: TDX: Add a place holder to handle TDX VM exit
config: x86_64-randconfig-a013-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171316.zV7lPxFK-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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/intel/tdx/commit/23fe81f995e342b4152daa56cad4105a72277d4f
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream
git checkout 23fe81f995e342b4152daa56cad4105a72277d4f
# 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=x86_64 SHELL=/bin/bash arch/x86/kvm/
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 >>):
arch/x86/kvm/vmx/tdx_stubs.c:4:13: warning: no previous prototype for function 'tdx_pre_kvm_init' [-Wmissing-prototypes]
void __init tdx_pre_kvm_init(unsigned int *vcpu_size,
^
arch/x86/kvm/vmx/tdx_stubs.c:4:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init tdx_pre_kvm_init(unsigned int *vcpu_size,
^
static
arch/x86/kvm/vmx/tdx_stubs.c:6:12: warning: no previous prototype for function 'tdx_hardware_setup' [-Wmissing-prototypes]
int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops) { return -EOPNOTSUPP; }
^
arch/x86/kvm/vmx/tdx_stubs.c:6:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops) { return -EOPNOTSUPP; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:7:6: warning: no previous prototype for function 'tdx_hardware_enable' [-Wmissing-prototypes]
void tdx_hardware_enable(void) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:7:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_hardware_enable(void) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:8:6: warning: no previous prototype for function 'tdx_hardware_disable' [-Wmissing-prototypes]
void tdx_hardware_disable(void) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:8:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_hardware_disable(void) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:10:5: warning: no previous prototype for function 'tdx_vcpu_create' [-Wmissing-prototypes]
int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
^
arch/x86/kvm/vmx/tdx_stubs.c:10:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:11:6: warning: no previous prototype for function 'tdx_vcpu_free' [-Wmissing-prototypes]
void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:11:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:12:6: warning: no previous prototype for function 'tdx_vcpu_reset' [-Wmissing-prototypes]
void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:12:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:13:12: warning: no previous prototype for function 'tdx_vcpu_run' [-Wmissing-prototypes]
fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
^
arch/x86/kvm/vmx/tdx_stubs.c:13:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:14:6: warning: no previous prototype for function 'tdx_vcpu_load' [-Wmissing-prototypes]
void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:14:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:15:6: warning: no previous prototype for function 'tdx_vcpu_put' [-Wmissing-prototypes]
void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:15:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:16:6: warning: no previous prototype for function 'tdx_prepare_switch_to_guest' [-Wmissing-prototypes]
void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
^
static
>> arch/x86/kvm/vmx/tdx_stubs.c:17:6: warning: no previous prototype for function 'tdx_handle_exit_irqoff' [-Wmissing-prototypes]
void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:17:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
^
static
>> arch/x86/kvm/vmx/tdx_stubs.c:18:5: warning: no previous prototype for function 'tdx_handle_exit' [-Wmissing-prototypes]
int tdx_handle_exit(struct kvm_vcpu *vcpu,
^
arch/x86/kvm/vmx/tdx_stubs.c:18:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_handle_exit(struct kvm_vcpu *vcpu,
^
static
arch/x86/kvm/vmx/tdx_stubs.c:21:6: warning: no previous prototype for function 'tdx_apicv_post_state_restore' [-Wmissing-prototypes]
void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:21:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:22:5: warning: no previous prototype for function 'tdx_deliver_posted_interrupt' [-Wmissing-prototypes]
int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; }
^
arch/x86/kvm/vmx/tdx_stubs.c:22:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; }
^
static
>> arch/x86/kvm/vmx/tdx_stubs.c:23:6: warning: no previous prototype for function 'tdx_get_exit_info' [-Wmissing-prototypes]
void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason,
^
arch/x86/kvm/vmx/tdx_stubs.c:23:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason,
^
static
arch/x86/kvm/vmx/tdx_stubs.c:26:5: warning: no previous prototype for function 'tdx_dev_ioctl' [-Wmissing-prototypes]
int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; }
^
arch/x86/kvm/vmx/tdx_stubs.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:27:5: warning: no previous prototype for function 'tdx_vm_ioctl' [-Wmissing-prototypes]
int tdx_vm_ioctl(struct kvm *kvm, void __user *argp) { return -EOPNOTSUPP; }
^
arch/x86/kvm/vmx/tdx_stubs.c:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_vm_ioctl(struct kvm *kvm, void __user *argp) { return -EOPNOTSUPP; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:28:72: error: use of undeclared identifier 'ENOPNOTSUPP'
int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; }
^
arch/x86/kvm/vmx/tdx_stubs.c:28:5: warning: no previous prototype for function 'tdx_vcpu_ioctl' [-Wmissing-prototypes]
int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; }
^
arch/x86/kvm/vmx/tdx_stubs.c:28:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; }
^
static
arch/x86/kvm/vmx/tdx_stubs.c:30:6: warning: no previous prototype for function 'tdx_flush_tlb' [-Wmissing-prototypes]
void tdx_flush_tlb(struct kvm_vcpu *vcpu) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:30:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_flush_tlb(struct kvm_vcpu *vcpu) {}
^
static
arch/x86/kvm/vmx/tdx_stubs.c:31:6: warning: no previous prototype for function 'tdx_load_mmu_pgd' [-Wmissing-prototypes]
void tdx_load_mmu_pgd(struct kvm_vcpu *vcpu, hpa_t root_hpa, int root_level) {}
^
arch/x86/kvm/vmx/tdx_stubs.c:31:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void tdx_load_mmu_pgd(struct kvm_vcpu *vcpu, hpa_t root_hpa, int root_level) {}
^
static
21 warnings and 1 error generated.
vim +/tdx_handle_exit_irqoff +17 arch/x86/kvm/vmx/tdx_stubs.c
9
10 int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
11 void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
12 void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
13 fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
14 void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
15 void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
16 void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
> 17 void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
> 18 int tdx_handle_exit(struct kvm_vcpu *vcpu,
19 enum exit_fastpath_completion fastpath) { return 0; }
20
21 void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {}
22 int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; }
> 23 void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason,
24 u64 *info1, u64 *info2, u32 *intr_info, u32 *error_code) {}
25
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week