From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54866A3D for ; Wed, 27 Jul 2022 06:47:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0B58C433C1; Wed, 27 Jul 2022 06:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658904447; bh=Ye6tflC75BpkHX+L25FGgdpFwQ6P3xBgEe3CuznRrKw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XMKxM3TDLsXAjpgBXJKsj+hEyHdO68rKYVO3TFU+CQ0IhPWi7ldU4oDiJCcvgGUON mLFCAZtpCBvWEwHUN4dSc12eDvpFRMYNKxniE7lwFY0KxGLaurjZESE/XFaufW3uFm ddLi7ISHQqgqdi/97er76m5qnbdcv42jWCSbocBk= Date: Wed, 27 Jul 2022 08:47:24 +0200 From: Greg Kroah-Hartman To: Philipp Hortmann Cc: Forest Bond , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] staging: vt6655: Convert macro vt6655_mac_clear_stck_ds to function Message-ID: References: <11d4aaf99e1d508c3019327937c7a160050847c1.1658333350.git.philipp.g.hortmann@gmail.com> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11d4aaf99e1d508c3019327937c7a160050847c1.1658333350.git.philipp.g.hortmann@gmail.com> On Wed, Jul 20, 2022 at 06:24:43PM +0200, Philipp Hortmann wrote: > Convert once used macro to static function. > Multiline macros are not liked by kernel community. > > Signed-off-by: Philipp Hortmann > --- > drivers/staging/vt6655/mac.c | 11 +++++++++++ > drivers/staging/vt6655/mac.h | 8 -------- > 2 files changed, 11 insertions(+), 8 deletions(-) > > diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c > index d7ee42df7062..3e9494c653dc 100644 > --- a/drivers/staging/vt6655/mac.c > +++ b/drivers/staging/vt6655/mac.c > @@ -38,6 +38,8 @@ > > #include "mac.h" > > +static void vt6655_mac_clear_stck_ds(void __iomem *iobase); > + > void vt6655_mac_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask) > { > unsigned char reg_value; > @@ -70,6 +72,15 @@ void vt6655_mac_word_reg_bits_off(void __iomem *iobase, const u8 reg_offset, con > iowrite16(reg_value & ~(bit_mask), iobase + reg_offset); > } > > +static void vt6655_mac_clear_stck_ds(void __iomem *iobase) > +{ > + unsigned char reg_value; > + > + reg_value = ioread8(iobase + MAC_REG_STICKHW); > + reg_value = reg_value & 0xFC; > + iowrite8(reg_value, iobase + MAC_REG_STICKHW); > +} > + Why not move this function up above, to before you call it, and then you do not need the function declaration in this file? thanks, greg k-h