From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jose Carlos Cazarin Filho <joseespiriki@gmail.com>
Cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com,
gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org
Subject: Re: [PATCH] rtl8712: rtl871x_ioctl_linux.c: fix unnecessary typecast
Date: Tue, 6 Aug 2019 14:53:05 +0300 [thread overview]
Message-ID: <20190806115305.GF1974@kadam> (raw)
In-Reply-To: <20190806013329.28574-1-joseespiriki@gmail.com>
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
next prev parent reply other threads:[~2019-08-06 11:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-06 1:33 [PATCH] rtl8712: rtl871x_ioctl_linux.c: fix unnecessary typecast Jose Carlos Cazarin Filho
2019-08-06 11:53 ` Dan Carpenter [this message]
2019-08-06 13:10 ` David Laight
2019-08-07 2:00 ` José Carlos Cazarin Filho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190806115305.GF1974@kadam \
--to=dan.carpenter@oracle.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=florian.c.schilhabel@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=joseespiriki@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkcamp@lists.libreplanetbr.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox