Thread (1 message) 1 message, 1 author, 2021-11-06

Re: [PATCH v2] tty: vt: keyboard: initialize "kbs" so that kfree(kbs) runs fine even if kbs is not kmalloced.

From: Ajay Garg <hidden>
Date: 2021-11-06 22:06:53
Also in: lkml

Thanks Andy, v3-patch has been posted at :
https://lore.kernel.org/linux-serial/20211106220315.392842-1-ajaygargnsit@gmail.com/T/#u (local)

Many thanks to Pavel and Andy for the review/help throughout.
Let's continue on the v3-patch thread-link.
It’s fine to add default case as I suggested. The problem with your contribution is in the commit message. Selling point would be (according to the below) the smatch complain with the idea of having default case  in general.

So something like:
===
The smatch tool gives a warning on the code in ...

warning: ...

This usually happens when switch has no default case and static analyzers and even sometimes compilers can’t prove that all possible values are covered.

...

===
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help