Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947340AbdDYSPV (ORCPT ); Tue, 25 Apr 2017 14:15:21 -0400 Received: from mga05.intel.com ([192.55.52.43]:61954 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1430929AbdDYSPN (ORCPT ); Tue, 25 Apr 2017 14:15:13 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,250,1488873600"; d="scan'208";a="960975090" Message-ID: <1493144109.24567.197.camel@linux.intel.com> Subject: Re: [PATCH -next] auxdisplay: Convert list_for_each to entry variant From: Andy Shevchenko To: Wei Yongjun , Miguel Ojeda Sandonis , Greg Kroah-Hartman Cc: Wei Yongjun , linux-kernel@vger.kernel.org Date: Tue, 25 Apr 2017 21:15:09 +0300 In-Reply-To: <20170425161334.11969-1-weiyj.lk@gmail.com> References: <20170425161334.11969-1-weiyj.lk@gmail.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1214 Lines: 43 On Tue, 2017-04-25 at 16:13 +0000, Wei Yongjun wrote: > From: Wei Yongjun > > convert list_for_each() to list_for_each_entry() where > applicable. > Here it's safe to do. FWIW:  Reviewed-by: Andy Shevchenko > Signed-off-by: Wei Yongjun > --- >  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 Intel Finland Oy