kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* linux kernel coding style and checkpatch.pl script
@ 2020-03-25  9:36 Tomek The Messenger
  2020-03-25  9:51 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tomek The Messenger @ 2020-03-25  9:36 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 908 bytes --]

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.

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.

[-- Attachment #1.2: Type: text/html, Size: 1244 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-26 13:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25  9:36 linux kernel coding style and checkpatch.pl script Tomek The Messenger
2020-03-25  9:51 ` Greg KH
2020-03-26  4:13 ` Valdis Klētnieks
2020-03-26 11:36   ` Konstantin Andreev
     [not found]   ` <E1jHQrV-0002Zv-Ln@shelob.surriel.com>
2020-03-26 12:06     ` Greg KH
2020-03-26 13:01       ` Konstantin Andreev
     [not found]       ` <E1jHS2D-0004t2-IX@shelob.surriel.com>
2020-03-26 13:17         ` Greg KH
2020-03-26 10:57 ` Anuz Pratap Singh Tomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).