Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp624051ybg; Fri, 12 Jun 2020 10:09:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyt9OqZZVy0pNKsXkK3QY9MkZnwoxFQ15rjdfOBn/XdP1a1/WzrUv5XG3BQkFu6xs1LT8+G X-Received: by 2002:a05:6402:1767:: with SMTP id da7mr12972000edb.90.1591981793686; Fri, 12 Jun 2020 10:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591981793; cv=none; d=google.com; s=arc-20160816; b=WKJ8FllLAIaYP53/Bl1qcKtSJsv2QrzeWAIwqBW//r7W+W3EiyCfOVEmLEYMoofn4W v/nZZ6Q4Iv5hB1S7Y/ykJ5xrduAcUpBY4Wj+UN9YJTV01E5D9tpl0SNsQFH7QgGMErlN 2EmEWxhNc1O47jnSeBinh6j1qdeZMNMbncLwOQUNDmtFp50eurHFTDvAdG0gxMliOaJB oCVxz8FHs5ecJvKB+PjVAwM2oghPBW0NfuRmHHaP5js3YMz93FMVLqzWv894V8/Cpocw 9bQk22aVygTzpVScWCLSoi0Ikiae+kksRFe/krzkDGpWM5BqfxW2WcT4vjzQX2pkmBVN ti/Q== 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=qjz2DxxHjX1AszTx5TAMHcOt/ERrUE8Sugt/lsPH6Xc=; b=fQekZQ7RV7MCPxUG++bLZVn9MnciOGCKK5+TOvzw58Wgrfqlj30OBKt5tPLMXvObQp GtXT2hIIsiopPdgmY94tmFhiYixLDs0g0WxOscUsVggYOQCuLVuJtSZd3aVVp5fm95te VqWpJFFMDgB2ZTQ9Iyn6Q7HVQUjLoNezEgWMiOOpTVOhawmCF9ACByCjILjZd169plrS D02m4SgLUEytooFOTsL4LWnZ88gFAZrmSr7QAIe1Cqm9dMzWafmxECe0RO/mzJj0FbaN 2BW96Sm8YNug+93dNeV+cK7alQqOdWP3xlGbTw+wKaHb/nwHv3MbVFEr6sr/V1CMDRVd T3zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Vj26xR7Z; 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 s9si4175005ejq.422.2020.06.12.10.09.30; Fri, 12 Jun 2020 10:09:53 -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=Vj26xR7Z; 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 S1726586AbgFLREc (ORCPT + 99 others); Fri, 12 Jun 2020 13:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726290AbgFLREb (ORCPT ); Fri, 12 Jun 2020 13:04:31 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8AE5C03E96F; Fri, 12 Jun 2020 10:04:31 -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=qjz2DxxHjX1AszTx5TAMHcOt/ERrUE8Sugt/lsPH6Xc=; b=Vj26xR7ZuawPvLWBqn3Dp7Z/mB foePpiqYcNhO/KOnBf/9iVcaLzEmkioc4Vm9ZD1wyER2Zzvq5pUWbKqqXFLQJcL+aGKSiVn8GQEOQ dKHKcTEMFs/Oisp9/YgzxjMle8ejH68iA5Wwye7yq20NCS5mtAUPpCLK9QFQ0h8kKRTJFhNqOBxTk 65Elfcmjbp3UkrHCBikiH8bgGRkwpzVrlrehDRPnO//TfYrLCQa0d7a67Di4dTtogpUVDnrR1OTTQ xaZwNSkUE7I2J2OLiQosgQKBmF5Z5aI26Ty87WT2jjjf41RN5tExvTYvqc1I+f8lHFO4cZfcRYHMv ajEoWyOQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jjn6V-00048n-8I; Fri, 12 Jun 2020 17:04:31 +0000 Date: Fri, 12 Jun 2020 10:04:31 -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: <20200612170431.GG8681@bombadil.infradead.org> References: <20200612160946.21187-1-pilgrimtao@gmail.com> <7fdada40-370d-37b3-3aab-bfbedaa1804f@web.de> <20200612170033.GF8681@bombadil.infradead.org> <80794080-138f-d015-39df-36832e9ab5d4@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <80794080-138f-d015-39df-36832e9ab5d4@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 07:03:49PM +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. > > Would you like to clarify concrete software development ideas? Yes. Learn something deeply, then your opinion will have value.