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: <CAMuHMdUtg1qA7hx-QGGwd6nfe_vDEzoH95732T736FPH0Jb5dA@mail.gmail.com>
Date:   Tue, 7 Sep 2021 09:02:53 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Palmer Dabbelt <palmer@...belt.com>
Cc:     Sandy Huang <hjc@...k-chips.com>, Heiko Stuebner <heiko@...ech.de>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        DRI Development <dri-devel@...ts.freedesktop.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Android Kernel Team <kernel-team@...roid.com>,
        Palmer Dabbelt <palmerdabbelt@...gle.com>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH RESEND] drm/rockchip: cdn-dp-core: Fix cdn_dp_resume
 unused warning

On Mon, Sep 6, 2021 at 9:58 PM Palmer Dabbelt <palmer@...belt.com> wrote:
> From: Palmer Dabbelt <palmerdabbelt@...gle.com>
>
> cdn_dp_resume is only used under PM_SLEEP, and now that it's static an
> unused function warning is triggered undner !PM_SLEEP.  This
> conditionally enables the function to avoid the warning.
>
> Fixes: 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static")
> Signed-off-by: Palmer Dabbelt <palmerdabbelt@...gle.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>

> ---
> I sent this one out in January, but it looks like it got lost in the shuffle.
> I'm getting this on a RISC-V allmodconfig now.
> ---
>  drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> index 8ab3247dbc4a..bee0f2d2a9be 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -1123,6 +1123,7 @@ static int cdn_dp_suspend(struct device *dev)
>         return ret;
>  }
>
> +#ifdef CONFIG_PM_SLEEP
>  static int cdn_dp_resume(struct device *dev)

An alternative solution would be to tag the function with
__maybe_unused.

>  {
>         struct cdn_dp_device *dp = dev_get_drvdata(dev);
> @@ -1135,6 +1136,7 @@ static int cdn_dp_resume(struct device *dev)
>
>         return 0;
>  }
> +#endif
>
>  static int cdn_dp_probe(struct platform_device *pdev)
>  {

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ