Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Maxime Ripard <mripard@kernel.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Emma Anholt <emma@anholt.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kselftest@vger.kernel.org,
	"Brendan Higgins" <brendan.higgins@linux.dev>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Maíra Canal" <mairacanal@riseup.net>,
	"Maxime Ripard" <mripard@kernel.org>,
	"David Gow" <davidgow@google.com>,
	kunit-dev@googlegroups.com
Subject: Re: [PATCH v2 06/11] drm/tests: helpers: Create a helper to allocate an atomic state
Date: Fri, 21 Jul 2023 02:06:15 +0800	[thread overview]
Message-ID: <202307210124.Ur3UNuxZ-lkp@intel.com> (raw)
In-Reply-To: <20230720-kms-kunit-actions-rework-v2-6-175017bd56ab@kernel.org>

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-6-175017bd56ab%40kernel.org
patch subject: [PATCH v2 06/11] drm/tests: helpers: Create a helper to allocate an atomic state
config: arm64-randconfig-r022-20230720 (https://download.01.org/0day-ci/archive/20230721/202307210124.Ur3UNuxZ-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230721/202307210124.Ur3UNuxZ-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307210124.Ur3UNuxZ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/tests/drm_kunit_helpers.c:54:6: warning: cast from 'void (*)(struct platform_driver *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
      54 |                                         (kunit_action_t *)platform_driver_unregister,
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_kunit_helpers.c:62:6: warning: cast from 'void (*)(struct platform_device *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
      62 |                                         (kunit_action_t *)platform_device_put,
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_kunit_helpers.c:70:6: warning: cast from 'void (*)(struct platform_device *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
      70 |                                         (kunit_action_t *)platform_device_del,
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_kunit_helpers.c:90:9: warning: cast from 'void (*)(struct platform_device *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
      90 |                              (kunit_action_t *)platform_device_unregister,
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_kunit_helpers.c:94:9: warning: cast from 'void (*)(struct platform_driver *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
      94 |                              (kunit_action_t *)platform_driver_unregister,
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/tests/drm_kunit_helpers.c:192:6: warning: cast from 'void (*)(struct drm_atomic_state *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
     192 |                                         (kunit_action_t *)drm_atomic_state_put,
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   6 warnings generated.


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

   164	
   165	/**
   166	 * drm_kunit_helper_atomic_state_alloc - Allocates an atomic state
   167	 * @test: The test context object
   168	 * @drm: The device to alloc the state for
   169	 * @ctx: Locking context for that atomic update
   170	 *
   171	 * Allocates a empty atomic state.
   172	 *
   173	 * The state is tied to the kunit test context, so we must not call
   174	 * drm_atomic_state_put() on it, it will be done so automatically.
   175	 *
   176	 * Returns:
   177	 * An ERR_PTR on error, a pointer to the newly allocated state otherwise
   178	 */
   179	struct drm_atomic_state *
   180	drm_kunit_helper_atomic_state_alloc(struct kunit *test,
   181					    struct drm_device *drm,
   182					    struct drm_modeset_acquire_ctx *ctx)
   183	{
   184		struct drm_atomic_state *state;
   185		int ret;
   186	
   187		state = drm_atomic_state_alloc(drm);
   188		if (!state)
   189			return ERR_PTR(-ENOMEM);
   190	
   191		ret = kunit_add_action_or_reset(test,
 > 192						(kunit_action_t *)drm_atomic_state_put,
   193						state);
   194		if (ret)
   195			return ERR_PTR(ret);
   196	
   197		state->acquire_ctx = ctx;
   198	
   199		return state;
   200	}
   201	EXPORT_SYMBOL_GPL(drm_kunit_helper_atomic_state_alloc);
   202	

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

  reply	other threads:[~2023-07-20 18:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 11:15 [PATCH v2 00/11] drm: kunit: Switch to kunit actions Maxime Ripard
2023-07-20 11:15 ` [PATCH v2 01/11] drm/tests: helpers: " Maxime Ripard
2023-07-20 17:14   ` kernel test robot
2023-07-24 11:19     ` Maxime Ripard
2023-07-20 11:15 ` [PATCH v2 02/11] drm/tests: client-modeset: Remove call to drm_kunit_helper_free_device() Maxime Ripard
2023-07-20 11:15 ` [PATCH v2 03/11] drm/tests: modes: " Maxime Ripard
2023-07-20 11:15 ` [PATCH v2 04/11] drm/tests: probe-helper: " Maxime Ripard
2023-07-20 11:15 ` [PATCH v2 05/11] drm/tests: helpers: Create a helper to allocate a locking ctx Maxime Ripard
2023-07-20 14:37   ` kernel test robot
2023-07-20 11:15 ` [PATCH v2 06/11] drm/tests: helpers: Create a helper to allocate an atomic state Maxime Ripard
2023-07-20 18:06   ` kernel test robot [this message]
2023-07-20 11:15 ` [PATCH v2 07/11] drm/vc4: tests: pv-muxing: Remove call to drm_kunit_helper_free_device() Maxime Ripard
2023-07-20 11:15 ` [PATCH v2 08/11] drm/vc4: tests: mock: Use a kunit action to unregister DRM device Maxime Ripard
2023-07-20 11:15 ` [PATCH v2 09/11] drm/vc4: tests: pv-muxing: Switch to managed locking init Maxime Ripard
2023-07-20 11:15 ` [PATCH v2 10/11] drm/vc4: tests: Switch to atomic state allocation helper Maxime Ripard
2023-07-20 11:15 ` [PATCH v2 11/11] drm/vc4: tests: pv-muxing: Document test scenario Maxime Ripard
2023-07-23 14:22 ` [PATCH v2 00/11] drm: kunit: Switch to kunit actions Maira Canal
2023-07-31 12:23 ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202307210124.Ur3UNuxZ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@gmail.com \
    --cc=brendan.higgins@linux.dev \
    --cc=daniel@ffwll.ch \
    --cc=davidgow@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emma@anholt.net \
    --cc=javierm@redhat.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mairacanal@riseup.net \
    --cc=mripard@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox