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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6809a96e8e5b6_71fe2947b@dwillia2-xfh.jf.intel.com.notmuch>
Date: Wed, 23 Apr 2025 20:01:02 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: "David E. Box" <david.e.box@...ux.intel.com>, <corbet@....net>,
	<bhelgaas@...gle.com>, <kuurtb@...il.com>, <hdegoede@...hat.com>,
	<ilpo.jarvinen@...ux.intel.com>, <vkoul@...nel.org>,
	<yung-chuan.liao@...ux.intel.com>, <pierre-louis.bossart@...ux.dev>,
	<sanyog.r.kale@...el.com>, <gregkh@...uxfoundation.org>, <rafael@...nel.org>,
	<dakr@...nel.org>, <dan.j.williams@...el.com>,
	<andriy.shevchenko@...ux.intel.com>
CC: <linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-pci@...r.kernel.org>, <platform-driver-x86@...r.kernel.org>,
	<Dell.Client.Kernel@...l.com>, <linux-sound@...r.kernel.org>
Subject: Re: [PATCH 6/7] platform/x86/dell: alienware-wmi: update sysfs
 visibility macros

David E. Box wrote:
> Replace deprecated visibility macros and align group naming with new API.
> 
> In alienware-wmi-base.c, use NAMED_ATTRIBUTE_GROUP_COMBO_VISIBLE(rgb_zones)
> to define the rgb_zones attribute group concisely. To preserve the existing
> userspace ABI, rename zone_attr_visible and rgb_zones_attr_visible to
> zone_group_visible and rgb_zones_group_visible, respectively, to reflect the
> 'rgb_zones' group.
> 
> In alienware-wmi-wmax.c, replace DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE() with
> the renamed DEFINE_SYSFS_GROUP_VISIBILITY() macro for the hdmi, amplifier,
> and deepsleep attributes to match the updated API.
> 
> While here, add missing sysfs.h include and sort headers alphabetically. No
> functional changes are intended.
> 
> Signed-off-by: David E. Box <david.e.box@...ux.intel.com>
> ---
>  .../platform/x86/dell/alienware-wmi-base.c    | 23 ++++++++-----------
>  .../platform/x86/dell/alienware-wmi-wmax.c    |  7 +++---
>  2 files changed, 13 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/platform/x86/dell/alienware-wmi-base.c b/drivers/platform/x86/dell/alienware-wmi-base.c
> index 64562b92314f..ee41892e562c 100644
> --- a/drivers/platform/x86/dell/alienware-wmi-base.c
> +++ b/drivers/platform/x86/dell/alienware-wmi-base.c
> @@ -10,10 +10,11 @@
>  
>  #include <linux/acpi.h>
>  #include <linux/cleanup.h>
> -#include <linux/module.h>
> -#include <linux/platform_device.h>
>  #include <linux/dmi.h>
>  #include <linux/leds.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/sysfs.h>
>  #include "alienware-wmi.h"
>  
>  MODULE_AUTHOR("Mario Limonciello <mario.limonciello@...look.com>");
> @@ -326,8 +327,8 @@ static ssize_t lighting_control_state_store(struct device *dev,
>  
>  static DEVICE_ATTR_RW(lighting_control_state);
>  
> -static umode_t zone_attr_visible(struct kobject *kobj,
> -				 struct attribute *attr, int n)
> +static umode_t rgb_zones_attr_visible(struct kobject *kobj,
> +				      struct attribute *attr, int n)
>  {
>  	if (n < alienfx->num_zones + 1)
>  		return attr->mode;
> @@ -335,13 +336,12 @@ static umode_t zone_attr_visible(struct kobject *kobj,
>  	return 0;
>  }
>  
> -static bool zone_group_visible(struct kobject *kobj)
> +static bool rgb_zones_group_visible(struct kobject *kobj)
>  {
>  	return alienfx->num_zones > 0;
>  }
> -DEFINE_SYSFS_GROUP_VISIBLE(zone);
>  
> -static struct attribute *zone_attrs[] = {
> +static struct attribute *rgb_zones_attrs[] = {

Yes, this rename is necessary to fit the scheme.

Looks good,

Reviewed-by: Dan Williams <dan.j.williams@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ