From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969244AbdEYN1G (ORCPT ); Thu, 25 May 2017 09:27:06 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:34272 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965907AbdEYN1D (ORCPT ); Thu, 25 May 2017 09:27:03 -0400 Date: Thu, 25 May 2017 14:26:34 +0100 From: Alan Cox To: Doug Anderson Cc: Matthias Kaehlcke , Zha Qipeng , Darren Hart , Andy Shevchenko , "linux-kernel@vger.kernel.org" , platform-driver-x86@vger.kernel.org Subject: Re: [PATCH] platform/x86: intel_pmc_ipc: Delete unused function ipc_data_readb() Message-ID: <20170525142634.5eb899d6@alans-desktop> In-Reply-To: References: <20170523205539.71450-1-mka@chromium.org> <20170524143932.11593845@alans-desktop> Organization: Intel Corporation X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 May 2017 08:39:29 -0700 Doug Anderson wrote: > Hi, > > On Wed, May 24, 2017 at 6:39 AM, Alan Cox wrote: > > On Tue, 23 May 2017 13:55:39 -0700 > > Matthias Kaehlcke 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 > . Would that work for > you? > Yep Alan