Thread (6 messages) 6 messages, 2 authors, 2021-06-18

Re: [PATCH -next] cifsd: fix WARNING: convert list_for_each to entry variant in smb2pdu.c

From: Dan Carpenter <hidden>
Date: 2021-06-18 08:19:50
Also in: kernel-janitors

On Fri, Jun 18, 2021 at 03:47:12PM +0800, libaokun (A) wrote:
在 2021/6/18 13:14, Dan Carpenter 写道:
quoted
On Fri, Jun 18, 2021 at 09:44:37AM +0800, libaokun (A) wrote:
quoted
I don't know what the difference is between

list_for_each_entry() and list_for_each() for 'struct channel *chann',

but I don't think there's any difference here.
Correct.  There is no difference, but Coccinelle is smart enough to
parse list_for_each_entry() and it's not smart enough to parse
list_for_each().
quoted
Would you give me more detial about this, please?
There is a Coccinelle script scripts/coccinelle/iterators/itnull.cocci
which will complain about the NULL check in the new code so this patch
will introduce a new warning.  We may as well remove the unnecessary
NULL check and avoid the warning.

regards,
dan carpenter

.
I get your point, but this bug has nothing to do with my patch.

It's  from e2f34481b24d(cifsd: add server-side procedures for SMB3).
Fine, but when Hulk Robot reports the new warning and someone fixes it,
I'm going to insist that the Fixes tag points to your patch.  ;)

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