All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery
@ 2021-04-03  6:20 Gwendal Grignou
  2021-04-03  7:33   ` kernel test robot
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Gwendal Grignou @ 2021-04-03  6:20 UTC (permalink / raw)
  To: bleung, enric.balletbo, groeck; +Cc: linux-kernel, Gwendal Grignou, stable

When cros_ec_sysfs probe is called before cros_ec_sensorhub probe
routine, the |kb_wake_angle| attribute will not be displayed, even if
there are two accelerometers in the chromebook.

Call sysfs_update_group() when accelerometers are enumerated if the
cros_ec sysfs attributes group has already been created.

Fixes: d60ac88a62df ("mfd / platform / iio: cros_ec: Register sensor through sensorhub")
Cc: stable@vger.kernel.org
Signed-off-by: Gwendal Grignou <gwendal@google.com>
---
 drivers/platform/chrome/cros_ec_sensorhub.c | 5 ++++-
 drivers/platform/chrome/cros_ec_sysfs.c     | 2 ++
 include/linux/platform_data/cros_ec_proto.h | 2 ++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_sensorhub.c b/drivers/platform/chrome/cros_ec_sensorhub.c
index 9c4af76a9956e..78085ad362ca8 100644
--- a/drivers/platform/chrome/cros_ec_sensorhub.c
+++ b/drivers/platform/chrome/cros_ec_sensorhub.c
@@ -106,8 +106,11 @@ static int cros_ec_sensorhub_register(struct device *dev,
 		sensor_type[sensorhub->resp->info.type]++;
 	}
 
-	if (sensor_type[MOTIONSENSE_TYPE_ACCEL] >= 2)
+	if (sensor_type[MOTIONSENSE_TYPE_ACCEL] >= 2) {
 		ec->has_kb_wake_angle = true;
+		if (ec->group)
+			sysfs_update_group(&ec->class_dev.kobj, ec->group);
+	}
 
 	if (cros_ec_check_features(ec,
 				   EC_FEATURE_REFINED_TABLET_MODE_HYSTERESIS)) {
diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c
index f07eabcf9494c..3838d5f51aadc 100644
--- a/drivers/platform/chrome/cros_ec_sysfs.c
+++ b/drivers/platform/chrome/cros_ec_sysfs.c
@@ -344,6 +344,8 @@ static int cros_ec_sysfs_probe(struct platform_device *pd)
 	ret = sysfs_create_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);
 	if (ret < 0)
 		dev_err(dev, "failed to create attributes. err=%d\n", ret);
+	else
+		ec_dev->group = &cros_ec_attr_group;
 
 	return ret;
 }
diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h
index 02599687770c5..4cd06f68bc536 100644
--- a/include/linux/platform_data/cros_ec_proto.h
+++ b/include/linux/platform_data/cros_ec_proto.h
@@ -191,6 +191,7 @@ struct cros_ec_platform {
 /**
  * struct cros_ec_dev - ChromeOS EC device entry point.
  * @class_dev: Device structure used in sysfs.
+ * @group: sysfs attributes group for this EC.
  * @ec_dev: cros_ec_device structure to talk to the physical device.
  * @dev: Pointer to the platform device.
  * @debug_info: cros_ec_debugfs structure for debugging information.
@@ -200,6 +201,7 @@ struct cros_ec_platform {
  */
 struct cros_ec_dev {
 	struct device class_dev;
+	struct attribute_group *group;
 	struct cros_ec_device *ec_dev;
 	struct device *dev;
 	struct cros_ec_debugfs *debug_info;
-- 
2.31.0.208.g409f899ff0-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery
  2021-04-03  6:20 [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery Gwendal Grignou
@ 2021-04-03  7:33   ` kernel test robot
  2021-04-03  7:47   ` kernel test robot
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-04-03  7:33 UTC (permalink / raw)
  To: Gwendal Grignou, bleung, enric.balletbo, groeck
  Cc: kbuild-all, linux-kernel, Gwendal Grignou, stable

[-- Attachment #1: Type: text/plain, Size: 2525 bytes --]

Hi Gwendal,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on chrome-platform-linux/for-next]
[also build test WARNING on linux/master linus/master v5.12-rc5 next-20210401]
[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]

url:    https://github.com/0day-ci/linux/commits/Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
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/0day-ci/linux/commit/f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
        git checkout f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/platform/chrome/cros_ec_sysfs.c: In function 'cros_ec_sysfs_probe':
>> drivers/platform/chrome/cros_ec_sysfs.c:348:17: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     348 |   ec_dev->group = &cros_ec_attr_group;
         |                 ^


vim +/const +348 drivers/platform/chrome/cros_ec_sysfs.c

   337	
   338	static int cros_ec_sysfs_probe(struct platform_device *pd)
   339	{
   340		struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
   341		struct device *dev = &pd->dev;
   342		int ret;
   343	
   344		ret = sysfs_create_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);
   345		if (ret < 0)
   346			dev_err(dev, "failed to create attributes. err=%d\n", ret);
   347		else
 > 348			ec_dev->group = &cros_ec_attr_group;
   349	
   350		return ret;
   351	}
   352	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 67276 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery
@ 2021-04-03  7:33   ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-04-03  7:33 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2584 bytes --]

Hi Gwendal,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on chrome-platform-linux/for-next]
[also build test WARNING on linux/master linus/master v5.12-rc5 next-20210401]
[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]

url:    https://github.com/0day-ci/linux/commits/Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
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/0day-ci/linux/commit/f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
        git checkout f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/platform/chrome/cros_ec_sysfs.c: In function 'cros_ec_sysfs_probe':
>> drivers/platform/chrome/cros_ec_sysfs.c:348:17: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     348 |   ec_dev->group = &cros_ec_attr_group;
         |                 ^


vim +/const +348 drivers/platform/chrome/cros_ec_sysfs.c

   337	
   338	static int cros_ec_sysfs_probe(struct platform_device *pd)
   339	{
   340		struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
   341		struct device *dev = &pd->dev;
   342		int ret;
   343	
   344		ret = sysfs_create_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);
   345		if (ret < 0)
   346			dev_err(dev, "failed to create attributes. err=%d\n", ret);
   347		else
 > 348			ec_dev->group = &cros_ec_attr_group;
   349	
   350		return ret;
   351	}
   352	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 67276 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery
  2021-04-03  6:20 [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery Gwendal Grignou
@ 2021-04-03  7:47   ` kernel test robot
  2021-04-03  7:47   ` kernel test robot
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-04-03  7:47 UTC (permalink / raw)
  To: Gwendal Grignou, bleung, enric.balletbo, groeck
  Cc: kbuild-all, linux-kernel, Gwendal Grignou, stable

[-- Attachment #1: Type: text/plain, Size: 2745 bytes --]

Hi Gwendal,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on chrome-platform-linux/for-next]
[also build test WARNING on linux/master linus/master v5.12-rc5 next-20210401]
[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]

url:    https://github.com/0day-ci/linux/commits/Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
config: riscv-randconfig-s032-20210403 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-279-g6d5d9b42-dirty
        # https://github.com/0day-ci/linux/commit/f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
        git checkout f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/platform/chrome/cros_ec_sysfs.c:348:31: sparse: sparse: incorrect type in assignment (different modifiers) @@     expected struct attribute_group *group @@     got struct attribute_group const * @@
   drivers/platform/chrome/cros_ec_sysfs.c:348:31: sparse:     expected struct attribute_group *group
   drivers/platform/chrome/cros_ec_sysfs.c:348:31: sparse:     got struct attribute_group const *

vim +348 drivers/platform/chrome/cros_ec_sysfs.c

   337	
   338	static int cros_ec_sysfs_probe(struct platform_device *pd)
   339	{
   340		struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
   341		struct device *dev = &pd->dev;
   342		int ret;
   343	
   344		ret = sysfs_create_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);
   345		if (ret < 0)
   346			dev_err(dev, "failed to create attributes. err=%d\n", ret);
   347		else
 > 348			ec_dev->group = &cros_ec_attr_group;
   349	
   350		return ret;
   351	}
   352	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32419 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery
@ 2021-04-03  7:47   ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-04-03  7:47 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2804 bytes --]

Hi Gwendal,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on chrome-platform-linux/for-next]
[also build test WARNING on linux/master linus/master v5.12-rc5 next-20210401]
[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]

url:    https://github.com/0day-ci/linux/commits/Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
config: riscv-randconfig-s032-20210403 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-279-g6d5d9b42-dirty
        # https://github.com/0day-ci/linux/commit/f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
        git checkout f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/platform/chrome/cros_ec_sysfs.c:348:31: sparse: sparse: incorrect type in assignment (different modifiers) @@     expected struct attribute_group *group @@     got struct attribute_group const * @@
   drivers/platform/chrome/cros_ec_sysfs.c:348:31: sparse:     expected struct attribute_group *group
   drivers/platform/chrome/cros_ec_sysfs.c:348:31: sparse:     got struct attribute_group const *

vim +348 drivers/platform/chrome/cros_ec_sysfs.c

   337	
   338	static int cros_ec_sysfs_probe(struct platform_device *pd)
   339	{
   340		struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
   341		struct device *dev = &pd->dev;
   342		int ret;
   343	
   344		ret = sysfs_create_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);
   345		if (ret < 0)
   346			dev_err(dev, "failed to create attributes. err=%d\n", ret);
   347		else
 > 348			ec_dev->group = &cros_ec_attr_group;
   349	
   350		return ret;
   351	}
   352	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32419 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery
  2021-04-03  6:20 [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery Gwendal Grignou
  2021-04-03  7:33   ` kernel test robot
  2021-04-03  7:47   ` kernel test robot
@ 2021-04-03  7:52 ` Greg KH
  2021-04-03  8:04   ` kernel test robot
  3 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2021-04-03  7:52 UTC (permalink / raw)
  To: Gwendal Grignou
  Cc: bleung, enric.balletbo, groeck, linux-kernel, Gwendal Grignou, stable

On Fri, Apr 02, 2021 at 11:20:31PM -0700, Gwendal Grignou wrote:
> When cros_ec_sysfs probe is called before cros_ec_sensorhub probe
> routine, the |kb_wake_angle| attribute will not be displayed, even if
> there are two accelerometers in the chromebook.
> 
> Call sysfs_update_group() when accelerometers are enumerated if the
> cros_ec sysfs attributes group has already been created.
> 
> Fixes: d60ac88a62df ("mfd / platform / iio: cros_ec: Register sensor through sensorhub")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gwendal Grignou <gwendal@google.com>
> ---
>  drivers/platform/chrome/cros_ec_sensorhub.c | 5 ++++-
>  drivers/platform/chrome/cros_ec_sysfs.c     | 2 ++
>  include/linux/platform_data/cros_ec_proto.h | 2 ++
>  3 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/chrome/cros_ec_sensorhub.c b/drivers/platform/chrome/cros_ec_sensorhub.c
> index 9c4af76a9956e..78085ad362ca8 100644
> --- a/drivers/platform/chrome/cros_ec_sensorhub.c
> +++ b/drivers/platform/chrome/cros_ec_sensorhub.c
> @@ -106,8 +106,11 @@ static int cros_ec_sensorhub_register(struct device *dev,
>  		sensor_type[sensorhub->resp->info.type]++;
>  	}
>  
> -	if (sensor_type[MOTIONSENSE_TYPE_ACCEL] >= 2)
> +	if (sensor_type[MOTIONSENSE_TYPE_ACCEL] >= 2) {
>  		ec->has_kb_wake_angle = true;
> +		if (ec->group)
> +			sysfs_update_group(&ec->class_dev.kobj, ec->group);
> +	}
>  
>  	if (cros_ec_check_features(ec,
>  				   EC_FEATURE_REFINED_TABLET_MODE_HYSTERESIS)) {
> diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c
> index f07eabcf9494c..3838d5f51aadc 100644
> --- a/drivers/platform/chrome/cros_ec_sysfs.c
> +++ b/drivers/platform/chrome/cros_ec_sysfs.c
> @@ -344,6 +344,8 @@ static int cros_ec_sysfs_probe(struct platform_device *pd)
>  	ret = sysfs_create_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);

This is odd, the platform/driver core should be creating these files,
you should never have to do this "by hand".  If you do it this way, you
are racing with userspace and loosing.

Please set the dev_groups field in the driver structure to be this group
and then all will be fine automatically.

>  	if (ret < 0)
>  		dev_err(dev, "failed to create attributes. err=%d\n", ret);
> +	else
> +		ec_dev->group = &cros_ec_attr_group;
>  
>  	return ret;
>  }
> diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h
> index 02599687770c5..4cd06f68bc536 100644
> --- a/include/linux/platform_data/cros_ec_proto.h
> +++ b/include/linux/platform_data/cros_ec_proto.h
> @@ -191,6 +191,7 @@ struct cros_ec_platform {
>  /**
>   * struct cros_ec_dev - ChromeOS EC device entry point.
>   * @class_dev: Device structure used in sysfs.
> + * @group: sysfs attributes group for this EC.
>   * @ec_dev: cros_ec_device structure to talk to the physical device.
>   * @dev: Pointer to the platform device.
>   * @debug_info: cros_ec_debugfs structure for debugging information.
> @@ -200,6 +201,7 @@ struct cros_ec_platform {
>   */
>  struct cros_ec_dev {
>  	struct device class_dev;
> +	struct attribute_group *group;

This should not be needed.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery
  2021-04-03  6:20 [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery Gwendal Grignou
@ 2021-04-03  8:04   ` kernel test robot
  2021-04-03  7:47   ` kernel test robot
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-04-03  8:04 UTC (permalink / raw)
  To: Gwendal Grignou, bleung, enric.balletbo, groeck
  Cc: kbuild-all, clang-built-linux, linux-kernel, Gwendal Grignou, stable

[-- Attachment #1: Type: text/plain, Size: 2735 bytes --]

Hi Gwendal,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on chrome-platform-linux/for-next]
[also build test ERROR on linux/master linus/master v5.12-rc5 next-20210401]
[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]

url:    https://github.com/0day-ci/linux/commits/Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
config: arm-randconfig-r015-20210403 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0fe8af94688aa03c01913c2001d6a1a911f42ce6)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
        git checkout f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/platform/chrome/cros_ec_sysfs.c:348:17: error: assigning to 'struct attribute_group *' from 'const struct attribute_group *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                   ec_dev->group = &cros_ec_attr_group;
                                 ^ ~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +348 drivers/platform/chrome/cros_ec_sysfs.c

   337	
   338	static int cros_ec_sysfs_probe(struct platform_device *pd)
   339	{
   340		struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
   341		struct device *dev = &pd->dev;
   342		int ret;
   343	
   344		ret = sysfs_create_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);
   345		if (ret < 0)
   346			dev_err(dev, "failed to create attributes. err=%d\n", ret);
   347		else
 > 348			ec_dev->group = &cros_ec_attr_group;
   349	
   350		return ret;
   351	}
   352	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26706 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery
@ 2021-04-03  8:04   ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-04-03  8:04 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2796 bytes --]

Hi Gwendal,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on chrome-platform-linux/for-next]
[also build test ERROR on linux/master linus/master v5.12-rc5 next-20210401]
[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]

url:    https://github.com/0day-ci/linux/commits/Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
config: arm-randconfig-r015-20210403 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0fe8af94688aa03c01913c2001d6a1a911f42ce6)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gwendal-Grignou/platform-chrome-Update-cros_ec-sysfs-attributes-on-sensors-discovery/20210403-142205
        git checkout f4bc64b0efbd2fb964478a0a2aab4ba2fc827447
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/platform/chrome/cros_ec_sysfs.c:348:17: error: assigning to 'struct attribute_group *' from 'const struct attribute_group *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                   ec_dev->group = &cros_ec_attr_group;
                                 ^ ~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +348 drivers/platform/chrome/cros_ec_sysfs.c

   337	
   338	static int cros_ec_sysfs_probe(struct platform_device *pd)
   339	{
   340		struct cros_ec_dev *ec_dev = dev_get_drvdata(pd->dev.parent);
   341		struct device *dev = &pd->dev;
   342		int ret;
   343	
   344		ret = sysfs_create_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group);
   345		if (ret < 0)
   346			dev_err(dev, "failed to create attributes. err=%d\n", ret);
   347		else
 > 348			ec_dev->group = &cros_ec_attr_group;
   349	
   350		return ret;
   351	}
   352	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26706 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-03  8:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-03  6:20 [PATCH] platform/chrome: Update cros_ec sysfs attributes on sensors discovery Gwendal Grignou
2021-04-03  7:33 ` kernel test robot
2021-04-03  7:33   ` kernel test robot
2021-04-03  7:47 ` kernel test robot
2021-04-03  7:47   ` kernel test robot
2021-04-03  7:52 ` Greg KH
2021-04-03  8:04 ` kernel test robot
2021-04-03  8:04   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.