Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938787AbcJSOO2 (ORCPT ); Wed, 19 Oct 2016 10:14:28 -0400 Received: from mout.web.de ([212.227.15.14]:50218 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938725AbcJSOOW (ORCPT ); Wed, 19 Oct 2016 10:14:22 -0400 Subject: Re: [media] winbond-cir: Move assignments for three variables in wbcir_shutdown() To: =?UTF-8?Q?David_H=c3=a4rdeman?= , linux-media@vger.kernel.org References: <3c96d0bf-62fa-6b02-2a2d-2a097709271a@users.sourceforge.net> <285954ec-280f-8a5a-5189-eb2471b4339c@users.sourceforge.net> <566ABCD9.1060404@users.sourceforge.net> <1d7d6a2c-0f1e-3434-9023-9eab25bb913f@users.sourceforge.net> <327f6034db9ce0c0a72947e47daf344a@hardeman.nu> <10715e71c46bda76f6c8654675062f61@hardeman.nu> Cc: Mauro Carvalho Chehab , Sean Young , LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <213df5d7-1c5a-496d-9928-bdafefce8781@users.sourceforge.net> Date: Wed, 19 Oct 2016 16:14:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <10715e71c46bda76f6c8654675062f61@hardeman.nu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:AEBUciitiBr7S0oeDumrpWNNjb9BWBNo2/w2n0l7GrLzgmZFQlz Rme7ijQjKshh8tGad2kozHEibj5p36+V3NSvS7P6vWLhNAUEvFXZUi7OuOppC3N3/UfkjEc cnvbXDUGy9HlJo0jM8RSEqaTv6K5c0hjjVu6g1pcqqhv9s7GFF2h/fZJsN2gKOjmg98ZAW5 /cJfvAlarOcmACXNU6/3Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:VdLSfGpIkFY=:Ckch43Z+lIhzaPS8fh+Lh4 ex+xUb0VJ6FXxuigGTIjCoLZ554PW7wgHFLSgxomMJ5JbkSyY3ju1y4oUB6xlOI0o2vK5Yejb Otqw9d8t/tehSTW24iaJcsjcX5ibkaRq16ByUHTbtnFx0LyFuzJ27V2tV7UgI6/R44Ca0485u I0H6oXKRpsilB4ZoZOFn7HmNv9jcD9f4fdcehwpivU+V3fbY25M+qiJiBwSi3Bh4Vy9XqoP9u teuBLdUJvlg5lDqzOnUgj3rxVnlmW1G7anlgkibGrVZoXCaFslBAHaLu1b+NR9pwkvJ7bKyPy NyxaKM8xyLzPxOtYWT+TENr7q2HJFygJKTa8zwgDCNUsNTe/1VMEMIyCRKfzSASBQln99kg6a REUq0033zMb3ZxRst+Wa6u6vPbri0GjiUGoec6vMv5OANgoJFQ0iL8kOk7uj58xbX2eIvnp/5 sHbvgn1Ax+O4oKCpzQZy5HgyI9DBhvJlt1pbr1VpZqDNCvHHMzAoqqdFZXKWljCSZtSiFV+1V v4HPhQ2f0VgpvCa2cE4/0fPSMoE6exZQw9OwheQB0cUVyFzcucv8HvJ9LvnXizZIL7lwhZN2d 58s0cugxHBAcqQuBwJFj/+hCiRLomsdGpUaSxKMiXT1RugJSXpB/Lxj+3m+AjMvdILdxrU58H oDQb3jCHHqtx3CJoPAX12+rxbvJGz3xz9mOPEoGAXFShRY89Da8uqFt6M1ZWitvjwz+jFzQ1D aqyzDyA5ajR52EAn44CoOVqFnczeNfrIRC6bZ8WsWh1fn/NFH7fjM8qOc5Kd6coVTbohGSgku M8sVre8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 600 Lines: 18 >>>> 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? >> >> * How do you think about to set these variables only after the initial >> check succeded? > > I prefer setting variables early so that no thinking about > whether they're initialized or not is necessary later. * How do you think about to reduce the scope for these variables then? * Would you dare to move the corresponding source code into a separate function? Regards, Markus