Re: [PATCH] hwmon: (i5k_amb) Replace BUG with WARN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 19, 2011 at 07:05:50PM -0400, Guenter Roeck wrote:
> Hi Jean,
> 
> On Fri, Aug 19, 2011 at 05:16:24PM -0400, Jean Delvare wrote:
> > Hi Guenter,
> > 
> > On Thu, 18 Aug 2011 10:49:31 -0700, Guenter Roeck wrote:
> > > Executing BUG as a result of an internal driver error seems to be a bit harsh.
> > 
> > Well, that's pretty much what BUG was designed for: internal errors
> > that aren't supposed to happen.
> > 
> Problem with BUG is that it can be undefined for some configurations,
> in which case it doesn't do anything. 
> 
> Also, while it may make sense to bring down the system if there is a severe bug 
> which makes it impossible to continue, that seems to be a bit excessive
> for a hwmon driver.
> 
> > > Replace it with WARN and return -ENODEV if the condition is seen.
> > 
> > I'm not sure what is the benefit of WARN over pr_warn() in this case.
> > 
> WARN generates a traceback, pr_warn doesn't. I think the scope is a bit different
> - one warns about a programming error, the other warns about a system consition.
> 
Hi all,

As I don't see a consensus for my proposed patch, I'll drop it.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux