lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201709120805.5NJBjjVw%fengguang.wu@intel.com>
Date:   Tue, 12 Sep 2017 08:29:07 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Harsha Sharma <harshasharmaiitr@...il.com>
Cc:     kbuild-all@...org, gregkh@...uxfoundation.org,
        devel@...verdev.osuosl.org, outreachy-kernel@...glegroups.com,
        Harsha Sharma <harshasharmaiitr@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: unisys: visorbus: Declared char * array as
 static const

Hi Harsha,

[auto build test WARNING on v4.13]
[also build test WARNING on next-20170911]
[cannot apply to staging/staging-testing]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Harsha-Sharma/staging-unisys-visorbus-Declared-char-array-as-static-const/20170911-161501
config: x86_64-randconfig-it0-09120552 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/staging/unisys/visorbus/visorchipset.c: In function 'parahotplug_request_kickoff':
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: initializer element is not constant
      env_cmd, env_id, env_state, env_bus, env_dev, env_func, NULL
      ^
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: (near initialization for 'envp[0]')
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: initializer element is not constant
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: (near initialization for 'envp[1]')
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: initializer element is not constant
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: (near initialization for 'envp[2]')
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: initializer element is not constant
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: (near initialization for 'envp[3]')
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: initializer element is not constant
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: (near initialization for 'envp[4]')
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: initializer element is not constant
   drivers/staging/unisys/visorbus/visorchipset.c:1174:3: error: (near initialization for 'envp[5]')
>> drivers/staging/unisys/visorbus/visorchipset.c:1189:20: warning: passing argument 3 of 'kobject_uevent_env' from incompatible pointer type
          KOBJ_CHANGE, envp);
                       ^
   In file included from include/linux/device.h:17:0,
                    from include/linux/acpi.h:27,
                    from drivers/staging/unisys/visorbus/visorchipset.c:17:
   include/linux/kobject.h:218:5: note: expected 'char **' but argument is of type 'const char * const*'
    int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
        ^
   drivers/staging/unisys/visorbus/visorchipset.c: In function 'chipset_selftest_uevent':
   drivers/staging/unisys/visorbus/visorchipset.c:1275:2: error: initializer element is not constant
     static const char * const envp[] = { env_selftest, NULL };
     ^
   drivers/staging/unisys/visorbus/visorchipset.c:1275:2: error: (near initialization for 'envp[0]')
   drivers/staging/unisys/visorbus/visorchipset.c:1280:19: warning: passing argument 3 of 'kobject_uevent_env' from incompatible pointer type
         KOBJ_CHANGE, envp);
                      ^
   In file included from include/linux/device.h:17:0,
                    from include/linux/acpi.h:27,
                    from drivers/staging/unisys/visorbus/visorchipset.c:17:
   include/linux/kobject.h:218:5: note: expected 'char **' but argument is of type 'const char * const*'
    int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
        ^

vim +/kobject_uevent_env +1189 drivers/staging/unisys/visorbus/visorchipset.c

ebeff055 David Kershner    2016-09-19  1159  
04dbfea6 David Binder      2017-02-21  1160  /*
ebeff055 David Kershner    2016-09-19  1161   * parahotplug_request_kickoff() - initiate parahotplug request
ebeff055 David Kershner    2016-09-19  1162   * @req: the request to initiate
ebeff055 David Kershner    2016-09-19  1163   *
ebeff055 David Kershner    2016-09-19  1164   * Cause uevent to run the user level script to do the disable/enable specified
ebeff055 David Kershner    2016-09-19  1165   * in the parahotplug_request.
ebeff055 David Kershner    2016-09-19  1166   */
ae0fa822 David Kershner    2017-03-28  1167  static int
ebeff055 David Kershner    2016-09-19  1168  parahotplug_request_kickoff(struct parahotplug_request *req)
ebeff055 David Kershner    2016-09-19  1169  {
ebeff055 David Kershner    2016-09-19  1170  	struct controlvm_message_packet *cmd = &req->msg.cmd;
ebeff055 David Kershner    2016-09-19  1171  	char env_cmd[40], env_id[40], env_state[40], env_bus[40], env_dev[40],
ebeff055 David Kershner    2016-09-19  1172  	    env_func[40];
fdf58f16 Harsha Sharma     2017-09-09  1173  	static const char * const envp[] = {
ebeff055 David Kershner    2016-09-19 @1174  		env_cmd, env_id, env_state, env_bus, env_dev, env_func, NULL
ebeff055 David Kershner    2016-09-19  1175  	};
ebeff055 David Kershner    2016-09-19  1176  
c5a28902 Sameer Wadgaonkar 2017-05-19  1177  	sprintf(env_cmd, "VISOR_PARAHOTPLUG=1");
c5a28902 Sameer Wadgaonkar 2017-05-19  1178  	sprintf(env_id, "VISOR_PARAHOTPLUG_ID=%d", req->id);
c5a28902 Sameer Wadgaonkar 2017-05-19  1179  	sprintf(env_state, "VISOR_PARAHOTPLUG_STATE=%d",
ebeff055 David Kershner    2016-09-19  1180  		cmd->device_change_state.state.active);
c5a28902 Sameer Wadgaonkar 2017-05-19  1181  	sprintf(env_bus, "VISOR_PARAHOTPLUG_BUS=%d",
ebeff055 David Kershner    2016-09-19  1182  		cmd->device_change_state.bus_no);
c5a28902 Sameer Wadgaonkar 2017-05-19  1183  	sprintf(env_dev, "VISOR_PARAHOTPLUG_DEVICE=%d",
ebeff055 David Kershner    2016-09-19  1184  		cmd->device_change_state.dev_no >> 3);
c5a28902 Sameer Wadgaonkar 2017-05-19  1185  	sprintf(env_func, "VISOR_PARAHOTPLUG_FUNCTION=%d",
ebeff055 David Kershner    2016-09-19  1186  		cmd->device_change_state.dev_no & 0x7);
ebeff055 David Kershner    2016-09-19  1187  
ae0fa822 David Kershner    2017-03-28  1188  	return kobject_uevent_env(&chipset_dev->acpi_device->dev.kobj,
ae0fa822 David Kershner    2017-03-28 @1189  				  KOBJ_CHANGE, envp);
ebeff055 David Kershner    2016-09-19  1190  }
ebeff055 David Kershner    2016-09-19  1191  

:::::: The code at line 1189 was first introduced by commit
:::::: ae0fa822d7d455ba8974fb5fa1d437bfd1811a7a staging: unisys: visorbus: add error handling for parahotplug_request_kickoff

:::::: TO: David Kershner <david.kershner@...sys.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (24814 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ