From: Gustavo A. R. Silva <hidden> Date: 2017-10-30 22:47:18
container_of is never null, so this null check is unnecessary.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <redacted>
---
net/caif/chnl_net.c | 2 --
1 file changed, 2 deletions(-)
From: Gustavo A. R. Silva <hidden> Date: 2017-10-30 23:33:40
Hi,
Quoting "Gustavo A. R. Silva" [off-list ref]:
quoted hunk
container_of is never null, so this null check is unnecessary.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <redacted>
---
net/caif/chnl_net.c | 2 --
1 file changed, 2 deletions(-)
From: Gustavo A. R. Silva <hidden> Date: 2017-10-31 02:34:01
Quoting "Gustavo A. R. Silva" [off-list ref]:
Hi,
Quoting "Gustavo A. R. Silva" [off-list ref]:
quoted
container_of is never null, so this null check is unnecessary.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <redacted>
---
net/caif/chnl_net.c | 2 --
1 file changed, 2 deletions(-)
Please, ignore this patch.
I just realized that function chnl_recv_cb is being called only
during initialization:
chnl_init_module() -> rtnl_link_register() -> ipcaif_net_setup() ->
chnl_recv_cb():
Well, here ipcaif_net_setup stores a pointer to chnl_recv_cb in a
structure. It doesn't call it.
From: Gustavo A. R. Silva <hidden> Date: 2017-10-31 04:12:12
Quoting "Gustavo A. R. Silva" [off-list ref]:
Quoting "Gustavo A. R. Silva" [off-list ref]:
quoted
Hi,
Quoting "Gustavo A. R. Silva" [off-list ref]:
quoted
container_of is never null, so this null check is unnecessary.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <redacted>
---
net/caif/chnl_net.c | 2 --
1 file changed, 2 deletions(-)
But the driver only passes in to container_of the type of driver
structure registered with it. So this type of manipulation must be
completely safe. Right?
Now it seems to me (again) that the patch is fine.
I'm sorry, I'm a little bit confused here.
Please, ignore this patch.
I just realized that function chnl_recv_cb is being called only
during initialization:
chnl_init_module() -> rtnl_link_register() -> ipcaif_net_setup() ->
chnl_recv_cb():
Well, here ipcaif_net_setup stores a pointer to chnl_recv_cb in a
structure. It doesn't call it.