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]
Date:   Thu, 09 Aug 2018 13:08:47 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Hans de Goede <hdegoede@...hat.com>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Darren Hart <dvhart@...radead.org>,
        Wolfram Sang <wsa@...-dreams.de>
Cc:     Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        linux-acpi@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        linux-i2c@...r.kernel.org
Subject: Re: [PATCH v5 3/4] ACPI / x86-utils: Remove status workaround from
 acpi_device_always_present()

On Thu, 2018-08-09 at 11:15 +0200, Hans de Goede wrote:
> Now that we init the status field to ACPI_STA_DEFAULT rather then to
> 0,
> the workaround for acpi_match_device_ids() always returning -ENOENT
> when
> status is 0 is no longer needed.
> 

Always good to have only "minus" statistics

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> Signed-off-by: Hans de Goede <hdegoede@...hat.com>
> ---
> Changes in v3:
> -New patch in v3 of this patch-set
> ---
>  drivers/acpi/x86/utils.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
> index ec5b0f190231..a4fb97d64b3b 100644
> --- a/drivers/acpi/x86/utils.c
> +++ b/drivers/acpi/x86/utils.c
> @@ -103,13 +103,9 @@ static const struct always_present_id
> always_present_ids[] = {
>  
>  bool acpi_device_always_present(struct acpi_device *adev)
>  {
> -	u32 *status = (u32 *)&adev->status;
> -	u32 old_status = *status;
>  	bool ret = false;
>  	unsigned int i;
>  
> -	/* acpi_match_device_ids checks status, so set it to default */
> -	*status = ACPI_STA_DEFAULT;
>  	for (i = 0; i < ARRAY_SIZE(always_present_ids); i++) {
>  		if (acpi_match_device_ids(adev,
> always_present_ids[i].hid))
>  			continue;
> @@ -125,15 +121,9 @@ bool acpi_device_always_present(struct
> acpi_device *adev)
>  		    !dmi_check_system(always_present_ids[i].dmi_ids))
>  			continue;
>  
> -		if (old_status != ACPI_STA_DEFAULT) /* Log only once */
> -			dev_info(&adev->dev,
> -				 "Device [%s] is in always present
> list\n",
> -				 adev->pnp.bus_id);
> -
>  		ret = true;
>  		break;
>  	}
> -	*status = old_status;
>  
>  	return ret;
>  }

-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ