[PATCH] platform/x86: alienware-wmi: Fix zone attribute declaration

Kurt Borja posted 1 patch 11 months ago
drivers/platform/x86/dell/alienware-wmi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[PATCH] platform/x86: alienware-wmi: Fix zone attribute declaration
Posted by Kurt Borja 11 months ago
Statically declare `zone*` attributes.

Fixes: 7c605f6460e8 ("platform/x86: alienware-wmi: Improve rgb-zones group creation")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501142200.ezULWY9P-lkp@intel.com/
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
 drivers/platform/x86/dell/alienware-wmi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c
index b4b43f3e3fd9..d7f577e0d146 100644
--- a/drivers/platform/x86/dell/alienware-wmi.c
+++ b/drivers/platform/x86/dell/alienware-wmi.c
@@ -518,7 +518,7 @@ static ssize_t zone00_store(struct device *dev, struct device_attribute *attr,
 	return zone_store(dev, attr, buf, count, 0);
 }
 
-DEVICE_ATTR_RW(zone00);
+static DEVICE_ATTR_RW(zone00);
 
 static ssize_t zone01_show(struct device *dev, struct device_attribute *attr,
 			   char *buf)
@@ -532,7 +532,7 @@ static ssize_t zone01_store(struct device *dev, struct device_attribute *attr,
 	return zone_store(dev, attr, buf, count, 1);
 }
 
-DEVICE_ATTR_RW(zone01);
+static DEVICE_ATTR_RW(zone01);
 
 static ssize_t zone02_show(struct device *dev, struct device_attribute *attr,
 			   char *buf)
@@ -546,7 +546,7 @@ static ssize_t zone02_store(struct device *dev, struct device_attribute *attr,
 	return zone_store(dev, attr, buf, count, 2);
 }
 
-DEVICE_ATTR_RW(zone02);
+static DEVICE_ATTR_RW(zone02);
 
 static ssize_t zone03_show(struct device *dev, struct device_attribute *attr,
 			   char *buf)
@@ -560,7 +560,7 @@ static ssize_t zone03_store(struct device *dev, struct device_attribute *attr,
 	return zone_store(dev, attr, buf, count, 3);
 }
 
-DEVICE_ATTR_RW(zone03);
+static DEVICE_ATTR_RW(zone03);
 
 /*
  * Lighting control state device attribute (Global)

base-commit: 58126788aa7726c0e91de6b25e6e332fa06089ab
-- 
2.48.0
Re: [PATCH] platform/x86: alienware-wmi: Fix zone attribute declaration
Posted by Ilpo Järvinen 11 months ago
On Tue, 14 Jan 2025, Kurt Borja wrote:

> Statically declare `zone*` attributes.
> 
> Fixes: 7c605f6460e8 ("platform/x86: alienware-wmi: Improve rgb-zones group creation")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202501142200.ezULWY9P-lkp@intel.com/
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>
> ---
>  drivers/platform/x86/dell/alienware-wmi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c
> index b4b43f3e3fd9..d7f577e0d146 100644
> --- a/drivers/platform/x86/dell/alienware-wmi.c
> +++ b/drivers/platform/x86/dell/alienware-wmi.c
> @@ -518,7 +518,7 @@ static ssize_t zone00_store(struct device *dev, struct device_attribute *attr,
>  	return zone_store(dev, attr, buf, count, 0);
>  }
>  
> -DEVICE_ATTR_RW(zone00);
> +static DEVICE_ATTR_RW(zone00);
>  
>  static ssize_t zone01_show(struct device *dev, struct device_attribute *attr,
>  			   char *buf)
> @@ -532,7 +532,7 @@ static ssize_t zone01_store(struct device *dev, struct device_attribute *attr,
>  	return zone_store(dev, attr, buf, count, 1);
>  }
>  
> -DEVICE_ATTR_RW(zone01);
> +static DEVICE_ATTR_RW(zone01);
>  
>  static ssize_t zone02_show(struct device *dev, struct device_attribute *attr,
>  			   char *buf)
> @@ -546,7 +546,7 @@ static ssize_t zone02_store(struct device *dev, struct device_attribute *attr,
>  	return zone_store(dev, attr, buf, count, 2);
>  }
>  
> -DEVICE_ATTR_RW(zone02);
> +static DEVICE_ATTR_RW(zone02);
>  
>  static ssize_t zone03_show(struct device *dev, struct device_attribute *attr,
>  			   char *buf)
> @@ -560,7 +560,7 @@ static ssize_t zone03_store(struct device *dev, struct device_attribute *attr,
>  	return zone_store(dev, attr, buf, count, 3);
>  }
>  
> -DEVICE_ATTR_RW(zone03);
> +static DEVICE_ATTR_RW(zone03);
>  
>  /*
>   * Lighting control state device attribute (Global)
> 
> base-commit: 58126788aa7726c0e91de6b25e6e332fa06089ab
> 

Thanks. I've folded this into the original commit in the review-ilpo-next 
branch.

-- 
 i.