Re: [PATCH v2 05/11] drm/tests: helpers: Create a helper to allocate a locking ctx

From: kernel test robot
Date: Thu Jul 20 2023 - 10:38:43 EST


Hi Maxime,

kernel test robot noticed the following build warnings:

[auto build test WARNING on c58c49dd89324b18a812762a2bfa5a0458e4f252]

url: https://github.com/intel-lab-lkp/linux/commits/Maxime-Ripard/drm-tests-helpers-Switch-to-kunit-actions/20230720-191901
base: c58c49dd89324b18a812762a2bfa5a0458e4f252
patch link: https://lore.kernel.org/r/20230720-kms-kunit-actions-rework-v2-5-175017bd56ab%40kernel.org
patch subject: [PATCH v2 05/11] drm/tests: helpers: Create a helper to allocate a locking ctx
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230720/202307202244.26VyeZKj-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230720/202307202244.26VyeZKj-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307202244.26VyeZKj-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/tests/drm_kunit_helpers.c:145: warning: expecting prototype for drm_kunit_helper_context_alloc(). Prototype was for drm_kunit_helper_acquire_ctx_alloc() instead


vim +145 drivers/gpu/drm/tests/drm_kunit_helpers.c

130
131 /**
132 * drm_kunit_helper_context_alloc - Allocates an acquire context
133 * @test: The test context object
134 *
135 * Allocates and initializes a modeset acquire context.
136 *
137 * The context is tied to the kunit test context, so we must not call
138 * drm_modeset_acquire_fini() on it, it will be done so automatically.
139 *
140 * Returns:
141 * An ERR_PTR on error, a pointer to the newly allocated context otherwise
142 */
143 struct drm_modeset_acquire_ctx *
144 drm_kunit_helper_acquire_ctx_alloc(struct kunit *test)
> 145 {
146 struct drm_modeset_acquire_ctx *ctx;
147 int ret;
148
149 ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KERNEL);
150 KUNIT_ASSERT_NOT_NULL(test, ctx);
151
152 drm_modeset_acquire_init(ctx, 0);
153
154 ret = kunit_add_action_or_reset(test,
155 action_drm_release_context,
156 ctx);
157 if (ret)
158 return ERR_PTR(ret);
159
160 return ctx;
161 }
162 EXPORT_SYMBOL_GPL(drm_kunit_helper_acquire_ctx_alloc);
163

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki