linux kernel coding style and checkpatch.pl script
Anuz Pratap Singh Tomar
chambilkethakur at gmail.com
Thu Mar 26 06:57:01 EDT 2020
On Wed, Mar 25, 2020 at 9:38 AM Tomek The Messenger <
tomekthemessenger at gmail.com> wrote:
> Hi
> There is checkpatch.pl script where You can check if You wrote code in
> your kernel module according to linux kernel style.
> However can I ignore warning message?
> WARNING: quoted string split across lines
> #974: FILE: fpgax67-core.c:974:
> + dev_err(&pdev->dev, "registration not done, driver is
> already "
> + "registered\n");
>
> If I don't split line I will have another warning that 80 characters is
> exceeded.
>
> you can put the whole string on next line and/or use "\" for splitting
long string.
For sure I can ignore warnings about:
> WARNING: struct should normally be const
> #998: FILE: fpgax67-core.c :998:
> +int fpgax67_unregister(struct platform_device *pdev)
>
> For sure all errors must be fixed like:
> const char* tmp -> change to -> const char *tmp;
> if( => if ( #insert space
>
> Generally I don't know how much warnings should I correct. If it is
> mandatory or only good practise and I can omit some if it doesn't make
> sense.
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
--
Thank you
Warm Regards
Anuz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20200326/059a5f84/attachment.html>
More information about the Kernelnewbies
mailing list