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: <CACAvsv4-MUEuoq0cb3mQ2PK3u8jnD7U2yPHVM++57X6QZEDX2w@mail.gmail.com>
Date:   Wed, 13 Oct 2021 08:04:05 +1000
From:   Ben Skeggs <skeggsb@...il.com>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     Linux ACPI <linux-acpi@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ben Skeggs <bskeggs@...hat.com>,
        ML dri-devel <dri-devel@...ts.freedesktop.org>,
        ML nouveau <nouveau@...ts.freedesktop.org>
Subject: Re: [PATCH v1 2/7] nouveau: ACPI: Use the ACPI_COMPANION() macro directly

On Wed, 13 Oct 2021 at 03:58, Rafael J. Wysocki <rjw@...ysocki.net> wrote:
>
> From: Rafael J. Wysocki <rafael@...nel.org>
>
> The ACPI_HANDLE() macro is a wrapper arond the ACPI_COMPANION()
> macro and the ACPI handle produced by the former comes from the
> ACPI device object produced by the latter, so it is way more
> straightforward to evaluate the latter directly instead of passing
> the handle produced by the former to acpi_bus_get_device().
>
> Modify nouveau_acpi_edid() accordingly (no intentional functional
> impact).
>
> Signed-off-by: Rafael J. Wysocki <rafael@...nel.org>
Reviewed-by: Ben Skeggs <bskeggs@...hat.com>

> ---
>  drivers/gpu/drm/nouveau/nouveau_acpi.c |    9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> Index: linux-pm/drivers/gpu/drm/nouveau/nouveau_acpi.c
> ===================================================================
> --- linux-pm.orig/drivers/gpu/drm/nouveau/nouveau_acpi.c
> +++ linux-pm/drivers/gpu/drm/nouveau/nouveau_acpi.c
> @@ -364,7 +364,6 @@ void *
>  nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector)
>  {
>         struct acpi_device *acpidev;
> -       acpi_handle handle;
>         int type, ret;
>         void *edid;
>
> @@ -377,12 +376,8 @@ nouveau_acpi_edid(struct drm_device *dev
>                 return NULL;
>         }
>
> -       handle = ACPI_HANDLE(dev->dev);
> -       if (!handle)
> -               return NULL;
> -
> -       ret = acpi_bus_get_device(handle, &acpidev);
> -       if (ret)
> +       acpidev = ACPI_COMPANION(dev->dev);
> +       if (!acpidev)
>                 return NULL;
>
>         ret = acpi_video_get_edid(acpidev, type, -1, &edid);
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ