Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp618579ybg; Fri, 12 Jun 2020 10:02:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDPyid9OTj2E9qrEoTCYkMBBy9rt0EQ1foI+m3p6jPu+g8RewGSEPiFqwUYV1HhIKbP+y/ X-Received: by 2002:a17:906:556:: with SMTP id k22mr13698795eja.115.1591981371531; Fri, 12 Jun 2020 10:02:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591981371; cv=none; d=google.com; s=arc-20160816; b=H0cOfqvtR5KBWjM+WKtxWwPmf/FMyRg5Ehn7HbGCPWOx8nYdYD9GwGGwAseK2YB4pF 5IU2IWQCcANXbhwo49/yN5cjqo7xKORpwqmM+06aJqrxbPwGIg5Lj5XevNdhnzjQX936 Esvb4qsrMreSATCPKqgX2bZL3tJApVBCknpo3McAl5sXWFpPMiwebN/WG3eZ9vLygKoB HyZKqAYslxPEx2UxekQ5VtrknmVwwQkD1dReqQnEcIEh8wT+VNs84inZcbTpQHo/0mqP btEB/WAGvZ4XBZpN70cpv/CCOW7T0LJuFhTEDDvYBBK0XKceW4O7OFmC6UmuqTixyazG uXdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LB92fBYU7FIFr1cqrh9b2+gYP6egb7aYQX2MBBJTLlQ=; b=TDrjuqx2Si2wZcYnp/5dErG1C4MAgpWjcyIR2Fjmw3jdRTYniAWifvwI4sWh5Bt9Gy fkMk0hXwCzK7OmYQo4kDbFBQq6melJowrsL2SBjepT59uQrRFecAN0j3T1xJygYg3MVh M/mguVWWkDSTuIgVZT8vY4h7Lfxabk5My5FBgDTz35f+d5kTgehAAywfGrwOgZlYfvPk wVojM64xk1ULRdMGBu7eAJNjlYv2pHBPZCT2mI4IlaGv/LYjcrrM5D6ylaAO6Cnm+6xd 2KCguij7bOBwjJgWlexMwe/uXV214jRI58yDB6DdE0aAR9Q1Bk+4zp5yuPfwTYz3usqw kZ/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PqGggWcK; 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 do11si5903394ejc.450.2020.06.12.10.02.27; Fri, 12 Jun 2020 10:02:51 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PqGggWcK; 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 S1726306AbgFLRAf (ORCPT + 99 others); Fri, 12 Jun 2020 13:00:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbgFLRAe (ORCPT ); Fri, 12 Jun 2020 13:00:34 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D7D9C03E96F; Fri, 12 Jun 2020 10:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=LB92fBYU7FIFr1cqrh9b2+gYP6egb7aYQX2MBBJTLlQ=; b=PqGggWcKugbvK/p3Jmkq4v0f8f KodxE7sDJyvfzUdXYv8y080mGvzFWv0kNg5UbIfwicX/DwYaihiSS5+HrqITy87E0feUrHX3Q04qE ekGgI0+EtkN+ikT7CMSYl1OK7QA6stAMGYW5Z93Zjinl+3ex5oipfh6uGbdQuwCSL5Bqei1POdAJn pXdm8qMeFvqWVkJxlO6EyrRk1rD5Qldo80dJ5YT1xgrp/GxGRwu9ZMSko7Ri6Rc0X0FtkowJ0b+IU ADWVlfdxoI6/2hMjSgxHYHHdIrvZOD4J0EXwOEhW8S6oPP4cSVqQxpaSRB4y6v3oSyleuWbGzZDC5 xs62Ebjg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jjn2f-0003nu-It; Fri, 12 Jun 2020 17:00:33 +0000 Date: Fri, 12 Jun 2020 10:00:33 -0700 From: Matthew Wilcox To: Markus Elfring Cc: Kaitao Cheng , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Alexey Dobriyan , Colin Ian King , Muchun Song Subject: Re: [PATCH v2] proc/fd: Remove unnecessary variable initialisations in seq_show() Message-ID: <20200612170033.GF8681@bombadil.infradead.org> References: <20200612160946.21187-1-pilgrimtao@gmail.com> <7fdada40-370d-37b3-3aab-bfbedaa1804f@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7fdada40-370d-37b3-3aab-bfbedaa1804f@web.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 12, 2020 at 06:45:57PM +0200, Markus Elfring wrote: > > 'files' will be immediately reassigned. 'f_flags' and 'file' will be > > overwritten in the if{} or seq_show() directly exits with an error. > > so we don't need to consume CPU resources to initialize them. > > I suggest to improve also this change description. > > * Should the mentioned identifiers refer to variables? > > * Will another imperative wording be preferred? > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=b791d1bdf9212d944d749a5c7ff6febdba241771#n151 > > * I propose to extend the patch a bit more. > How do you think about to convert the initialisation for the variable “ret” > also into a later assignment? Please stop commenting on people's changelogs. You add no value.