Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1298711rdb; Wed, 24 Jan 2024 10:32:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzIu0b7MPRjypU9EY2rRaIAXMm4OPws11jhmYhwewsxXmuRtSAnPRakq1w//BbRVam/lZB X-Received: by 2002:a05:6402:1a30:b0:559:d2db:2407 with SMTP id be16-20020a0564021a3000b00559d2db2407mr1355256edb.29.1706121171270; Wed, 24 Jan 2024 10:32:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706121171; cv=pass; d=google.com; s=arc-20160816; b=TzuebKjaU9aHIWowOKG6VbqBLik0uLWruExdegpDOzKcdsKL+bIybrSRuegVK1YuAM GDqRWLUI9vCw2HWJQwPtM0l2Xcm6QUvZ3CiOUPbUlgF3dL8QU0zJ1QmAQ/NNFZcZccHu IHIcZmSxbnY8lkNsC5oojVVBGQ4SEhyHg6VZRHTAsmtGNs4W/+UrFpsYxx/mO9gU7HEa 5XX3cSWRn445iC4kAKaaIwcXO48m6zDiGfY5GmsLgMqOGj0btlw0dJvwnfjkmubx+u1B sddvEMDGLAiXGrSFNNB8NqcLB0qVkr4ru/4yE7fBoukEw+GumTD4nJzBlRvcZ+1Cv8DC 0/mw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vaEqhiwCC6NaERNe6TMVeVGP6JVmokf1utfp4cV9z9k=; fh=likCc42lMVVmZwPQsf4mGahM9ktEpY6aj7Sd/fh7B+Q=; b=BJTpkuqiRycda7ZQbvKs7tN80fspr5wdqr0LOZOIehsBRtthyWizSDGa4UsHE7CR30 2mKhvHzsnmxfY/aJJC7IKAjk8nTQWlRanO3/on9AiDfIADPSADWTDrj1zSsPSDydY83P 0q903iQC5hbvUJWQOqjRiMsfqz/F7wbP4hUmc/EB/qLyCnxQ9u3Xq7G9846b3oqpAsUZ ZVlOaW8BwQxzuN7zXlrsRrrDpzVCLh72kIvPyv4keiHirgI8ubLPYpboPNed7W3mDP0P /+Zt2N/uMuav0/8aFlg9dm7LausS4236ViVndM3qxZOtaMqJDwYrgBlT4Bv1qGhG4Ov9 Qnug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=d7jMUbwJ; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-37516-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37516-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y7-20020a50eb07000000b0055c2380b660si3897991edp.261.2024.01.24.10.32.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 10:32:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37516-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=d7jMUbwJ; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-37516-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37516-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0C61C1F250B6 for ; Wed, 24 Jan 2024 18:32:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85EE2131727; Wed, 24 Jan 2024 18:32:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="d7jMUbwJ" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAB65130E5A; Wed, 24 Jan 2024 18:32:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706121162; cv=none; b=csPfxavfIH4389bB35aqO65fWcmsws11rlYkglDm08kegUQ5WLhaR07jRhicuego477AXtj0ukVZ0Kf7BwBCegP+MPc3+/WX4yCys5KUPyApaoxFOXRuW+4LQobAWoX8Qp6k8Mh9tYEHaFIFvlShViuKAXk8f21CVyhD47jIff0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706121162; c=relaxed/simple; bh=1ptnX18ROuZF1++MBajLh5HKvxdkkKwzGW8IoJy13AM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VXSHcucUN5GxM6+v42pZqwLOxOFkVD/GvCO2UxKPIvJnjaABjKVXva9uXgH3lzO9bqgHlRnf+hIW4pO4vWhS8YszAFf6YaK4QVIC1anN8tEVMb2Ne74lvZtTvDYJxieh2GTMFTYoPd+RBaz+8Yi2gVTYbEWXjLm3HcrAGjfltC0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=d7jMUbwJ; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 0AC5F40E01A9; Wed, 24 Jan 2024 18:32:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pm4fXtx2h_D8; Wed, 24 Jan 2024 18:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1706121154; bh=vaEqhiwCC6NaERNe6TMVeVGP6JVmokf1utfp4cV9z9k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d7jMUbwJEUTZ+kYI59q0QtfID7t0vONybXbFFqog6jM80eJpN3mLntKS5KmV0Xj0f 8TpPiOJ+dwOlWvJ6Yuh+Ti0Uz3Ei7JwqZvSyQiYtYL4jcNorMRI6Z+bwArf5pks2H8 Nx8f+XeJXchVWiDbIBXkg/hyOiFfs4nwH11+GPAQrD5BUeXomUsG4D8L3fiu91Uo43 gXYEnZM75XLpNz84jFIA/ew8w7paePlL0thVhoG7KLUCWZol02ZaNGFvAXYC/cHDqT cyAKdiNnsxxgn7ic6AhBIXo14IDfsBMikWSJWW5/9W9Z70/dENMuuA5c8ceVj/kKfJ PiTaSj34viEkzaUTNVc9JutpGVOkTps0OnE1wt/HCiBQva7wia2KuaakT6XDRbpTSN aBCTg/XE4sRgKTth3hGdHQQvQ2MWv0xLhko+tfcBHjYgzaegE4AHLA6dpOYYcFb6Bg GbXkwWIXpJyFnPcvhIAC6Ru3BriU6YcDEC+pCTMY1KmSWjGv5QFd+9xbzc1iXjusYH 08balh8wPFrA08XlDml96tzWqQal1rVZ6IeG1UBlgy8R6WZ/MxFmEXvgKMpef9amz+ prsWsIZPWjUK6qLaheRNL1z/KVPjYTYwoOtxNgHm9Pj+ApsPPevx26o9UljmA3HnFe bgcI8RCcottEYSU9XPCRfyU4= Received: from zn.tnic (pd953033e.dip0.t-ipconnect.de [217.83.3.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 28B8C40E00C5; Wed, 24 Jan 2024 18:32:00 +0000 (UTC) Date: Wed, 24 Jan 2024 19:31:53 +0100 From: Borislav Petkov To: Reinette Chatre Cc: Babu Moger , corbet@lwn.net, fenghua.yu@intel.com, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, paulmck@kernel.org, rdunlap@infradead.org, tj@kernel.org, peterz@infradead.org, yanjiewtw@gmail.com, kim.phillips@amd.com, lukas.bulwahn@gmail.com, seanjc@google.com, jmattson@google.com, leitao@debian.org, jpoimboe@kernel.org, rick.p.edgecombe@intel.com, kirill.shutemov@linux.intel.com, jithu.joseph@intel.com, kai.huang@intel.com, kan.liang@linux.intel.com, daniel.sneddon@linux.intel.com, pbonzini@redhat.com, sandipan.das@amd.com, ilpo.jarvinen@linux.intel.com, peternewman@google.com, maciej.wieczor-retman@intel.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, eranian@google.com Subject: Re: [PATCH] x86/resctrl: Fix unneeded variable warning reported by kernel test robot Message-ID: <20240124183153.GFZbFXmTKTLEpwZshW@fat_crate.local> References: <202401241810.jbd8Ipa1-lkp@intel.com> <84128a3c83654493f637b8349153af10d69e2752.1706118776.git.babu.moger@amd.com> <39c4501e-4937-49de-b12b-742e6201df6f@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <39c4501e-4937-49de-b12b-742e6201df6f@intel.com> On Wed, Jan 24, 2024 at 10:25:17AM -0800, Reinette Chatre wrote: > This can be confusing since it implies that the patch you mention > introduces the issue but instead the variable has been unneeded since > the original: > 92bd5a139033 ("x86/resctrl: Add interface to write mbm_total_bytes_config") What I said. :) > To help clarify you can mention this order of events and also add an > appropriate "Fixes:" tag. > > > cocci warnings: (new ones prefixed by >>) > >>> arch/x86/kernel/cpu/resctrl/rdtgroup.c:1621:5-8: Unneeded variable: "ret". Return " 0" on line 1655 > > > > Fix the warning by removing the variable "ret" and returning 0 directly. > > cocci warning was spot on*. This fix is not just a change to "make a > warning go away" but instead fixing an actual problem. > It can just be "Remove the unneeded variable and return 0 directly". I'll fix all up before applying. > * I'll add a private setup with the goal to catch these earlier. Except that it doesn't fire with the patch that added the code. It looks like the cocci script needs adjustment... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette