lkml.org 
[lkml]   [2019]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rtl8712: rtl871x_ioctl_linux.c: fix unnecessary typecast
On Mon, Aug 05, 2019 at 10:33:29PM -0300, Jose Carlos Cazarin Filho wrote:
> Fix checkpath warning:
> WARNING: Unnecessary typecast of c90 int constant
>
> Signed-off-by: Jose Carlos Cazarin Filho <joseespiriki@gmail.com>
> ---
> Hello all!
> This is my first commit to the Linux Kernel, I'm doing this to learn and be able
> to contribute more in the future
> Peace all!
> drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> index 944336e0d..da371072e 100644
> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> @@ -665,8 +665,8 @@ static int r8711_wx_set_freq(struct net_device *dev,
>
> /* 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)) {

I don't think we can do this. You're not allowed to use floats in the
kernel (because they make context switching slow). I could have sworn
that we use the -nofp to stop the compile when people use floats but
this compiles fine for me.

regards,
dan carpenter

\
 
 \ /
  Last update: 2019-08-06 13:56    [W:0.179 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site