Re: [PATCH 09/18] ledtrig-blkdev: Periodically check devices for activity & blink LEDs

Greg KH
2021-09-05T15:12:43Z

On Sun, Sep 05, 2021 at 09:56:58AM -0500, Ian Pilcher wrote:
> On 9/5/21 9:51 AM, Greg KH wrote:
> > On Sun, Sep 05, 2021 at 09:39:57AM -0500, Ian Pilcher wrote:
> > > On 9/4/21 1:01 AM, Greg KH wrote:
> > > > Please never use WARN_ON() in new code unless the machine is really
> > > > broken and you can not do anything else here.
> > >
> > > Wait what? I thought that was BUG_ON.
> >
> > Not whan panic-on-warn is set, which is getting more and more common
> > these days.
>
> Fair enough. What is the recommend approach to reporting a "this should
> never" happen situation these days?

dev_err() and handle the error properly.