auxdisplay: Convert list_for_each to entry variant
Subsystems (2)
PATCH 1/1 auxdisplay: Convert list_for_each to entry variant
From: Wei Yongjun <[email protected]>
convert list_for_each() to list_for_each_entry() where applicable.
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/auxdisplay/panel.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/auxdisplay/panel.c +1 -4
@@ -1345,14 +1345,11 @@ static inline void input_state_falling(struct logical_input *input)static void panel_process_inputs (void ) { -struct list_head *item;struct logical_input *input; keypressed =0 ; inputs_stable =1 ; -list_for_each (item, &logical_inputs) { - input = list_entry(item, struct logical_input, list); - +list_for_each_entry (input, &logical_inputs, list) {switch (input->state) {case INPUT_ST_LOW :if ((phys_curr & input->mask) != input->value)
Quoted 5 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
convert
list_for_each()tolist_for_each_entry()where applicable.
Here it's safe to do.
FWIW:
Reviewed-by Andy Shevchenko <[email protected]>
Quoted 28 lines
Signed-off-by Wei Yongjun <[email protected]>---
drivers/auxdisplay/panel.c | 5 +----1 file changed, 1 insertion(+), 4 deletions(-)drivers/auxdisplay/panel.c +0
-0@@ -1345,14 +1345,11 @@ static inline void input_state_falling(struct logical_input *input)
static voidpanel_process_inputs(void)
{drivers/auxdisplay/panel.c +0
-1-struct list_head *item;struct
logical_input*input;
keypressed = 0;
inputs_stable= 1;drivers/auxdisplay/panel.c +1
-3-list_for_each (item, &logical_inputs) { - input = list_entry(item, struct logical_input, list); - +list_for_each_entry (input, &logical_inputs, list) {switch (
input->state) {
caseINPUT_ST_LOW:
if ((phys_curr&input->mask) != input-Quoted 1 line
value)
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy