public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jorge Lopez <jorgealtxwork@gmail.com>,
	hdegoede@redhat.com, platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, thomas@t-8ch.de
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v10 13/14] HP BIOSCFG driver  - Makefile
Date: Thu, 20 Apr 2023 09:44:09 +0800	[thread overview]
Message-ID: <202304200914.VfJcRutc-lkp@intel.com> (raw)
In-Reply-To: <20230419151321.6167-14-jorge.lopez2@hp.com>

Hi Jorge,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.3-rc7 next-20230419]
[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/Jorge-Lopez/HP-BIOSCFG-driver-Documentation/20230419-231828
patch link:    https://lore.kernel.org/r/20230419151321.6167-14-jorge.lopez2%40hp.com
patch subject: [PATCH v10 13/14] HP BIOSCFG driver  - Makefile
config: i386-randconfig-a015-20230417 (https://download.01.org/0day-ci/archive/20230420/202304200914.VfJcRutc-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/cfbebfbd4ed15793fab894715bfd74387adcf4f1
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jorge-Lopez/HP-BIOSCFG-driver-Documentation/20230419-231828
        git checkout cfbebfbd4ed15793fab894715bfd74387adcf4f1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/hp/hp-bioscfg/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304200914.VfJcRutc-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c:141:2: warning: variable 'id' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (!buf_cp) {
           ^~~~~~~~~~~~
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c:169:18: note: uninitialized use occurs here
           clear_passwords(id);
                           ^~
   drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c:141:2: note: remove the 'if' if its condition is always false
           if (!buf_cp) {
           ^~~~~~~~~~~~~~
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c:138:8: note: initialize the variable 'id' to silence this warning
           int id, ret = -EIO;
                 ^
                  = 0
   1 warning generated.
--
>> drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:76:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (!start)
           ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:87:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:76:2: note: remove the 'if' if its condition is always false
           if (!start)
           ^~~~~~~~~~~
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:72:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (!start)
           ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:87:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:72:2: note: remove the 'if' if its condition is always false
           if (!start)
           ^~~~~~~~~~~
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:43:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (instance < 0)
           ^~~~~~~~~~~~~~~~~
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:87:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:43:2: note: remove the 'if' if its condition is always false
           if (instance < 0)
           ^~~~~~~~~~~~~~~~~
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c:30:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   3 warnings generated.


vim +141 drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c

1780f5eca27fb8 Jorge Lopez 2023-04-19  132  
1780f5eca27fb8 Jorge Lopez 2023-04-19  133  static ssize_t new_password_store(struct kobject *kobj,
1780f5eca27fb8 Jorge Lopez 2023-04-19  134  				  struct kobj_attribute *attr,
1780f5eca27fb8 Jorge Lopez 2023-04-19  135  				  const char *buf, size_t count)
1780f5eca27fb8 Jorge Lopez 2023-04-19  136  {
1780f5eca27fb8 Jorge Lopez 2023-04-19  137  	char *p, *buf_cp = NULL;
1780f5eca27fb8 Jorge Lopez 2023-04-19  138  	int id, ret = -EIO;
1780f5eca27fb8 Jorge Lopez 2023-04-19  139  
1780f5eca27fb8 Jorge Lopez 2023-04-19  140  	buf_cp = kstrdup(buf, GFP_KERNEL);
1780f5eca27fb8 Jorge Lopez 2023-04-19 @141  	if (!buf_cp) {
1780f5eca27fb8 Jorge Lopez 2023-04-19  142  		ret = -ENOMEM;
1780f5eca27fb8 Jorge Lopez 2023-04-19  143  		goto exit_password;
1780f5eca27fb8 Jorge Lopez 2023-04-19  144  	}
1780f5eca27fb8 Jorge Lopez 2023-04-19  145  
1780f5eca27fb8 Jorge Lopez 2023-04-19  146  	p = memchr(buf_cp, '\n', count);
1780f5eca27fb8 Jorge Lopez 2023-04-19  147  
1780f5eca27fb8 Jorge Lopez 2023-04-19  148  	if (p != NULL)
1780f5eca27fb8 Jorge Lopez 2023-04-19  149  		*p = '\0';
1780f5eca27fb8 Jorge Lopez 2023-04-19  150  
1780f5eca27fb8 Jorge Lopez 2023-04-19  151  	id = get_password_instance_id(kobj);
1780f5eca27fb8 Jorge Lopez 2023-04-19  152  
1780f5eca27fb8 Jorge Lopez 2023-04-19  153  	if (id >= 0)
1780f5eca27fb8 Jorge Lopez 2023-04-19  154  		ret = validate_password_input(id, buf_cp);
1780f5eca27fb8 Jorge Lopez 2023-04-19  155  
1780f5eca27fb8 Jorge Lopez 2023-04-19  156  	if (!ret)
1780f5eca27fb8 Jorge Lopez 2023-04-19  157  		strscpy(bioscfg_drv.password_data[id].new_password,
1780f5eca27fb8 Jorge Lopez 2023-04-19  158  			buf_cp,
1780f5eca27fb8 Jorge Lopez 2023-04-19  159  			sizeof(bioscfg_drv.password_data[id].new_password));
1780f5eca27fb8 Jorge Lopez 2023-04-19  160  
1780f5eca27fb8 Jorge Lopez 2023-04-19  161  	if (!ret)
1780f5eca27fb8 Jorge Lopez 2023-04-19  162  		ret = hp_set_attribute(kobj->name, buf_cp);
1780f5eca27fb8 Jorge Lopez 2023-04-19  163  
1780f5eca27fb8 Jorge Lopez 2023-04-19  164  exit_password:
1780f5eca27fb8 Jorge Lopez 2023-04-19  165  	/*
1780f5eca27fb8 Jorge Lopez 2023-04-19  166  	 * Regardless of the results both new and current passwords
1780f5eca27fb8 Jorge Lopez 2023-04-19  167  	 * will be set to zero and avoid security issues
1780f5eca27fb8 Jorge Lopez 2023-04-19  168  	 */
1780f5eca27fb8 Jorge Lopez 2023-04-19  169  	clear_passwords(id);
1780f5eca27fb8 Jorge Lopez 2023-04-19  170  
1780f5eca27fb8 Jorge Lopez 2023-04-19  171  	kfree(buf_cp);
1780f5eca27fb8 Jorge Lopez 2023-04-19  172  	return ret ? ret : count;
1780f5eca27fb8 Jorge Lopez 2023-04-19  173  }
1780f5eca27fb8 Jorge Lopez 2023-04-19  174  

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

  reply	other threads:[~2023-04-20  1:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 15:13 [PATCH v10 00/14] HP BIOSCFG driver Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 01/14] HP BIOSCFG driver - Documentation Jorge Lopez
2023-04-21 11:36   ` Pavel Machek
2023-04-19 15:13 ` [PATCH v10 02/14] HP BIOSCFG driver - biosattr-interface Jorge Lopez
2023-04-21 11:37   ` Pavel Machek
2023-04-25 10:30     ` Hans de Goede
2023-04-25 13:43       ` Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 03/14] HP BIOSCFG driver - bioscfg Jorge Lopez
2023-04-19 18:04   ` Armin Wolf
2023-04-19 20:59     ` Limonciello, Mario
2023-04-25 10:34     ` Hans de Goede
2023-04-25 14:32       ` Jorge Lopez
2023-04-25 14:59         ` Hans de Goede
2023-04-25 18:47           ` Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 04/14] HP BIOSCFG driver - int-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 05/14] HP BIOSCFG driver - ordered-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 06/14] HP BIOSCFG driver - passwdobj-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 07/14] HP BIOSCFG driver - string-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 08/14] HP BIOSCFG driver - bioscfg-h Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 09/14] HP BIOSCFG driver - enum-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 10/14] HP BIOSCFG driver - passwdattr-interface Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 11/14] HP BIOSCFG driver - spmobj-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 12/14] HP BIOSCFG driver - surestart-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 13/14] HP BIOSCFG driver - Makefile Jorge Lopez
2023-04-20  1:44   ` kernel test robot [this message]
2023-04-20 13:33     ` Jorge Lopez
2023-04-20  3:57   ` kernel test robot
2023-04-20 13:28     ` Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 14/14] HP BIOSCFG driver - MAINTAINERS Jorge Lopez

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=202304200914.VfJcRutc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=jorgealtxwork@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=thomas@t-8ch.de \
    /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