Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751615AbdHAAZe (ORCPT ); Mon, 31 Jul 2017 20:25:34 -0400 Received: from smtprelay0226.hostedemail.com ([216.40.44.226]:39317 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751102AbdHAAZd (ORCPT ); Mon, 31 Jul 2017 20:25:33 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1381:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3868:3870:3873:4321:5007:10004:10400:10429:10430:10431:10432:10848:11026:11232:11473:11658:11914:12043:12048:12740:12760:12895:13095:13161:13229:13255:13439:14096:14097:14659:14721:19903:19997:21080:21212:21433:21451:21627:30003:30022:30029:30054:30070: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:2,LUA_SUMMARY:none X-HE-Tag: flame40_13182f489830d X-Filterd-Recvd-Size: 3084 Message-ID: <1501547129.22828.7.camel@perches.com> Subject: Re: [PATCH] Removing Check Errors with checkpatch.pl, Converting from macro to function call 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: Mon, 31 Jul 2017 17:25:29 -0700 In-Reply-To: <1501467634-31378-1-git-send-email-eashishkalra@gmail.com> References: <1501467634-31378-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: 2121 Lines: 66 On Mon, 2017-07-31 at 03:20 +0100, Ashish Kalra wrote: You should not use checkpatch in the commit subject and should use a commit message. You also need a "Signed-off-by:" line with your legal name and email address. > diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c [] > @@ -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; > +} These functions should return void > + > +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; > +} > + > +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); > +} And these should return unsigned int > + > +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); > +}