Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1700536
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Removing Check Errors with checkpatch.pl, Converting from macro to function call |
| Date | 2017-08-01 02:30 +0200 |
| Message-ID | <u9tep-4CU-3@gated-at.bofh.it> (permalink) |
| References | <u9t4J-4zH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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);
> +}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Removing Check Errors with checkpatch.pl, Converting from macro to function call Ashish Kalra <eashishkalra@gmail.com> - 2017-08-01 02:20 +0200
Re: [PATCH] Removing Check Errors with checkpatch.pl, Converting from macro to function call Joe Perches <joe@perches.com> - 2017-08-01 02:30 +0200
[PATCH] staging: ks7010: fix styling WARNINGs Ashish Kalra <eashishkalra@gmail.com> - 2017-08-01 03:10 +0200
Re: [PATCH] staging: ks7010: fix styling WARNINGs Greg KH <gregkh@linuxfoundation.org> - 2017-08-01 03:20 +0200
[PATCH] staging: ks7010: fix styling WARNINGs Ashish Kalra <eashishkalra@gmail.com> - 2017-08-01 18:20 +0200
Re: [PATCH] staging: ks7010: fix styling WARNINGs Joe Perches <joe@perches.com> - 2017-08-01 18:30 +0200
[PATCH v2]staging: ks7010: fix styling WARNINGs Ashish Kalra <eashishkalra@gmail.com> - 2017-08-01 19:30 +0200
Re: [PATCH] staging: ks7010: fix styling WARNINGs Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-01 22:30 +0200
csiph-web