* drivers/char/nvram.c:56:21: warning: 'nvram_mutex' defined but not used
@ 2026-05-14 10:26 kernel test robot
2026-05-15 7:05 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-05-14 10:26 UTC (permalink / raw)
To: Matthew Wilcox (Oracle); +Cc: oe-kbuild-all, linux-kernel
Hi Matthew,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e1914add2799225a87502051415fc5c32aeb02ae
commit: 25500ba7e77ce9d3d9b5a1929d41a2ee2e23f6fe locking/mutex: Remove the list_head from struct mutex
date: 10 weeks ago
config: powerpc64-randconfig-002-20260514 (https://download.01.org/0day-ci/archive/20260514/202605141850.qvidrpg9-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605141850.qvidrpg9-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
| Fixes: 25500ba7e77c ("locking/mutex: Remove the list_head from struct mutex")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605141850.qvidrpg9-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/seqlock.h:20,
from include/linux/mmzone.h:17,
from include/linux/gfp.h:7,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:18,
from drivers/char/nvram.c:34:
>> drivers/char/nvram.c:56:21: warning: 'nvram_mutex' defined but not used [-Wunused-variable]
static DEFINE_MUTEX(nvram_mutex);
^~~~~~~~~~~
include/linux/mutex.h:87:15: note: in definition of macro 'DEFINE_MUTEX'
struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
^~~~~~~~~
vim +/nvram_mutex +56 drivers/char/nvram.c
^1da177e4c3f4152 Linus Torvalds 2005-04-16 55
613655fa39ff6957 Arnd Bergmann 2010-06-02 @56 static DEFINE_MUTEX(nvram_mutex);
^1da177e4c3f4152 Linus Torvalds 2005-04-16 57 static DEFINE_SPINLOCK(nvram_state_lock);
^1da177e4c3f4152 Linus Torvalds 2005-04-16 58 static int nvram_open_cnt; /* #times opened */
^1da177e4c3f4152 Linus Torvalds 2005-04-16 59 static int nvram_open_mode; /* special open modes */
d5bbb5021ce8d9ff Finn Thain 2019-01-15 60 static ssize_t nvram_size;
^1da177e4c3f4152 Linus Torvalds 2005-04-16 61 #define NVRAM_WRITE 1 /* opened for writing (exclusive) */
^1da177e4c3f4152 Linus Torvalds 2005-04-16 62 #define NVRAM_EXCL 2 /* opened with O_EXCL */
^1da177e4c3f4152 Linus Torvalds 2005-04-16 63
:::::: The code at line 56 was first introduced by commit
:::::: 613655fa39ff6957754fa8ceb8559980920eb8ee drivers: autoconvert trivial BKL users to private mutex
:::::: TO: Arnd Bergmann <arnd@arndb.de>
:::::: CC: Arnd Bergmann <arnd@arndb.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: drivers/char/nvram.c:56:21: warning: 'nvram_mutex' defined but not used
2026-05-14 10:26 drivers/char/nvram.c:56:21: warning: 'nvram_mutex' defined but not used kernel test robot
@ 2026-05-15 7:05 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2026-05-15 7:05 UTC (permalink / raw)
To: kernel test robot; +Cc: Matthew Wilcox (Oracle), oe-kbuild-all, linux-kernel
On Thu, 14 May 2026 at 12:27, kernel test robot <lkp@intel.com> wrote:
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: e1914add2799225a87502051415fc5c32aeb02ae
> commit: 25500ba7e77ce9d3d9b5a1929d41a2ee2e23f6fe locking/mutex: Remove the list_head from struct mutex
> date: 10 weeks ago
> config: powerpc64-randconfig-002-20260514 (https://download.01.org/0day-ci/archive/20260514/202605141850.qvidrpg9-lkp@intel.com/config)
> compiler: powerpc64-linux-gcc (GCC) 8.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605141850.qvidrpg9-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
> | Fixes: 25500ba7e77c ("locking/mutex: Remove the list_head from struct mutex")
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202605141850.qvidrpg9-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> In file included from include/linux/seqlock.h:20,
> from include/linux/mmzone.h:17,
> from include/linux/gfp.h:7,
> from include/linux/umh.h:4,
> from include/linux/kmod.h:9,
> from include/linux/module.h:18,
> from drivers/char/nvram.c:34:
> >> drivers/char/nvram.c:56:21: warning: 'nvram_mutex' defined but not used [-Wunused-variable]
> static DEFINE_MUTEX(nvram_mutex);
> ^~~~~~~~~~~
> include/linux/mutex.h:87:15: note: in definition of macro 'DEFINE_MUTEX'
> struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
> ^~~~~~~~~
Posted fix is "[PATCH v5] char/nvram: Remove redundant nvram_mutex", see
https://lore.kernel.org/20260428061540.73668-1-venkat88@linux.ibm.com
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-15 7:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 10:26 drivers/char/nvram.c:56:21: warning: 'nvram_mutex' defined but not used kernel test robot
2026-05-15 7:05 ` Geert Uytterhoeven
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.