Re: kernel/context_tracking.c:80: warning: Function parameter or member 'state' not described in '__ct_user_enter'

From: Paul E. McKenney
Date: Wed Dec 06 2023 - 15:38:21 EST


On Tue, Dec 05, 2023 at 02:15:54PM -0800, Randy Dunlap wrote:
>
>
> On 12/4/23 20:38, Paul E. McKenney wrote:
> > On Mon, Dec 04, 2023 at 08:02:33PM +0800, kernel test robot wrote:
> >> Hi Frederic,
> >>
> >> FYI, the error/warning still remains.
> >>
> >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >> head: 33cc938e65a98f1d29d0a18403dbbee050dcad9a
> >> commit: e67198cc05b8ecbb7b8e2d8ef9fb5c8d26821873 context_tracking: Take idle eqs entrypoints over RCU
> >> date: 1 year, 5 months ago
> >> config: x86_64-buildonly-randconfig-006-20230906 (https://download.01.org/0day-ci/archive/20231204/202312041922.YZCcEPYD-lkp@xxxxxxxxx/config)
> >> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> >> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231204/202312041922.YZCcEPYD-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/202312041922.YZCcEPYD-lkp@xxxxxxxxx/
> >>
> >> All warnings (new ones prefixed by >>):
> >>
> >>>> kernel/context_tracking.c:80: warning: Function parameter or member 'state' not described in '__ct_user_enter'
> >>>> kernel/context_tracking.c:184: warning: Function parameter or member 'state' not described in '__ct_user_exit'
> >
> > Does the patch below help?
>
> Yes. Thanks.
>
> Tested-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Thank you! I will apply these on my next rebase.

Thanx, Paul

> > ------------------------------------------------------------------------
> >
> > commit 9d879548a8cc89e5fdb0d806fc20887d67991c10
> > Author: Paul E. McKenney <paulmck@xxxxxxxxxx>
> > Date: Mon Dec 4 20:34:58 2023 -0800
> >
> > context_tracking: Fix kerneldoc headers for __ct_user_{enter,exit}()
> >
> > Document the "state" parameter of both of these functions.
> >
> > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202312041922.YZCcEPYD-lkp@xxxxxxxxx/
> > Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
> > Cc: Frederic Weisbecker <frederic@xxxxxxxxxx>
> >
> > diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
> > index 6ef0b35fc28c..70ae70d03823 100644
> > --- a/kernel/context_tracking.c
> > +++ b/kernel/context_tracking.c
> > @@ -458,6 +458,8 @@ static __always_inline void context_tracking_recursion_exit(void)
> > * __ct_user_enter - Inform the context tracking that the CPU is going
> > * to enter user or guest space mode.
> > *
> > + * @state: userspace context-tracking state to enter.
> > + *
> > * This function must be called right before we switch from the kernel
> > * to user or guest space, when it's guaranteed the remaining kernel
> > * instructions to execute won't use any RCU read side critical section
> > @@ -595,6 +597,8 @@ NOKPROBE_SYMBOL(user_enter_callable);
> > * __ct_user_exit - Inform the context tracking that the CPU is
> > * exiting user or guest mode and entering the kernel.
> > *
> > + * @state: userspace context-tracking state being exited from.
> > + *
> > * This function must be called after we entered the kernel from user or
> > * guest space before any use of RCU read side critical section. This
> > * potentially include any high level kernel code like syscalls, exceptions,
>
> --
> ~Randy