mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Maxwell Doose <m32285159@gmail.com>, linux@dominikbrodowski.net
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Maxwell Doose <m32285159@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pcmcia: cs: Replace manual mutex locking with guard(mutex)
Date: Wed, 3 Jun 2026 19:44:45 +0200	[thread overview]
Message-ID: <202606031924.nEoqNaNq-lkp@intel.com> (raw)
In-Reply-To: <20260603062714.45848-1-m32285159@gmail.com>

Hi Maxwell,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v7.1-rc6 next-20260602]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Maxwell-Doose/pcmcia-cs-Replace-manual-mutex-locking-with-guard-mutex/20260603-144020
base:   linus/master
patch link:    https://lore.kernel.org/r/20260603062714.45848-1-m32285159%40gmail.com
patch subject: [PATCH] pcmcia: cs: Replace manual mutex locking with guard(mutex)
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260603/202606031924.nEoqNaNq-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project f43d6834093b19baf79beda8c0337ab020ac5f17)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260603/202606031924.nEoqNaNq-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/202606031924.nEoqNaNq-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/pcmcia/cs.c:592:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     592 |         if (sysfs_events) {
         |             ^~~~~~~~~~~~
   drivers/pcmcia/cs.c:621:9: note: uninitialized use occurs here
     621 |         return ret;
         |                ^~~
   drivers/pcmcia/cs.c:592:2: note: remove the 'if' if its condition is always true
     592 |         if (sysfs_events) {
         |         ^~~~~~~~~~~~~~~~~
   drivers/pcmcia/cs.c:585:9: note: initialize the variable 'ret' to silence this warning
     585 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +592 drivers/pcmcia/cs.c

   581	
   582	static int pccardd_helper(struct pcmcia_socket *skt, unsigned int events,
   583				  unsigned int sysfs_events)
   584	{
   585		int ret;
   586	
   587		guard(mutex)(&skt->skt_mutex);
   588	
   589		if (events & SS_DETECT)
   590			socket_detect_change(skt);
   591	
 > 592		if (sysfs_events) {
   593			if (sysfs_events & PCMCIA_UEVENT_EJECT)
   594				socket_remove(skt);
   595			if (sysfs_events & PCMCIA_UEVENT_INSERT)
   596				socket_insert(skt);
   597			if ((sysfs_events & PCMCIA_UEVENT_SUSPEND) &&
   598			    !(skt->state & SOCKET_CARDBUS)) {
   599				if (skt->callback)
   600					ret = skt->callback->suspend(skt);
   601				else
   602					ret = 0;
   603				if (!ret) {
   604					socket_suspend(skt);
   605					msleep(100);
   606				}
   607			}
   608			if ((sysfs_events & PCMCIA_UEVENT_RESUME) &&
   609			    !(skt->state & SOCKET_CARDBUS)) {
   610				ret = socket_resume(skt);
   611				if (!ret && skt->callback)
   612					skt->callback->resume(skt);
   613			}
   614			if ((sysfs_events & PCMCIA_UEVENT_REQUERY) &&
   615			    !(skt->state & SOCKET_CARDBUS)) {
   616				if (!ret && skt->callback)
   617					skt->callback->requery(skt);
   618			}
   619		}
   620	
   621		return ret;
   622	}
   623	

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

  reply	other threads:[~2026-06-03 17:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03  6:27 Maxwell Doose
2026-06-03 17:44 ` kernel test robot [this message]
2026-06-04  6:05 ` Dominik Brodowski
2026-06-04 13:26   ` Maxwell Doose
2026-06-04 13:40     ` Dominik Brodowski
2026-06-04 14:21       ` Maxwell Doose

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=202606031924.nEoqNaNq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=llvm@lists.linux.dev \
    --cc=m32285159@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®