Re: [PATCH] drivers/firmware: const-ify DMI API and internals

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

 




On Sat, 1 Sep 2007, Andi Kleen wrote:
> 
> >     And if we're really lucky, this might enable some additional
> >     optimizations on the part of the compiler.
> 
> Only if the kernel was compiled C++. C compilers generally ignore constness
> for optimization purposes because it can be so easily casted away.

???

I can't speak for the exact const-ification that Jeff did in this
particular patch, but if you intended your comment up there to be a
blanket statement, then you're totally and horribly wrong. There's a
whole plethora of optimizations that gcc does when dealing with const-
marked data. If you've seen / experienced otherwise, please post some
testcases.
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux