[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170525142634.5eb899d6@alans-desktop>
Date: Thu, 25 May 2017 14:26:34 +0100
From: Alan Cox <gnomes@...rguk.ukuu.org.uk>
To: Doug Anderson <dianders@...omium.org>
Cc: Matthias Kaehlcke <mka@...omium.org>,
Zha Qipeng <qipeng.zha@...el.com>,
Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH] platform/x86: intel_pmc_ipc: Delete unused function
ipc_data_readb()
On Wed, 24 May 2017 08:39:29 -0700
Doug Anderson <dianders@...omium.org> wrote:
> Hi,
>
> On Wed, May 24, 2017 at 6:39 AM, Alan Cox <gnomes@...rguk.ukuu.org.uk> wrote:
> > On Tue, 23 May 2017 13:55:39 -0700
> > Matthias Kaehlcke <mka@...omium.org> wrote:
> >
> >> The function was added by commit 0a8b83530b6f ("intel_pmc_ipc: Add Intel
> >> Apollo Lake PMC IPC driver") in 2015 and hasn't been used since then.
> >> Removing it fixes the following warning when building with clang:
> >>
> >> drivers/platform/x86/intel_pmc_ipc.c:189:18: error: unused function
> >> 'ipc_data_readb' [-Werror,-Wunused-function]
> >
> > It is however also part of the API and a consistent sensible function to
> > have present should it be needed. As it's static it's eliminated
> > correctly by gcc.
> >
> > I'm all for eliminating unused functions but in this case I have to wonder
>
> If it's a useful function to have present, it seems like adding
> "__maybe_unused" makes sense, as Matthias did in
> <https://patchwork.kernel.org/patch/9732009/>. Would that work for
> you?
>
Yep
Alan
Powered by blists - more mailing lists