[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202311282223.mefGp1S5-lkp@intel.com>
Date: Tue, 28 Nov 2023 22:57:51 +0800
From: kernel test robot <lkp@...el.com>
To: Maxime Ripard <mripard@...nel.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>, Emma Anholt <emma@...olt.net>,
Jonathan Corbet <corbet@....net>,
Sandy Huang <hjc@...k-chips.com>,
Heiko Stübner <heiko@...ech.de>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
Hans Verkuil <hverkuil@...all.nl>,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-rockchip@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
Maxime Ripard <mripard@...nel.org>
Subject: Re: [PATCH v4 03/45] drm/tests: Add helper to create mock plane
Hi Maxime,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on sunxi/sunxi/for-next drm/drm-next linus/master v6.7-rc3 next-20231128]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Maxime-Ripard/drm-tests-helpers-Add-atomic-helpers/20231128-193409
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/20231128-kms-hdmi-connector-state-v4-3-c7602158306e%40kernel.org
patch subject: [PATCH v4 03/45] drm/tests: Add helper to create mock plane
config: i386-buildonly-randconfig-002-20231128 (https://download.01.org/0day-ci/archive/20231128/202311282223.mefGp1S5-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231128/202311282223.mefGp1S5-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311282223.mefGp1S5-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/tests/drm_kunit_helpers.c:290: warning: Function parameter or member 'num_formats' not described in 'drm_kunit_helper_create_primary_plane'
>> drivers/gpu/drm/tests/drm_kunit_helpers.c:290: warning: Excess function parameter 'format_count' description in 'drm_kunit_helper_create_primary_plane'
vim +290 drivers/gpu/drm/tests/drm_kunit_helpers.c
257
258 /**
259 * drm_kunit_helper_create_primary_plane - Creates a mock primary plane for a KUnit test
260 * @test: The test context object
261 * @drm: The device to alloc the plane for
262 * @funcs: Callbacks for the new plane. Optional.
263 * @helper_funcs: Helpers callbacks for the new plane. Optional.
264 * @formats: array of supported formats (DRM_FORMAT\_\*). Optional.
265 * @format_count: number of elements in @formats
266 * @modifiers: array of struct drm_format modifiers terminated by
267 * DRM_FORMAT_MOD_INVALID. Optional.
268 *
269 * This allocates and initializes a mock struct &drm_plane meant to be
270 * part of a mock device for a KUnit test.
271 *
272 * Resources will be cleaned up automatically.
273 *
274 * @funcs will default to the default helpers implementations.
275 * @helper_funcs will default to an empty implementation. @formats will
276 * default to XRGB8888 only. @modifiers will default to a linear
277 * modifier only.
278 *
279 * Returns:
280 * A pointer to the new plane, or an ERR_PTR() otherwise.
281 */
282 struct drm_plane *
283 drm_kunit_helper_create_primary_plane(struct kunit *test,
284 struct drm_device *drm,
285 const struct drm_plane_funcs *funcs,
286 const struct drm_plane_helper_funcs *helper_funcs,
287 const uint32_t *formats,
288 unsigned int num_formats,
289 const uint64_t *modifiers)
> 290 {
291 struct drm_plane *plane;
292
293 if (!funcs)
294 funcs = &default_plane_funcs;
295
296 if (!helper_funcs)
297 helper_funcs = &default_plane_helper_funcs;
298
299 if (!formats || !num_formats) {
300 formats = default_plane_formats;
301 num_formats = ARRAY_SIZE(default_plane_formats);
302 }
303
304 if (!modifiers)
305 modifiers = default_plane_modifiers;
306
307 plane = __drmm_universal_plane_alloc(drm,
308 sizeof(struct drm_plane), 0,
309 0,
310 funcs,
311 formats,
312 num_formats,
313 default_plane_modifiers,
314 DRM_PLANE_TYPE_PRIMARY,
315 NULL);
316 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, plane);
317
318 drm_plane_helper_add(plane, helper_funcs);
319
320 return plane;
321 }
322 EXPORT_SYMBOL_GPL(drm_kunit_helper_create_primary_plane);
323
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists