Re: [PATCH -rt] Updates-from-Jon-Masters-for-hwlat_detector.c.patch

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

 




On Tue, 3 Nov 2009, Thomas Gleixner wrote:

> On Mon, 2 Nov 2009, John Kacur wrote:
> > Updated patch just adds the error checking from Jon Masters then,
> > patched against -rt.
> 
> Can you please inline patches ?
> 
> @@ -607,7 +607,11 @@ static ssize_t  debug_enable_fwrite(stru
>  		if (!enabled)
>  			goto unlock;
>  		enabled = 0;
> -		stop_kthread();
> +		err = stop_kthread();
> +		if (0 != err) {
> 
> 	Eeew !	

Yeah, I saw that too and thought it a bit ugly. However, my goal was only 
to make sure that the latest version of Jon's hwlat patch got into -rt, so 
I didn't think it was my place to "fix" his style.

Note - even the much hated checkpatch program doesn't balk at that. 
However that is hardly an authority.

If you read the introduction to "Expert C Programming - Deep C Secrets", 
they mention that some programmers write
if (3==i)
instead of
if (i==3)

because if you mistakenly only type one '=', then the compiler can 
complain about it, instead of silently assigning 3 to i.

I can only guess that is the sort of idea / habit that Jon got that style 
from.

John
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux