From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750879AbbABIRO (ORCPT ); Fri, 2 Jan 2015 03:17:14 -0500 Received: from cantor2.suse.de ([195.135.220.15]:44786 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbbABIRN (ORCPT ); Fri, 2 Jan 2015 03:17:13 -0500 Date: Fri, 02 Jan 2015 09:17:12 +0100 Message-ID: From: Takashi Iwai To: Rickard Strandqvist Cc: Jaroslav Kysela , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sound: drivers: portman2x4.c: Remove some unused functions In-Reply-To: <1420125165-26527-1-git-send-email-rickard_strandqvist@spectrumdigital.se> References: <1420125165-26527-1-git-send-email-rickard_strandqvist@spectrumdigital.se> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 1 Jan 2015 16:12:45 +0100, Rickard Strandqvist wrote: > > Removes some functions that are not used anywhere: > portman_read_data() portman_read_command() > > This was partially found by using a static code analysis program called cppcheck. > > Signed-off-by: Rickard Strandqvist > --- > sound/drivers/portman2x4.c | 10 ---------- > 1 file changed, 10 deletions(-) > > diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c > index 78ccfa4..b5b6b4e 100644 > --- a/sound/drivers/portman2x4.c > +++ b/sound/drivers/portman2x4.c > @@ -198,21 +198,11 @@ static inline void portman_write_command(struct portman *pm, u8 value) > parport_write_control(pm->pardev->port, value); > } > > -static inline u8 portman_read_command(struct portman *pm) > -{ > - return parport_read_control(pm->pardev->port); > -} > - > static inline u8 portman_read_status(struct portman *pm) > { > return parport_read_status(pm->pardev->port); > } > > -static inline u8 portman_read_data(struct portman *pm) > -{ > - return parport_read_data(pm->pardev->port); > -} > - > static inline void portman_write_data(struct portman *pm, u8 value) > { > parport_write_data(pm->pardev->port, value); Rickard, your works are highly appreciated, but please think twice before submitting patches: is it worth for the whole? For example, in this case: the removals are static inline functions. So there is no gain by removing this regarding the object size. OTOH, they are obviously wrapper accessors, thus dropping blindly would result in inconsistency. That is, a reader may wonder later why some are write only and some not. thanks, Takashi