| 91aad625 | 24-Sep-2020 |
Bartosz Golaszewski <[email protected]> |
samples: configfs: don't reinitialize variables which are already zeroed
The structure containing the storeme field is allocated using kzalloc(). There's no need to set it to 0 again.
Signed-off-by
samples: configfs: don't reinitialize variables which are already zeroed
The structure containing the storeme field is allocated using kzalloc(). There's no need to set it to 0 again.
Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
show more ...
|
| e0ee1fdb | 24-Sep-2020 |
Bartosz Golaszewski <[email protected]> |
samples: configfs: drop unnecessary ternary operators
Checking pointers for NULL value before passing them to container_of() is pointless because even if we return NULL from the ternary operator, no
samples: configfs: drop unnecessary ternary operators
Checking pointers for NULL value before passing them to container_of() is pointless because even if we return NULL from the ternary operator, none of the users checks the returned value but they instead dereference it unconditionally. AFAICT this cannot really happen either. Simplify the code by removing the ternary operators from to_childless() et al.
Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
show more ...
|