public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: arch/x86/platform/olpc/olpc_dt.c:226:19: warning: variable 'len' set but not used
Date: Fri, 3 Jan 2025 00:02:58 +0800	[thread overview]
Message-ID: <202501022345.kLLyXfmM-lkp@intel.com> (raw)

Hi Lubomir,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   56e6a3499e14716b9a28a307bb6d18c10e95301e
commit: a7a9bacb9a32f9cebe5feda2e33064440f52d61d x86/platform/olpc: Use a correct version when making up a battery node
date:   6 years ago
config: i386-randconfig-002-20240720 (https://download.01.org/0day-ci/archive/20250102/202501022345.kLLyXfmM-lkp@intel.com/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/20250102/202501022345.kLLyXfmM-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/202501022345.kLLyXfmM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/x86/platform/olpc/olpc_dt.c:223:5: warning: no previous prototype for 'olpc_dt_compatible_match' [-Wmissing-prototypes]
     223 | int olpc_dt_compatible_match(phandle node, const char *compat)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/platform/olpc/olpc_dt.c: In function 'olpc_dt_compatible_match':
>> arch/x86/platform/olpc/olpc_dt.c:226:19: warning: variable 'len' set but not used [-Wunused-but-set-variable]
     226 |         int plen, len;
         |                   ^~~
   arch/x86/platform/olpc/olpc_dt.c: At top level:
   arch/x86/platform/olpc/olpc_dt.c:241:13: warning: no previous prototype for 'olpc_dt_fixup' [-Wmissing-prototypes]
     241 | void __init olpc_dt_fixup(void)
         |             ^~~~~~~~~~~~~


vim +/len +226 arch/x86/platform/olpc/olpc_dt.c

   222	
   223	int olpc_dt_compatible_match(phandle node, const char *compat)
   224	{
   225		char buf[64], *p;
 > 226		int plen, len;
   227	
   228		plen = olpc_dt_getproperty(node, "compatible", buf, sizeof(buf));
   229		if (plen <= 0)
   230			return 0;
   231	
   232		len = strlen(compat);
   233		for (p = buf; p < buf + plen; p += strlen(p) + 1) {
   234			if (strcmp(p, compat) == 0)
   235				return 1;
   236		}
   237	
   238		return 0;
   239	}
   240	

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

             reply	other threads:[~2025-01-02 16:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 16:02 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-25 14:17 arch/x86/platform/olpc/olpc_dt.c:226:19: warning: variable 'len' set but not used kernel test robot

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=202501022345.kLLyXfmM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sebastian.reichel@collabora.com \
    /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