[Ksummit-2012-discuss] Smatch for static analysis testing
tiwai at suse.de
Fri Jun 22 12:29:31 UTC 2012
At Fri, 22 Jun 2012 14:13:11 +0300,
Dan Carpenter wrote:
> Since last year, I've moved from fixing bugs to just reporting them.
> If I don't understand the code then I normally don't report it.
> For example in sound/drivers/serial-u16550.c:
> 442 byte = (0 & UART_IER_RDI) /* Disable Receiver data interrupt */
> 443 |(0 & UART_IER_THRI) /* Disable Transmitter holding register empty interrupt */
> 444 ;
> Surely, the author understands that he is setting "byte = 0;" right?
> Looking at it now, I suppose it's possible that bitwise negate was
> intended. This is old so I wouldn't report it for that reason as
Oh, that old crap in that directory? Shame on me.
It should be cleaned up indeed. Normal kernel coders must understand
"byte = 0" means to clear all IRQ bit masks.
But this also reminds me of another question: may we discuss about the
lifetime of old hardware drivers (or subsystems)?
More information about the Ksummit-2012-discuss