From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (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 463B717D3; Fri, 22 Dec 2023 03:33:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rGWIB-00Dgpy-KJ; Fri, 22 Dec 2023 11:33:44 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 22 Dec 2023 11:33:54 +0800 Date: Fri, 22 Dec 2023 11:33:54 +0800 From: Herbert Xu To: Gonglei Cc: linux-crypto@vger.kernel.org, mst@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, lixiao91@huawei.com, wangyangxin Subject: Re: [PATCH 2/2] crypto: virtio-crypto: Fix gcc check warnings Message-ID: References: <1702294936-61080-1-git-send-email-arei.gonglei@huawei.com> <1702294936-61080-3-git-send-email-arei.gonglei@huawei.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=us-ascii Content-Disposition: inline In-Reply-To: <1702294936-61080-3-git-send-email-arei.gonglei@huawei.com> On Mon, Dec 11, 2023 at 07:42:16PM +0800, Gonglei wrote: > > static inline int virtio_crypto_get_current_node(void) > { > - int cpu, node; > + int node; > > - cpu = get_cpu(); > - node = topology_physical_package_id(cpu); > + node = topology_physical_package_id(get_cpu()); This looks like a bogus warning. I think we should do something like this instead: diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index ae81a7191c1c..0cb43986061b 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -191,7 +191,7 @@ DECLARE_PER_CPU_READ_MOSTLY(struct cpuinfo_x86, cpu_info); #define cpu_data(cpu) per_cpu(cpu_info, cpu) #else #define cpu_info boot_cpu_data -#define cpu_data(cpu) boot_cpu_data +#define cpu_data(cpu) ((void)cpu, boot_cpu_data) #endif extern const struct seq_operations cpuinfo_op; Please send this patch to the x86 people. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt