Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942351AbcJSO03 (ORCPT ); Wed, 19 Oct 2016 10:26:29 -0400 Received: from vader.hardeman.nu ([95.142.160.32]:52890 "EHLO hardeman.nu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941835AbcJSO0V (ORCPT ); Wed, 19 Oct 2016 10:26:21 -0400 Mime-Version: 1.0 Date: Wed, 19 Oct 2016 13:07:32 +0000 Content-Type: text/plain; charset="utf-8" Message-ID: <327f6034db9ce0c0a72947e47daf344a@hardeman.nu> X-Mailer: RainLoop/1.10.3.151 From: "=?utf-8?B?RGF2aWQgSMOkcmRlbWFu?=" Subject: Re: [PATCH 3/5] [media] winbond-cir: Move assignments for three variables in wbcir_shutdown() To: "SF Markus Elfring" , linux-media@vger.kernel.org, "Mauro Carvalho Chehab" , "Sean Young" Cc: "LKML" , kernel-janitors@vger.kernel.org, "Julia Lawall" In-Reply-To: <285954ec-280f-8a5a-5189-eb2471b4339c@users.sourceforge.net> References: <285954ec-280f-8a5a-5189-eb2471b4339c@users.sourceforge.net> <566ABCD9.1060404@users.sourceforge.net> <1d7d6a2c-0f1e-3434-9023-9eab25bb913f@users.sourceforge.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u9JEQeNM016744 Content-Length: 1260 Lines: 43 October 14, 2016 1:43 PM, "SF Markus Elfring" wrote: > From: Markus Elfring > Date: Fri, 14 Oct 2016 10:40:12 +0200 > > Move the setting for the local variables "mask", "match" and "rc6_csl" > behind the source code for a condition check by this function > at the beginning. Again, I can't see what the point is? > Signed-off-by: Markus Elfring > --- > drivers/media/rc/winbond-cir.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c > index fd997f0..9d05e17 100644 > --- a/drivers/media/rc/winbond-cir.c > +++ b/drivers/media/rc/winbond-cir.c > @@ -702,17 +702,17 @@ wbcir_shutdown(struct pnp_dev *device) > bool do_wake = true; > u8 match[11]; > u8 mask[11]; > - u8 rc6_csl = 0; > + u8 rc6_csl; > int i; > > - memset(match, 0, sizeof(match)); > - memset(mask, 0, sizeof(mask)); > - > if (wake_sc == INVALID_SCANCODE || !device_may_wakeup(dev)) { > do_wake = false; > goto finish; > } > > + rc6_csl = 0; > + memset(match, 0, sizeof(match)); > + memset(mask, 0, sizeof(mask)); > switch (protocol) { > case IR_PROTOCOL_RC5: > if (wake_sc > 0xFFF) { > -- > 2.10.1