Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1921886pxu; Sun, 13 Dec 2020 07:40:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXLB5h85LU1yjPO9KCzdg3sDzARLIbfNgfgf2GKJJ9yxDTPtOFH2u5kzmNtIym39Lx+Ks+ X-Received: by 2002:a50:9e8b:: with SMTP id a11mr20738849edf.276.1607874003505; Sun, 13 Dec 2020 07:40:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607874003; cv=none; d=google.com; s=arc-20160816; b=LY0C6bL1XDK7VBIFLuhHQuf3J4IisHuYcEkJ/UBSNjtFBYrzvkNKVbTH3miinZ3tCK yDO0p3oCMegbDduwgZjTPJpiKDJ67ubXezC5V1PIMfDWCFq6wZp7lE0ZN/0S1JZ8mFMS 9gp45Hz4lOKrALMfJU2uJ5WMpB3Ogu3p3Hfp095Z1QCJXcyifXnGnhxZrgk9NkyRNpQO UCvZvrzXd/GYbkuhLaFIJ/2DwrG9P4cSLNOK+PYC7QCtrRCl1w2/6Zmv4O6XYTdfbFxN q2ZlXC2R/HZgNjUAy39EQerKxmYXxdi5pZzt/ygJ1bwSydclztpYNq+bTIPOFDt8Blig qWwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VzmQQkhXxv+kSR88ya5UY3L6cHVIXttZdGOZSgMUji4=; b=dj6MqNXd8hOsuMRMjWpUCJt93rHOWDNidpsoxUxE8uQptKX0huGuGqWpj5XF9Yq4F4 lI8mXhGrLI0nsHkb5V7kkDOkZ6G68r7pgqoWf3RfQ6gqyGPLtwa8Q+kPHKGnYRDSNfl5 rZvoh7SFO5H8N9gJwvY0B2JuiDSuNMp5i3tKT3bBJcwrc0P6U2lDNPtFYz2tWPaIvUnz 0XFPZf15QzusVMgZqf+6bsdW36QLE7xm1th2T+Ob6ZTLQsfBzaawTap835RQhaF7avlK sduZf8lTK6V7GgrSSUkelsGa1TCJ4pMjWfeoR/rwV6SoYx6g0yDXKSbqjZeukAEfgQ59 2zEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf25si7901405ejb.303.2020.12.13.07.39.40; Sun, 13 Dec 2020 07:40:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406369AbgLLNSN (ORCPT + 99 others); Sat, 12 Dec 2020 08:18:13 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:42241 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbgLLNSL (ORCPT ); Sat, 12 Dec 2020 08:18:11 -0500 X-Greylist: delayed 159006 seconds by postgrey-1.27 at vger.kernel.org; Sat, 12 Dec 2020 08:18:11 EST X-Originating-IP: 86.194.74.19 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id AE282FF804; Sat, 12 Dec 2020 13:17:27 +0000 (UTC) Date: Sat, 12 Dec 2020 14:17:27 +0100 From: Alexandre Belloni To: Joe Perches Cc: Markus Elfring , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ludovic Desroches , Nicolas Ferre , Ulf Hansson , LKML , kernel-janitors@vger.kernel.org, Colin Ian King , Dan Carpenter Subject: Re: mmc: atmel-mci: Reduce =?utf-8?Q?scope?= =?utf-8?Q?_for_the_variable_=E2=80=9Cslot=E2=80=9D?= in atmci_request_end() Message-ID: <20201212131727.GL1781038@piout.net> References: <466b4c6d-032f-fbcc-58ac-75f6f39d734f@web.de> <20201210151035.GC1578121@piout.net> <20201210170723.GD1578121@piout.net> <2667790c-fad2-aaa9-36e8-6be66949ac8d@web.de> <20201210182150.GE1578121@piout.net> <4c0d8efe-de25-f168-8b8d-b7f1ede6c6b1@web.de> <20201211080301.GC1781038@piout.net> <031a64e4261e1543a136d737436abefd63dbaee1.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <031a64e4261e1543a136d737436abefd63dbaee1.camel@perches.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/12/2020 01:16:39-0800, Joe Perches wrote: > On Fri, 2020-12-11 at 09:03 +0100, Alexandre Belloni wrote: > > On 11/12/2020 07:34:41+0100, Markus Elfring wrote: > > > > > How do you think about a patch like “staging: speakup: remove redundant initialization > > > > > of pointer p_key” for comparison? > > > > > https://lore.kernel.org/patchwork/patch/1199128/ > > > > > https://lore.kernel.org/driverdev-devel/20200223153954.420731-1-colin.king@canonical.com/ > > > > > > > > > > Would you tolerate to omit the initialisation for the variable “slot”? > > > > > > > > If you were able to provide one good technical reason. > > > > > > I find that the positions of variable definitions (and similar assignments) influence > > > the generation of executable code. > > > > > And you are wrong, it doesn't. > > I rarely reply or read any Markus' emails as everything > from Markus goes into a 'don't read' folder but I was cc'd > directly on one from someone else recently so I think I > should reply to this one too. > > In this case Alexandre it seems true, but in the generic case > it may be false. It may depend on stack size and location. > > For instance, with large structs declared either at the top > of a function or in separate branches within the function: > I think you realize your example is way more complicated than initializing basic type variable to 0 or NULL which has probably been optimized forever. This patch is just unnecessary churn that was generated without giving any thought. It was easy to check whether the patch actually improved anything. It doesn't and makes readability worse. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com