All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: ahmed Ehab <bottaawesome633@gmail.com>
Cc: kernel test robot <lkp@intel.com>, oe-kbuild-all@lists.linux.dev
Subject: Re: [boqun:lockdep-for-tip 3/3] lib/locking-selftest.c:2713:5: sparse: sparse: undefined preprocessor identifier 'CONFIG_DEBUG_LOCK_ALLOC'
Date: Sun, 29 Sep 2024 16:36:50 -0700	[thread overview]
Message-ID: <ZvnkkuKeDHS2QAUL@boqun-archlinux> (raw)
In-Reply-To: <CA+6bSavacZ0s4Xa7_MyO41nrL49LCjUyNVcwNv2JJaYpTZPfFQ@mail.gmail.com>

On Sun, Sep 29, 2024 at 11:43:39PM +0300, ahmed Ehab wrote:
> On Sun, Sep 29, 2024 at 8:27 AM kernel test robot <lkp@intel.com> wrote:
> 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git
> > lockdep-for-tip
> > head:   1c4aa09f488868163ce3e23df93a68610303f6af
> > commit: 1c4aa09f488868163ce3e23df93a68610303f6af [3/3] locking/lockdep:
> > Add a test for lockdep_set_subclass()
> > config: hexagon-randconfig-r121-20240929 (
> > https://download.01.org/0day-ci/archive/20240929/202409291308.MTSMBIvg-lkp@intel.com/config
> > )
> > compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project
> > 7773243d9916f98ba0ffce0c3a960e4aa9f03e81)
> > reproduce: (
> > https://download.01.org/0day-ci/archive/20240929/202409291308.MTSMBIvg-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/202409291308.MTSMBIvg-lkp@intel.com/
> >
> > sparse warnings: (new ones prefixed by >>)
> > >> lib/locking-selftest.c:2713:5: sparse: sparse: undefined preprocessor
> > identifier 'CONFIG_DEBUG_LOCK_ALLOC'
> >    lib/locking-selftest.c:310:1: sparse: sparse: context imbalance in
> > 'AA_spin' - wrong count at exit
> >    lib/locking-selftest.c:312:1: sparse: sparse: context imbalance in
> > 'AA_wlock' - wrong count at exit
> >    lib/locking-selftest.c:314:1: sparse: sparse: context imbalance in
> > 'AA_rlock' - wrong count at exit
> >    lib/locking-selftest.c:333:13: sparse: sparse: context imbalance in
> > 'rlock_AA1' - wrong count at exit
> >    lib/locking-selftest.c:339:13: sparse: sparse: context imbalance in
> > 'rlock_AA1B' - wrong count at exit
> >    lib/locking-selftest.c:359:13: sparse: sparse: context imbalance in
> > 'rlock_AA2' - wrong count at exit
> >    lib/locking-selftest.c:371:13: sparse: sparse: context imbalance in
> > 'rlock_AA3' - wrong count at exit
> >    lib/locking-selftest.c:740:1: sparse: sparse: context imbalance in
> > 'double_unlock_spin' - unexpected unlock
> >    lib/locking-selftest.c:742:1: sparse: sparse: context imbalance in
> > 'double_unlock_wlock' - unexpected unlock
> >    lib/locking-selftest.c:744:1: sparse: sparse: context imbalance in
> > 'double_unlock_rlock' - unexpected unlock
> >    lib/locking-selftest.c:771:1: sparse: sparse: context imbalance in
> > 'init_held_spin' - wrong count at exit
> >    lib/locking-selftest.c:773:1: sparse: sparse: context imbalance in
> > 'init_held_wlock' - wrong count at exit
> >    lib/locking-selftest.c:775:1: sparse: sparse: context imbalance in
> > 'init_held_rlock' - wrong count at exit
> >    lib/locking-selftest.c:2510:1: sparse: sparse: context imbalance in
> > 'RCU_in_HARDIRQ' - wrong count at exit
> >    lib/locking-selftest.c:2511:1: sparse: sparse: context imbalance in
> > 'RCU_in_NOTTHREADED_HARDIRQ' - wrong count at exit
> >    lib/locking-selftest.c:2517:1: sparse: sparse: context imbalance in
> > 'RCU_in_SOFTIRQ' - wrong count at exit
> >    lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in
> > 'RCU_in_RCU' - wrong count at exit
> >    lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in
> > 'RCU_in_RCU_BH' - wrong count at exit
> >    lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in
> > 'RCU_in_RCU_SCHED' - wrong count at exit
> >    lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in
> > 'RCU_in_raw_spinlock' - wrong count at exit
> >    lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in
> > 'RCU_in_spinlock' - wrong count at exit
> >    lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in
> > 'RCU_in_mutex' - wrong count at exit
> >    lib/locking-selftest.c:2510:1: sparse: sparse: context imbalance in
> > 'raw_spinlock_in_HARDIRQ' - wrong count at exit
> >    lib/locking-selftest.c:2511:1: sparse: sparse: context imbalance in
> > 'raw_spinlock_in_NOTTHREADED_HARDIRQ' - wrong count at exit
> >    lib/locking-selftest.c:2517:1: sparse: sparse: context imbalance in
> > 'raw_spinlock_in_SOFTIRQ' - wrong count at exit
> >    lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in
> > 'raw_spinlock_in_RCU' - wrong count at exit
> >    lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in
> > 'raw_spinlock_in_RCU_BH' - wrong count at exit
> >    lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in
> > 'raw_spinlock_in_RCU_SCHED' - wrong count at exit
> >    lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in
> > 'raw_spinlock_in_raw_spinlock' - wrong count at exit
> >    lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in
> > 'raw_spinlock_in_spinlock' - wrong count at exit
> >    lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in
> > 'raw_spinlock_in_mutex' - wrong count at exit
> >    lib/locking-selftest.c:2510:1: sparse: sparse: context imbalance in
> > 'spinlock_in_HARDIRQ' - wrong count at exit
> >    lib/locking-selftest.c:2511:1: sparse: sparse: context imbalance in
> > 'spinlock_in_NOTTHREADED_HARDIRQ' - wrong count at exit
> >    lib/locking-selftest.c:2517:1: sparse: sparse: context imbalance in
> > 'spinlock_in_SOFTIRQ' - wrong count at exit
> >    lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in
> > 'spinlock_in_RCU' - wrong count at exit
> >    lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in
> > 'spinlock_in_RCU_BH' - wrong count at exit
> >    lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in
> > 'spinlock_in_RCU_SCHED' - wrong count at exit
> >    lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in
> > 'spinlock_in_raw_spinlock' - wrong count at exit
> >    lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in
> > 'spinlock_in_spinlock' - wrong count at exit
> >    lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in
> > 'spinlock_in_mutex' - wrong count at exit
> >    lib/locking-selftest.c:2577:1: sparse: sparse: context imbalance in
> > 'mutex_in_RCU' - wrong count at exit
> >    lib/locking-selftest.c:2577:1: sparse: sparse: context imbalance in
> > 'mutex_in_RCU_BH' - wrong count at exit
> >    lib/locking-selftest.c:2577:1: sparse: sparse: context imbalance in
> > 'mutex_in_RCU_SCHED' - wrong count at exit
> >    lib/locking-selftest.c:2577:1: sparse: sparse: context imbalance in
> > 'mutex_in_raw_spinlock' - wrong count at exit
> >    lib/locking-selftest.c:2577:1: sparse: sparse: context imbalance in
> > 'mutex_in_spinlock' - wrong count at exit
> >
> > vim +/CONFIG_DEBUG_LOCK_ALLOC +2713 lib/locking-selftest.c
> >
> >   2712
> > > 2713  #if CONFIG_DEBUG_LOCK_ALLOC
> >   2714  static inline const char *rw_semaphore_lockdep_name(struct
> > rw_semaphore *rwsem)
> >   2715  {
> >   2716          return rwsem->dep_map.name;
> >   2717  }
> >   2718  #else
> >   2719  static inline const char *rw_semaphore_lockdep_name(struct
> > rw_semaphore *rwsem)
> >   2720  {
> >   2721          return NULL;
> >   2722  }
> >   2723  #endif
> >   2724
> >
> > --
> 
> 
> Do I need to handle any of these warnings?
> 

No need this time, I will fix this on my side, seems you should use
#ifdef instead of #if.

Regards,
Boqun

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

      parent reply	other threads:[~2024-09-29 23:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-29  5:26 [boqun:lockdep-for-tip 3/3] lib/locking-selftest.c:2713:5: sparse: sparse: undefined preprocessor identifier 'CONFIG_DEBUG_LOCK_ALLOC' kernel test robot
     [not found] ` <CA+6bSavacZ0s4Xa7_MyO41nrL49LCjUyNVcwNv2JJaYpTZPfFQ@mail.gmail.com>
2024-09-29 23:36   ` Boqun Feng [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=ZvnkkuKeDHS2QAUL@boqun-archlinux \
    --to=boqun.feng@gmail.com \
    --cc=bottaawesome633@gmail.com \
    --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.