From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Khadija Kamran <kamrankhadijadj@gmail.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
Alison Schofield <alison.schofield@intel.com>,
outreachy@lists.linux.dev, llvm@lists.linux.dev,
oe-kbuild-all@lists.linux.dev,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: axis-fifo: initialize timeouts in probe only
Date: Tue, 14 Mar 2023 20:07:07 +0100 [thread overview]
Message-ID: <2510576.EEEGcR9oU2@suse> (raw)
In-Reply-To: <ZBCPMVFvjodeUbGF@aschofie-mobl2>
On martedì 14 marzo 2023 16:13:53 CET Alison Schofield wrote:
> On Tue, Mar 14, 2023 at 07:42:07AM -0700, Nathan Chancellor wrote:
> > Hi Khadija,
> >
> > On Tue, Mar 14, 2023 at 07:08:31PM +0500, Khadija Kamran wrote:
> > > On Tue, Mar 14, 2023 at 11:45:51AM +0800, kernel test robot wrote:
> > > >
> > > > [...]
> > >
> > > Hi everyone!
> > > Kindly let me know if I should look into these warnings.
> > > Thank you!
> >
> > You should always avoid introducing new warnings whenever possible. In
> > this case, it appears that read_timeout and write_timeout should be
> > changed from 'int' to 'long' to account for the fact that
> > MAX_SCHEDULE_TIMEOUT is being assigned to it directly now, versus being
> > passed as a parameter to wait_event_interruptible_timeout(), which
> > assigned it to 'long' anyways.
> >
> > If you have any other questions or need further help, let me know :)
> >
> > Cheers,
> > Nathan
>
> Hi Khadija,
>
> Echoing Nathan's feedback - yes, you need to correct these.
>
> Do you see these warnings when you compiled? If yes, then your path to
> fixing them is easier. Make sure it recompiles with no warnings.
>
> If you don't see these warnings, then you need to follow the steps to
> reproduce in the lkp email. You have to be able to 'see the warning'
> make a change and 'see it go away'.
>
> Alison
>
Hi Khadija,
I would suggest trying to recompile using "make W=1 -j...". Not sure if you'll
see the warnings (depends on your compiler, version and target architecture).
However, it's worth a try as it may save you the time it takes to go through
the steps for reproduction.
Anyway, as Nathan said, that warning is triggered by assigning 'long' to 'int'
(i.e., "MAX_SCHEDULE_TIMEOUT" is cast to 'long', while the types of
"read_timeout" and "write_timeout " are both 'int'). Obviously, these kinds of
assignments overflow wherever the representation of type 'long' uses more bits
than the type 'int'.
That implies that you should try to understand where the module's parameters
are defined and how to work with the related macros.
I hope it helps.
Fabio
P.S.: If you don't know yet what to do, take a look at the following document:
https://sysprog21.github.io/lkmpg/ (The Linux Kernel Module Programming
Guide).
prev parent reply other threads:[~2023-03-14 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ZA9mThZ7NyRrQAMX@khadija-virtual-machine>
2023-03-14 3:45 ` [PATCH] staging: axis-fifo: initialize timeouts in probe only kernel test robot
2023-03-14 14:08 ` Khadija Kamran
2023-03-14 14:42 ` Nathan Chancellor
2023-03-14 15:13 ` Alison Schofield
2023-03-14 19:07 ` Fabio M. De Francesco [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=2510576.EEEGcR9oU2@suse \
--to=fmdefrancesco@gmail.com \
--cc=alison.schofield@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kamrankhadijadj@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).