Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752094AbdHAQXN (ORCPT ); Tue, 1 Aug 2017 12:23:13 -0400 Received: from smtprelay0025.hostedemail.com ([216.40.44.25]:43975 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751773AbdHAQXL (ORCPT ); Tue, 1 Aug 2017 12:23:11 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:69:355:379:541:599:800:960:966:968:973:988:989:1042:1260:1277:1311:1313:1314:1345:1359:1373:1381:1437:1515:1516:1518:1534:1543:1593:1594:1711:1730:1747:1777:1792:2194:2196:2199:2200:2393:2559:2562:2828:2892:3138:3139:3140:3141:3142:3355:3622:3865:3866:3868:3870:3871:3872:4321:4384:4385:4395:5007:6119:7514:7522:7875:7903:9108:9390:10004:10400:10848:11026:11232:11473:11658:11914:12043:12048:12291:12295:12683:12740:12760:12895:13095:13439:14093:14096:14097:14110:14181:14659:14721:21080:21433:21451:21627:30054:30075:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:67,LUA_SUMMARY:none X-HE-Tag: shape96_55646685a030c X-Filterd-Recvd-Size: 3930 Message-ID: <1501604576.7190.7.camel@perches.com> Subject: Re: [PATCH] staging: ks7010: fix styling WARNINGs From: Joe Perches To: Ashish Kalra , gregkh@linuxfoundation.org, wsa@the-dreams.de, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Tue, 01 Aug 2017 09:22:56 -0700 In-Reply-To: <1501603889-1988-1-git-send-email-eashishkalra@gmail.com> References: <1501470921-1947-1-git-send-email-eashishkalra@gmail.com> <1501603889-1988-1-git-send-email-eashishkalra@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2930 Lines: 90 On Tue, 2017-08-01 at 17:11 +0100, Ashish Kalra wrote: > Signed-off-by: Ashish Kalra Still many issues with this patch submission: o no commit message o no version of patch submission in subject line And other issues below: > --- > drivers/staging/ks7010/ks7010_sdio.c | 47 +++++++++++++++++++++++++----------- > 1 file changed, 33 insertions(+), 14 deletions(-) > > Trivial style changes. There are still "line over 80 characters" > checkpatch.pl warnings, but I think they are best left alone as > breaking these could hurt readability This message should go above the --- line and the version information about what changed between each submission should go below the --- line. > diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c [] > @@ -9,7 +9,6 @@ > * it under the terms of the GNU General Public License version 2 as > * published by the Free Software Foundation. > */ > - Why is this line removed? > #include > #include > #include > @@ -32,19 +31,39 @@ > }; > MODULE_DEVICE_TABLE(sdio, ks7010_sdio_ids); > > -#define inc_txqhead(priv) \ > - (priv->tx_dev.qhead = (priv->tx_dev.qhead + 1) % TX_DEVICE_BUFF_SIZE) > -#define inc_txqtail(priv) \ > - (priv->tx_dev.qtail = (priv->tx_dev.qtail + 1) % TX_DEVICE_BUFF_SIZE) > -#define cnt_txqbody(priv) \ > - (((priv->tx_dev.qtail + TX_DEVICE_BUFF_SIZE) - (priv->tx_dev.qhead)) % TX_DEVICE_BUFF_SIZE) > - > -#define inc_rxqhead(priv) \ > - (priv->rx_dev.qhead = (priv->rx_dev.qhead + 1) % RX_DEVICE_BUFF_SIZE) > -#define inc_rxqtail(priv) \ > - (priv->rx_dev.qtail = (priv->rx_dev.qtail + 1) % RX_DEVICE_BUFF_SIZE) > -#define cnt_rxqbody(priv) \ > - (((priv->rx_dev.qtail + RX_DEVICE_BUFF_SIZE) - (priv->rx_dev.qhead)) % RX_DEVICE_BUFF_SIZE) > +static int inc_txqhead(struct ks_wlan_private *priv) > +{ > + priv->tx_dev.qhead = (priv->tx_dev.qhead + 1) % TX_DEVICE_BUFF_SIZE; > + return 0; > +} > + > +static int inc_txqtail(struct ks_wlan_private *priv) > +{ > + priv->tx_dev.qtail = (priv->tx_dev.qtail + 1) % TX_DEVICE_BUFF_SIZE; > + return 0; > +} > + > +static int inc_rxqtail(struct ks_wlan_private *priv) > +{ > + priv->rx_dev.qtail = (priv->rx_dev.qtail + 1) % RX_DEVICE_BUFF_SIZE; > + return 0; > +} > + > +static int inc_rxqhead(struct ks_wlan_private *priv) > +{ > + priv->rx_dev.qhead = (priv->rx_dev.qhead + 1) % RX_DEVICE_BUFF_SIZE; > + return 0; > +} Why are the functions above not returning void? > + > +static int cnt_rxqbody(struct ks_wlan_private *priv) > +{ > + return (((priv->rx_dev.qtail + RX_DEVICE_BUFF_SIZE) - (priv->rx_dev.qhead)) % RX_DEVICE_BUFF_SIZE); > +} > + > +static int cnt_txqbody(struct ks_wlan_private *priv) > +{ > + return (((priv->tx_dev.qtail + TX_DEVICE_BUFF_SIZE) - (priv->tx_dev.qhead)) % TX_DEVICE_BUFF_SIZE); > +} Why are these 2 functions above not returning unsigned int?