Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1684255

Re: [PATCH] Staging:ks7010:ks_wlan_net.c: unneeded type casting removed

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Staging:ks7010:ks_wlan_net.c: unneeded type casting removed
Date 2017-07-10 15:50 +0200
Message-ID <u1Hey-5Fo-27@gated-at.bofh.it> (permalink)
References <u1CeR-2AZ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2017-07-10 at 10:09 +0300, AndyS wrote:
> removed undesired type casting. Warning was raised by checkpatch.pl
> This patch is for eudyptula challenge

False positive in checkpatch.
checkpatch does not handle floating point values.

> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
[]
> @@ -208,7 +208,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)) {
>  		int f = fwrq->m / 100000;
>  		int c = 0;
>  

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] Staging:ks7010:ks_wlan_net.c: unneeded type casting removed AndyS <lkd1024@mail.ru> - 2017-07-10 10:30 +0200
  Re: [PATCH] Staging:ks7010:ks_wlan_net.c: unneeded type casting removed Frans Klaver <fransklaver@gmail.com> - 2017-07-10 12:20 +0200
  Re: [PATCH] Staging:ks7010:ks_wlan_net.c: unneeded type casting  removed Joe Perches <joe@perches.com> - 2017-07-10 15:50 +0200
    Re: [PATCH] Staging:ks7010:ks_wlan_net.c: unneeded type casting  removed Joe Perches <joe@perches.com> - 2017-07-10 16:00 +0200

csiph-web