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:   Fri, 15 Dec 2017 14:17:32 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Dmitry Osipenko <digetx@...il.com>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        David Airlie <airlied@...ux.ie>,
        Jonathan Hunter <jonathanh@...dia.com>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        "open list:TEGRA ARCHITECTURE SUPPORT" <linux-tegra@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/tegra: mark t186 display hub PM functions __maybe_unused

On Fri, Dec 15, 2017 at 2:10 PM, Dmitry Osipenko <digetx@...il.com> wrote:
> On 15.12.2017 15:51, Arnd Bergmann wrote:
>> --- a/drivers/gpu/drm/tegra/hub.c
>> +++ b/drivers/gpu/drm/tegra/hub.c
>> @@ -730,7 +730,7 @@ static int tegra_display_hub_remove(struct platform_device *pdev)
>>       return err;
>>  }
>>
>> -static int tegra_display_hub_suspend(struct device *dev)
>> +static int __maybe_unused tegra_display_hub_suspend(struct device *dev)
>>  {
>>       struct tegra_display_hub *hub = dev_get_drvdata(dev);
>>       int err;
>> @@ -746,7 +746,7 @@ static int tegra_display_hub_suspend(struct device *dev)
>>       return 0;
>>  }
>>
>> -static int tegra_display_hub_resume(struct device *dev)
>> +static int __maybe_unused tegra_display_hub_resume(struct device *dev)
>>  {
>>       struct tegra_display_hub *hub = dev_get_drvdata(dev);
>>       int err;
>>
>
> Probably would be better to put '#ifdef CONFIG_PM' around these functions for
> the consistency with the other drm/tegra files.

I usually use __maybe_unused because it is less error-prone, the
#ifdefs are often
wrong, either they are around the wrong functions or they use CONFIG_PM
CONFIG_PM_SLEEP interchangeably, which they are not. If you want to
add a patch with the correct #ifdef instead of my patch, that's fine with me
(add a Reported-by tag then), but I won't send a patch to do that myself.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ