From: Joe Perches <joe@perches.com>
To: Ashish Kalra <eashishkalra@gmail.com>,
gregkh@linuxfoundation.org, wsa@the-dreams.de,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Removing Check Errors with checkpatch.pl, Converting from macro to function call
Date: Mon, 31 Jul 2017 17:25:29 -0700 [thread overview]
Message-ID: <1501547129.22828.7.camel@perches.com> (raw)
In-Reply-To: <1501467634-31378-1-git-send-email-eashishkalra@gmail.com>
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);
> +}
next prev parent reply other threads:[~2017-08-01 0:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 2:20 [PATCH] Removing Check Errors with checkpatch.pl, Converting from macro to function call Ashish Kalra
2017-08-01 0:25 ` Joe Perches [this message]
2017-07-31 3:15 ` [PATCH] staging: ks7010: fix styling WARNINGs Ashish Kalra
2017-08-01 1:18 ` Greg KH
2017-08-01 4:29 ` kbuild test robot
2017-08-01 4:31 ` kbuild test robot
2017-08-01 16:11 ` Ashish Kalra
2017-08-01 16:22 ` Joe Perches
2017-08-01 17:25 ` [PATCH v2]staging: " Ashish Kalra
2017-08-17 17:58 ` Greg KH
2017-08-01 20:28 ` [PATCH] staging: " Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1501547129.22828.7.camel@perches.com \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=eashishkalra@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox