regarding const variables/structures

inventsekar inventsekar at gmail.com
Wed Sep 12 02:20:35 EDT 2018


Hi All...
One curious question..

Linux Foundation tweeted this -
Meet Bhumika Goyal, age 22, from India. She has had more 340 patches
accepted into the Linux kernel, which helped her land one of our two Linux
Kernel Guru LiFT scholarships:
https://twitter.com/linuxfoundation/status/940340927897489408?lang=en

and her commits are -
https://github.com/torvalds/linux/commits?author=bhumikagoyal

One of my friend told me that, most/many of patches are just converting
variables to "*constant*"

For example - platform/chrome: chromeos_laptop: make chromeos_laptop const
-

Declare chromeos_laptop structures as *const *as they are only used during
a copy operation. As their value is never modified during runtime, they
can be made const.


the question is that, how these many const variable issues are left/missed
by the previous developers?!?! per my little knowledge, this task looks
like a simple one.. many other Kernel Developers should have thought and
made these changes long before, but i am not able to understand why this
wasnt done until recently?!?!?


-- 
Best Regards,
Sekar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180912/71c10aea/attachment.html>


More information about the Kernelnewbies mailing list