All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] h [Patch] Fixed unnecessary typecasting to int. Error found with checkpatch. Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
@ 2018-02-26 18:18 Nishka Dasgupta
  2018-02-26 18:55 ` [Outreachy kernel] " Gargi Sharma
  0 siblings, 1 reply; 7+ messages in thread
From: Nishka Dasgupta @ 2018-02-26 18:18 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Nishka Dasgupta

---
 drivers/staging/ks7010/ks_wlan_net.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index e48c557..69cd8347 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -201,6 +201,8 @@ static int ks_wlan_set_freq(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 	int channel;
+	int a2412 = 2.412e8;
+	int b2487 = 2.487e8;
 
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
@@ -208,7 +210,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 >= a2412) && (fwrq->m <= b2487)) {
 		int f = fwrq->m / 100000;
 		int c = 0;
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-27 14:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 18:18 [PATCH] h [Patch] Fixed unnecessary typecasting to int. Error found with checkpatch. Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in> Nishka Dasgupta
2018-02-26 18:55 ` [Outreachy kernel] " Gargi Sharma
2018-02-27 13:23   ` Re: [PATCH] h [Patch] Fixed unnecessary typecasting to in. " Nishka Dasgupta
2018-02-27 13:39     ` [Outreachy kernel] " Julia Lawall
2018-02-27 13:53       ` Nishka Dasgupta
2018-02-27 13:58         ` [Outreachy kernel] Re: Julia Lawall
2018-02-27 14:07           ` Re: Nishka Dasgupta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.