From mboxrd@z Thu Jan 1 00:00:00 1970 From: der.herr@hofr.at (Nicholas Mc Guire) Date: Sun, 11 Sep 2016 16:48:49 +0000 Subject: udelay vs usleep_range In-Reply-To: References: Message-ID: <20160911164849.GA9538@osadl.at> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org > > But looking into the code on line 634 where I found the udelay(33), I > have the impression that this is a false positive, something your > checkpatch didn't catch properly. That call is inside a function named > nvec_interrupt(), and the line: > > err = devm_request_irq(&pdev->dev, nvec->irq, nvec_interrupt, > 0, "nvec", nvec); > > declares it as the interrupt handler. The interrupt handler can't > sleep(interrupt handler runs in the atomic context in terminology of > timers-howto.txt), and using udelay() seems to be the thing to do > here. > devm_request_irq -> devm_request_threaded_irq -> request_threaded_irq so this should be ok here. thx! hofrat