Re: [PATCH 00/13] [RFC] Rust support

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

 



On Thu, 28 Jul 2022 14:09:57 +0200
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:

> On Thu, Jul 28, 2022 at 11:21:14AM +0100, Gary Guo wrote:
> > Rust requires braces around branches of if expression, and C
> > doesn't. So in kernel coding style you often have:
> > 
> > 	if (condition) do_something();  
> 
> That is not a valid kernel coding style, and our tools should catch
> this and prevent it from being added to the kernel tree.

Thanks, I stand corrected. I do see those patterns occasionally so
presumably that gives me wrong impression.

	rg '\bif \(.*;' $(find -name *.c) | wc -l

gives me 3362 results though. Most of them are from fs and driver
directory so presumably they are vendored or legacy code.

Best,
Gary



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux