From: Rong Chen <rong.a.chen@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
kernel test robot <lkp@intel.com>
Cc: Dan Carpenter <error27@gmail.com>,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [kbuild-all] Re: [linux-stable-rc:linux-4.4.y 1449/1774] drivers/input/joydev.c:485:16: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int'
Date: Mon, 19 Jul 2021 16:46:56 +0800 [thread overview]
Message-ID: <4dee6094-2bec-6afb-38ae-804675c8172c@intel.com> (raw)
In-Reply-To: <20210719071758.GP1931@kadam>
On 7/19/21 3:17 PM, Dan Carpenter wrote:
> On Mon, Jul 19, 2021 at 11:39:16AM +0800, kernel test robot wrote:
>> drivers/input/joydev.c: In function 'joydev_handle_JSIOCSAXMAP':
>> drivers/input/joydev.c:451:16: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
>> 451 | for (i = 0; i < len && i < joydev->nabs; i++) {
> We should figure out a way to turn this warning off in the compiler.
>
> It's a stupid warning. It never fixes any bugs. It sometimes
> introduces bugs.
>
> In the kernel if you are in drivers/ and you have a loop which iterates
> over 2 million times that's probably a bug. But GCC is very very
> stupid and not designed to be a static analysis tool. It does not know
> which loops can iterate more than 2 million times. Even when it knows
> that the loop only loops up to 5 or 10 times it still warns that maybe
> it will loop over 2 million times. INSULTS AND DISPARAGEMENT!
>
> Seriously, please disable this warning unless you can point to one
> single bug that it has fixed.
Hi Dan,
Thanks for the explanation, we'll stop reporting this warning.
Best Regards,
Rong Chen
>
> regards,
> dan carpenter
prev parent reply other threads:[~2021-07-19 9:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 3:39 [linux-stable-rc:linux-4.4.y 1449/1774] drivers/input/joydev.c:485:16: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' kernel test robot
2021-07-19 7:17 ` Dan Carpenter
2021-07-19 8:46 ` Rong Chen [this message]
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=4dee6094-2bec-6afb-38ae-804675c8172c@intel.com \
--to=rong.a.chen@intel.com \
--cc=dan.carpenter@oracle.com \
--cc=dmitry.torokhov@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
/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