Re: [PATCH] Declare the file_operations struct as const
From: Fabio M. De Francesco <hidden>
Date: 2021-08-27 07:48:10
Also in:
lkml
On Friday, August 27, 2021 8:49:30 AM CEST Fabio M. De Francesco wrote:
On Friday, August 27, 2021 3:59:28 AM CEST Krish Jain wrote:quoted
From: Krish Jain [off-list ref] Declare the file_operations struct as const as done elsewhere in the kernel, as there are no modifications to its fields. Signed-off-by: Krish Jain <redacted> --- []Are you sure that it works? I wouldn't be. You didn't build this file. Please build your changes before submitting patches. Furthermore, please always rebase to the current version of the staging tree. Finally, please use the class modifier "static" as the first keyword of a declaration/definition as it is done everywhere in the kernel (see "grep -rn "static const" drivers/staging/" and then switch to "const static" and read the output).
Please don't misunderstand me: as far as I can see this is your first patch and (I'm pretty sure I can speak for everyone else about this) you are very welcome to staging and to kernel hacking :) However, before posting further works, you'd better read at least the following documents: https://www.kernel.org/doc/html/latest/process/4.Coding.html https://www.kernel.org/doc/html/latest/process/submitting-patches.html And please don't forget to always CC linux-kernel@vger.kernel.org. Have a nice time with kernel hacking. Thanks, Fabio