Message ID | efaf637a14b6f7fdd0178e2aecf8abf17e6922f6.1666299151.git.drv@mailo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp333212wrr; Thu, 20 Oct 2022 14:34:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4p2aB7qT8iWglurewl/o2nxdBXEsKJIBpWms5Bl+HQcwXcpkEKTK6CrKTkYx9DB4/6SD0Y X-Received: by 2002:a65:4508:0:b0:43c:e3c6:d1c2 with SMTP id n8-20020a654508000000b0043ce3c6d1c2mr13291328pgq.582.1666301664634; Thu, 20 Oct 2022 14:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666301664; cv=none; d=google.com; s=arc-20160816; b=gu0JlNmcQ3Pb0Ii8z/XG7t+rB5XF+JofiCsQe5wtuRG+xhHZYCVgsxeq+9Q8LWU/5t lELBjUnX6KlRSPeUhCXSWJ+z9qpb0SNXxf0L8D4qPf4DodwiWDU9w8JB8RTFJ9Ep4ycQ ua8GTlyqeIaZHkgd89LFOrjztLD7rDHjhJvEyi+Ceetp5Z/zWtqi0KQ/iw6jj7stEfn8 +g3Qwf2smnzza7/Eo/HR2tTnsjoE+fG48l21gouJycSSUT5DITRhw8xq2WSMVPY3c2CU VcBKH4wrAhKyNB6iV/Dguw+apL8dwfrvnbyoACzh4V69/zauM+b7jPqt1Ydzs6EzoXIh ntoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=eGqcfweopnq9l7uley4QH3e+FjPRTSfixViqU2JVPes=; b=BHLrgseJTU3vr+2QRcibUs1kkMHtgM9AaUnO/wlx1W/guv/RCWOPmmTvQcLkVP46Lb 4XjaP6WpVLdQaex3vq7kYhZykxfqj2t+NrBCOQvdaaqPvmyoB+v8OqODOBhd7QQsiyTV PH4MpqCRhRBnIgBUMj5AlYyvjT67tOK69ArU7O/LTu/dyBo5hlWbmM/9oSbP8CjGcd7U U5XXOtT67/BzrCVWdzHEJuzl0SBzAvwnMKNfUb57RZrdHvHZjcpqmVzfDwNq+Kb8WLgt 9MwvCJym6pI7HZADS/taY+lI2oj4JPA0Yih/Psk5LJpnTup8XBpb6z/aruDBawFTn7nd HRGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=kxU2ys+g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a170902eccb00b00176db576dc0si27833231plh.147.2022.10.20.14.34.11; Thu, 20 Oct 2022 14:34:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=kxU2ys+g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbiJTVcz (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Thu, 20 Oct 2022 17:32:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbiJTVcw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Oct 2022 17:32:52 -0400 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 218052248DA for <linux-kernel@vger.kernel.org>; Thu, 20 Oct 2022 14:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1666301560; bh=iR8iS0E42jvZihmNWcy5ZgDuA+WaFkQWN7g/UwsI0sI=; h=X-EA-Auth:Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=kxU2ys+gQ6R0R+50QSAynn18+mTFsPmtGVcoBHOLXlbby41oePD5vWzFTFwdMduis dpX5xVacYtPWv2QqApIMUUJ2SlbOyFu78i+5XsdxGCDIPZ2kwOv+pFPRkIJ01iBwv0 wvSBU23d7CaK+kLS63xDjo/GbwO1qN0sE459qxsg= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via [213.182.55.206] Thu, 20 Oct 2022 23:32:40 +0200 (CEST) X-EA-Auth: Dt4nhsBn5czK+gafsjybVL/VmW4oP0/+6jSeb68vEDo5kKu6wTGxOpNR8JLuAwSkwgL2u+Jn9qipdtcbqtU4/ntrFLJMURnW Date: Fri, 21 Oct 2022 03:02:35 +0530 From: Deepak R Varma <drv@mailo.com> To: outreachy@lists.linux.dev, Larry.Finger@lwfinger.net, phil@philpotter.co.uk, paskripkin@gmail.com, gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, kumarpraveen@linux.microsoft.com, saurabh.truth@gmail.com Subject: [PATCH v4 11/11] staging: r8188eu: Remove unused macros Message-ID: <efaf637a14b6f7fdd0178e2aecf8abf17e6922f6.1666299151.git.drv@mailo.com> References: <cover.1666299151.git.drv@mailo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <cover.1666299151.git.drv@mailo.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747243934288899937?= X-GMAIL-MSGID: =?utf-8?q?1747243934288899937?= |
Series |
staging: r8188eu: trivial code cleanup patches
|
|
Commit Message
Deepak R Varma
Oct. 20, 2022, 9:32 p.m. UTC
Simple variants of macros PlatformEFIOWrite and PlatformEFIORead are
defined but never used. As they do not appear to be designed for anything
significant, we can remove them to avoid unexpected usage.
Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
Changes in v4:
1. Patch newly added to the patch set.
drivers/staging/r8188eu/include/rtw_io.h | 14 --------------
1 file changed, 14 deletions(-)
--
2.30.2
Comments
On Fri, Oct 21, 2022 at 07:56:05AM +0200, Greg KH wrote: > On Fri, Oct 21, 2022 at 11:21:06AM +0530, Praveen Kumar wrote: > > On 21-10-2022 03:02, Deepak R Varma wrote: > > > Simple variants of macros PlatformEFIOWrite and PlatformEFIORead are > > > defined but never used. As they do not appear to be designed for anything > > > significant, we can remove them to avoid unexpected usage. > > > > > > Suggested-by: Julia Lawall <julia.lawall@inria.fr> > > > Signed-off-by: Deepak R Varma <drv@mailo.com> > > > --- > > > > > > Changes in v4: > > > 1. Patch newly added to the patch set. > > > > > > > > > drivers/staging/r8188eu/include/rtw_io.h | 14 -------------- > > > 1 file changed, 14 deletions(-) > > > > > > diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h > > > index 87fcf6c94ff3..e9744694204b 100644 > > > --- a/drivers/staging/r8188eu/include/rtw_io.h > > > +++ b/drivers/staging/r8188eu/include/rtw_io.h > > > @@ -285,18 +285,4 @@ void bus_sync_io(struct io_queue *pio_q); > > > u32 _ioreq2rwmem(struct io_queue *pio_q); > > > void dev_power_down(struct adapter *Adapter, u8 bpwrup); > > > > > > -#define PlatformEFIOWrite1Byte(_a, _b, _c) \ > > > - rtw_write8(_a, _b, _c) > > > -#define PlatformEFIOWrite2Byte(_a, _b, _c) \ > > > - rtw_write16(_a, _b, _c) > > > -#define PlatformEFIOWrite4Byte(_a, _b, _c) \ > > > - rtw_write32(_a, _b, _c) > > > - > > > -#define PlatformEFIORead1Byte(_a, _b) \ > > > > Can the naming be reworked to make more Linux friendly ? something like PLATFORM_EFIO_READ1BYTE or better if there are other suggestions? > > Rest others as applicable ? > > All of these should just be removed entirely and the normal calls here > made instead. There is no need for these #defines at all. Hello Greg, The current patch scope results in removal of these #defines. Can you please clarify what you mean by "normal calls here made instead"? Do you mean the calling function should directly call the wrapped functions OR you are suggesting converting these #defines to inline functions? Thank you, ./drv > > thanks, > > greg k-h >
On Fri, Oct 21, 2022 at 10:33:57AM +0200, Greg KH wrote: > On Fri, Oct 21, 2022 at 05:04:37AM +0530, Deepak R Varma wrote: > > On Fri, Oct 21, 2022 at 07:56:05AM +0200, Greg KH wrote: > > > On Fri, Oct 21, 2022 at 11:21:06AM +0530, Praveen Kumar wrote: > > > > On 21-10-2022 03:02, Deepak R Varma wrote: > > > > > Simple variants of macros PlatformEFIOWrite and PlatformEFIORead are > > > > > defined but never used. As they do not appear to be designed for anything > > > > > significant, we can remove them to avoid unexpected usage. > > > > > > > > > > Suggested-by: Julia Lawall <julia.lawall@inria.fr> > > > > > Signed-off-by: Deepak R Varma <drv@mailo.com> > > > > > --- > > > > > > > > > > Changes in v4: > > > > > 1. Patch newly added to the patch set. > > > > > > > > > > > > > > > drivers/staging/r8188eu/include/rtw_io.h | 14 -------------- > > > > > 1 file changed, 14 deletions(-) > > > > > > > > > > diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h > > > > > index 87fcf6c94ff3..e9744694204b 100644 > > > > > --- a/drivers/staging/r8188eu/include/rtw_io.h > > > > > +++ b/drivers/staging/r8188eu/include/rtw_io.h > > > > > @@ -285,18 +285,4 @@ void bus_sync_io(struct io_queue *pio_q); > > > > > u32 _ioreq2rwmem(struct io_queue *pio_q); > > > > > void dev_power_down(struct adapter *Adapter, u8 bpwrup); > > > > > > > > > > -#define PlatformEFIOWrite1Byte(_a, _b, _c) \ > > > > > - rtw_write8(_a, _b, _c) > > > > > -#define PlatformEFIOWrite2Byte(_a, _b, _c) \ > > > > > - rtw_write16(_a, _b, _c) > > > > > -#define PlatformEFIOWrite4Byte(_a, _b, _c) \ > > > > > - rtw_write32(_a, _b, _c) > > > > > - > > > > > -#define PlatformEFIORead1Byte(_a, _b) \ > > > > > > > > Can the naming be reworked to make more Linux friendly ? something like PLATFORM_EFIO_READ1BYTE or better if there are other suggestions? > > > > Rest others as applicable ? > > > > > > All of these should just be removed entirely and the normal calls here > > > made instead. There is no need for these #defines at all. > > > > Hello Greg, > > The current patch scope results in removal of these #defines. Can you please > > clarify what you mean by "normal calls here made instead"? Do you mean the > > calling function should directly call the wrapped functions OR you are > > suggesting converting these #defines to inline functions? > > The calling function should call the wrapped function instead, there is > no need for another pointless level of indirection here. Sounds good. Thank you for the clarification. ./drv > > thanks, > > greg k-h
On 21-10-2022 03:02, Deepak R Varma wrote: > Simple variants of macros PlatformEFIOWrite and PlatformEFIORead are > defined but never used. As they do not appear to be designed for anything > significant, we can remove them to avoid unexpected usage. > > Suggested-by: Julia Lawall <julia.lawall@inria.fr> > Signed-off-by: Deepak R Varma <drv@mailo.com> > --- > > Changes in v4: > 1. Patch newly added to the patch set. > > > drivers/staging/r8188eu/include/rtw_io.h | 14 -------------- > 1 file changed, 14 deletions(-) > > diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h > index 87fcf6c94ff3..e9744694204b 100644 > --- a/drivers/staging/r8188eu/include/rtw_io.h > +++ b/drivers/staging/r8188eu/include/rtw_io.h > @@ -285,18 +285,4 @@ void bus_sync_io(struct io_queue *pio_q); > u32 _ioreq2rwmem(struct io_queue *pio_q); > void dev_power_down(struct adapter *Adapter, u8 bpwrup); > > -#define PlatformEFIOWrite1Byte(_a, _b, _c) \ > - rtw_write8(_a, _b, _c) > -#define PlatformEFIOWrite2Byte(_a, _b, _c) \ > - rtw_write16(_a, _b, _c) > -#define PlatformEFIOWrite4Byte(_a, _b, _c) \ > - rtw_write32(_a, _b, _c) > - > -#define PlatformEFIORead1Byte(_a, _b) \ Can the naming be reworked to make more Linux friendly ? something like PLATFORM_EFIO_READ1BYTE or better if there are other suggestions? Rest others as applicable ? > - rtw_read8(_a, _b) > -#define PlatformEFIORead2Byte(_a, _b) \ > - rtw_read16(_a, _b) > -#define PlatformEFIORead4Byte(_a, _b) \ > - rtw_read32(_a, _b) > - > #endif /* _RTL8711_IO_H_ */ > -- > 2.30.2 > > > Regards, ~Praveen.
On Fri, Oct 21, 2022 at 11:21:06AM +0530, Praveen Kumar wrote: > On 21-10-2022 03:02, Deepak R Varma wrote: > > Simple variants of macros PlatformEFIOWrite and PlatformEFIORead are > > defined but never used. As they do not appear to be designed for anything > > significant, we can remove them to avoid unexpected usage. > > > > Suggested-by: Julia Lawall <julia.lawall@inria.fr> > > Signed-off-by: Deepak R Varma <drv@mailo.com> > > --- > > > > Changes in v4: > > 1. Patch newly added to the patch set. > > > > > > drivers/staging/r8188eu/include/rtw_io.h | 14 -------------- > > 1 file changed, 14 deletions(-) > > > > diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h > > index 87fcf6c94ff3..e9744694204b 100644 > > --- a/drivers/staging/r8188eu/include/rtw_io.h > > +++ b/drivers/staging/r8188eu/include/rtw_io.h > > @@ -285,18 +285,4 @@ void bus_sync_io(struct io_queue *pio_q); > > u32 _ioreq2rwmem(struct io_queue *pio_q); > > void dev_power_down(struct adapter *Adapter, u8 bpwrup); > > > > -#define PlatformEFIOWrite1Byte(_a, _b, _c) \ > > - rtw_write8(_a, _b, _c) > > -#define PlatformEFIOWrite2Byte(_a, _b, _c) \ > > - rtw_write16(_a, _b, _c) > > -#define PlatformEFIOWrite4Byte(_a, _b, _c) \ > > - rtw_write32(_a, _b, _c) > > - > > -#define PlatformEFIORead1Byte(_a, _b) \ > > Can the naming be reworked to make more Linux friendly ? something like PLATFORM_EFIO_READ1BYTE or better if there are other suggestions? > Rest others as applicable ? All of these should just be removed entirely and the normal calls here made instead. There is no need for these #defines at all. thanks, greg k-h
On Fri, Oct 21, 2022 at 05:04:37AM +0530, Deepak R Varma wrote: > On Fri, Oct 21, 2022 at 07:56:05AM +0200, Greg KH wrote: > > On Fri, Oct 21, 2022 at 11:21:06AM +0530, Praveen Kumar wrote: > > > On 21-10-2022 03:02, Deepak R Varma wrote: > > > > Simple variants of macros PlatformEFIOWrite and PlatformEFIORead are > > > > defined but never used. As they do not appear to be designed for anything > > > > significant, we can remove them to avoid unexpected usage. > > > > > > > > Suggested-by: Julia Lawall <julia.lawall@inria.fr> > > > > Signed-off-by: Deepak R Varma <drv@mailo.com> > > > > --- > > > > > > > > Changes in v4: > > > > 1. Patch newly added to the patch set. > > > > > > > > > > > > drivers/staging/r8188eu/include/rtw_io.h | 14 -------------- > > > > 1 file changed, 14 deletions(-) > > > > > > > > diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h > > > > index 87fcf6c94ff3..e9744694204b 100644 > > > > --- a/drivers/staging/r8188eu/include/rtw_io.h > > > > +++ b/drivers/staging/r8188eu/include/rtw_io.h > > > > @@ -285,18 +285,4 @@ void bus_sync_io(struct io_queue *pio_q); > > > > u32 _ioreq2rwmem(struct io_queue *pio_q); > > > > void dev_power_down(struct adapter *Adapter, u8 bpwrup); > > > > > > > > -#define PlatformEFIOWrite1Byte(_a, _b, _c) \ > > > > - rtw_write8(_a, _b, _c) > > > > -#define PlatformEFIOWrite2Byte(_a, _b, _c) \ > > > > - rtw_write16(_a, _b, _c) > > > > -#define PlatformEFIOWrite4Byte(_a, _b, _c) \ > > > > - rtw_write32(_a, _b, _c) > > > > - > > > > -#define PlatformEFIORead1Byte(_a, _b) \ > > > > > > Can the naming be reworked to make more Linux friendly ? something like PLATFORM_EFIO_READ1BYTE or better if there are other suggestions? > > > Rest others as applicable ? > > > > All of these should just be removed entirely and the normal calls here > > made instead. There is no need for these #defines at all. > > Hello Greg, > The current patch scope results in removal of these #defines. Can you please > clarify what you mean by "normal calls here made instead"? Do you mean the > calling function should directly call the wrapped functions OR you are > suggesting converting these #defines to inline functions? The calling function should call the wrapped function instead, there is no need for another pointless level of indirection here. thanks, greg k-h
diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h index 87fcf6c94ff3..e9744694204b 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -285,18 +285,4 @@ void bus_sync_io(struct io_queue *pio_q); u32 _ioreq2rwmem(struct io_queue *pio_q); void dev_power_down(struct adapter *Adapter, u8 bpwrup); -#define PlatformEFIOWrite1Byte(_a, _b, _c) \ - rtw_write8(_a, _b, _c) -#define PlatformEFIOWrite2Byte(_a, _b, _c) \ - rtw_write16(_a, _b, _c) -#define PlatformEFIOWrite4Byte(_a, _b, _c) \ - rtw_write32(_a, _b, _c) - -#define PlatformEFIORead1Byte(_a, _b) \ - rtw_read8(_a, _b) -#define PlatformEFIORead2Byte(_a, _b) \ - rtw_read16(_a, _b) -#define PlatformEFIORead4Byte(_a, _b) \ - rtw_read32(_a, _b) - #endif /* _RTL8711_IO_H_ */