drivers/staging/nvec/nvec.c "usleep_range" check
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
I apologize as I did not read further into the Outreachyfirstpatch guide on kernelnewbies, which states that changes regarding udelay are best to be avoided
I will look elsewhere for changes to make
Thanks.
Quoted 22 lines · Jeremiah John
I ran checkpatch.pl on the nvec directory in
drivers/stagingand got the following two checks fornvec.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 whereudelay()was called were in functions:
1. staticirqreturn_tnvec_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
I also understand that I should just remove quoted text if it's not necessary :)