[PATCH] staging: ks7010: Fix coding style issues
Dan Carpenter
dan.carpenter at oracle.com
Tue Apr 17 08:58:38 UTC 2018
On Mon, Apr 16, 2018 at 10:36:53PM -0300, Fernando Pereira wrote:
> Fix most of checkpatch.pl issues unrelated with 80 columns limit
>
You're going to need to be more specific and you're going to need to
break the patch up so that it fixes one thing (type of warning) per
patch.
> Signed-off-by: Fernando Pereira <pereira.fhs at gmail.com>
> ---
> drivers/staging/ks7010/ks_hostif.c | 17 +++++++++--------
> drivers/staging/ks7010/ks_wlan_net.c | 5 ++---
> drivers/staging/ks7010/michael_mic.c | 5 ++---
> 3 files changed, 13 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index 676961c..de9b01a 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -44,7 +44,7 @@ static inline u8 get_byte(struct ks_wlan_private *priv)
> {
> u8 data;
>
> - data = *(priv->rxp)++;
> + data = *priv->rxp++;
Greg prefers the original, and to be honest I can't remember how the
precedence works here either so I agree with Greg.
> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
> index 9078e13..47d2e0e 100644
> --- a/drivers/staging/ks7010/ks_wlan_net.c
> +++ b/drivers/staging/ks7010/ks_wlan_net.c
> @@ -206,7 +206,7 @@ static int ks_wlan_set_freq(struct net_device *dev,
> /* for SLEEP MODE */
> /* If setting by frequency, convert to a channel */
> if ((fwrq->e == 1) &&
> - (fwrq->m >= (int)2.412e8) && (fwrq->m <= (int)2.487e8)) {
> + (fwrq->m >= 2.412e8) && (fwrq->m <= 2.487e8)) {
This will cause a build error. You're not allowed to use floats in the
kernel.
regards,
dan carpenter
More information about the devel
mailing list