All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [driver-core:driver-core-testing 1/4] include/linux/rcupdate.h:510:9: error: dereferencing pointer to incomplete type 'struct revocable_provider'
Date: Thu, 5 Feb 2026 05:55:24 +0000	[thread overview]
Message-ID: <aYQwzGvucW3c8LUo@google.com> (raw)
In-Reply-To: <202602040048.R81E8WaK-lkp@intel.com>

On Wed, Feb 04, 2026 at 12:48:55AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git driver-core-testing
> head:   988357628c2c84e891f5992c4f5cfb31fb3bd27b
> commit: 4d7dc4d1a62dbb22b1178dddeeb7a22d0272df77 [1/4] revocable: Fix races in revocable_alloc() using RCU
> config: sparc-randconfig-001-20260203 (https://download.01.org/0day-ci/archive/20260204/202602040048.R81E8WaK-lkp@intel.com/config)
> compiler: sparc-linux-gcc (GCC) 8.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260204/202602040048.R81E8WaK-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/202602040048.R81E8WaK-lkp@intel.com/
> 
> All error/warnings (new ones prefixed by >>):
> 
>    In file included from drivers/base/revocable_test.c:19:
>    drivers/base/revocable_test.c: In function 'revocable_test_basic':
> >> include/linux/rcupdate.h:510:9: error: dereferencing pointer to incomplete type 'struct revocable_provider'
>      typeof(*p) *local = (typeof(*p) *__force)(p);   \
>    include/kunit/test.h:839:15: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>      const typeof(left) __left = (left);           \
>                   ^~~~
>    include/kunit/test.h:1056:2: note: in expansion of macro 'KUNIT_BINARY_PTR_ASSERTION'
>      KUNIT_BINARY_PTR_ASSERTION(test,           \
>      ^~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/kunit/test.h:1053:2: note: in expansion of macro 'KUNIT_EXPECT_PTR_EQ_MSG'
>      KUNIT_EXPECT_PTR_EQ_MSG(test, left, right, NULL)
>      ^~~~~~~~~~~~~~~~~~~~~~~
>    drivers/base/revocable_test.c:40:2: note: in expansion of macro 'KUNIT_EXPECT_PTR_EQ'
>      KUNIT_EXPECT_PTR_EQ(test, unrcu_pointer(rp), NULL);
>      ^~~~~~~~~~~~~~~~~~~
>    include/linux/rcupdate.h:521:26: note: in expansion of macro '__unrcu_pointer'
>     #define unrcu_pointer(p) __unrcu_pointer(p, __UNIQUE_ID(rcu))
>                              ^~~~~~~~~~~~~~~
>    drivers/base/revocable_test.c:40:28: note: in expansion of macro 'unrcu_pointer'
>      KUNIT_EXPECT_PTR_EQ(test, unrcu_pointer(rp), NULL);
>                                ^~~~~~~~~~~~~

This warning seems to be reproducible only with older toolchain.

`struct revocable_provider` is an opaque type.  Possible fixes: make it
a non-opaque type, or move the type definition to revocable_internal.h
and include the header in the KUnit test, or don't use unrcu_pointer()
at all.

I'll address other reported comments first, and evaluate this later.

      reply	other threads:[~2026-02-05  5:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 16:48 [driver-core:driver-core-testing 1/4] include/linux/rcupdate.h:510:9: error: dereferencing pointer to incomplete type 'struct revocable_provider' kernel test robot
2026-02-05  5:55 ` Tzung-Bi Shih [this message]

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=aYQwzGvucW3c8LUo@google.com \
    --to=tzungbi@kernel.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.