From: Jeremiah John <jeremiahjohn08706@gmail.com>
To: outreachy@lists.linux.dev
Subject: drivers/staging/nvec/nvec.c "usleep_range" check
Date: Mon, 23 Oct 2023 20:00:49 -0500 [thread overview]
Message-ID: <ZTcXQXfnkEMYjnDk@host-62.home> (raw)
I ran checkpatch.pl on the nvec directory in drivers/staging and got the following two checks for nvec.c:
>drivers/staging/nvec/nvec.c
>---------------------------
>CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
>#630: FILE: drivers/staging/nvec/nvec.c:630:
>+ udelay(33);
>CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
>#717: FILE: drivers/staging/nvec/nvec.c:717:
>+ udelay(100);
I checked the documentation for drivers and it says that udelay() is used only in the context of atomic functions.
looking through the source code (nvec.c), I found that the lines where udelay() was called were in functions:
1. static irqreturn_t nvec_interrupt(int irq, void *dev)
is this an atomic function? can i test the changes if I do not have the nvec modules loaded in my current workstation?
Thank you,
Jeremiah John
next reply other threads:[~2023-10-24 1:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 1:00 Jeremiah John [this message]
2023-10-24 1:09 ` drivers/staging/nvec/nvec.c "usleep_range" check Jeremiah John
2023-10-24 1:11 ` Jeremiah John
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=ZTcXQXfnkEMYjnDk@host-62.home \
--to=jeremiahjohn08706@gmail.com \
--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 read-only IMAP folder(s) and NNTP newsgroup(s).