Re: is `mixing declarations and code' allowed?

2017-07-08 Thread Shiyao Ma
Thank you very much for elaboration. Best, > On 8 Jul 2017, at 23:21, Greg KH wrote: > > On Sat, Jul 08, 2017 at 10:21:06PM +0800, Shiyao Ma wrote: >> Hi, >> >> One thing I feel very un-comfortable when writing kernel module code >> is the warning of `mixing declarations and

Re: is `mixing declarations and code' allowed?

2017-07-08 Thread Greg KH
On Sat, Jul 08, 2017 at 10:21:06PM +0800, Shiyao Ma wrote: > Hi, > > One thing I feel very un-comfortable when writing kernel module code > is the warning of `mixing declarations and code'. > > Is `mixing declarations and code' still frowned upon by kernel > developers? Yes. It is a bad idea

is `mixing declarations and code' allowed?

2017-07-08 Thread Shiyao Ma
Hi, One thing I feel very un-comfortable when writing kernel module code is the warning of `mixing declarations and code'. Is `mixing declarations and code' still frowned upon by kernel developers? Or is it just a history burden that for some reason one can not mix `declarations and code'?