Re: [PATCH 2/3] device property: Fix reading pset strings using array access functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sakari,

[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on v4.11-rc1]
[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/Sakari-Ailus/Fwnode-property-API-fixes-for-OF-pset/20170308-072028
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/base/property.c: In function '__fwnode_property_read_string_array':
>> drivers/base/property.c:564:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      prop = pset_prop_get(node, propname);
           ^

vim +/const +564 drivers/base/property.c

   548			return val ?
   549				of_property_read_string_array(to_of_node(fwnode),
   550							      propname, val, nval) :
   551				of_property_count_strings(to_of_node(fwnode), propname);
   552		else if (is_acpi_node(fwnode))
   553			return acpi_node_prop_read(fwnode, propname, DEV_PROP_STRING,
   554						   val, nval);
   555		else if (is_pset_node(fwnode)) {
   556			struct property_set *node = to_pset_node(fwnode);
   557			struct property_entry *prop;
   558	
   559			/* Read properties if val is non-NULL */
   560			if (val)
   561				return pset_prop_read_string_array(node, propname,
   562								   val, nval);
   563	
 > 564			prop = pset_prop_get(node, propname);
   565			if (!prop)
   566				return -EINVAL;
   567	
   568			/* The array length for a non-array string property is 1. */
   569			if (!prop->is_array)
   570				return 1;
   571	
   572			/* Return the length of an array. */

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux