Messages in this thread |  | | Date | Thu, 1 Nov 2012 10:22:05 +0100 | | From | Pavel Machek <> | | Subject | Re: [PATCH 3/3] checkpatch: Emit a warning when decimal values are used |
| |
Hi!
> > > Linux kernel doesn't like decimals, say so. > > > > ?! > > > > Linux surely supports decimal constants, like "100". Did you mean > > "octal"? > > > > If you wanted to add warning for something... I never want to see > > > > #define CRAPPY_EMBEDDED_REGISTER ((0x1) << (0)) > > > > again.... > > Joe means floating point. I suggest that the patchset be reworked, > using s/decimal/float/g. > > > The kernel does have floating point constants, in various graphics > drivers, iirc. They are used in places where the floatiness gets > handled at complation time. Along the lines of: > > int foo = 1.1 * 2.2; .... > A much better solution would be to arrange for the kernel to fail to > compile (or to fail to link) if floats are used. That way, people > could continue to use floats within their compile-time scalar > expressions without getting harrassed by checkpatch. But I don't know > how to arrange this.
I know it is normally unwanted, but we do have kernel_fpu_begin(). I thought it enables exactly... floating point math in kernel? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
|  |