lkml.org 
[lkml]   [2017]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH -next] auxdisplay: Convert list_for_each to entry variant
From
Date
On Tue, 2017-04-25 at 16:13 +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> convert list_for_each() to list_for_each_entry() where
> applicable.
>

Here it's safe to do.
FWIW: 
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/auxdisplay/panel.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
> index e0c014c..7a8b8fb 100644
> --- a/drivers/auxdisplay/panel.c
> +++ b/drivers/auxdisplay/panel.c
> @@ -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)
>

--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2017-04-25 20:16    [W:0.183 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site