Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1649720
| From | Doug Anderson <dianders@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] platform/x86: intel_pmc_ipc: Delete unused function ipc_data_readb() |
| Date | 2017-05-24 17:50 +0200 |
| Message-ID | <tKGHU-49Y-17@gated-at.bofh.it> (permalink) |
| References | <tKp4o-7w-55@gated-at.bofh.it> <tKEPN-2YG-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
On Wed, May 24, 2017 at 6:39 AM, Alan Cox <gnomes@lxorguk.ukuu.org.uk> wrote:
> On Tue, 23 May 2017 13:55:39 -0700
> Matthias Kaehlcke <mka@chromium.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?
-Doug
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] platform/x86: intel_pmc_ipc: Delete unused function ipc_data_readb() Matthias Kaehlcke <mka@chromium.org> - 2017-05-23 23:00 +0200
Re: [PATCH] platform/x86: intel_pmc_ipc: Delete unused function ipc_data_readb() Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-24 15:50 +0200
Re: [PATCH] platform/x86: intel_pmc_ipc: Delete unused function ipc_data_readb() Doug Anderson <dianders@chromium.org> - 2017-05-24 17:50 +0200
Re: [PATCH] platform/x86: intel_pmc_ipc: Delete unused function ipc_data_readb() Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-25 15:30 +0200
csiph-web