From nobody Fri Oct 31 04:01:22 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1749078635; cv=none; d=zohomail.com; s=zohoarc; b=Kb6+U/QJPFm/u9Y+ujG5gHJGhmE8X9wji37Zfu5eG22tWiXnzyAzYD3Qt5PgRhAivqbuys6FWCO3tTBijHqJu8rJWytTxT70CJudQPNLPJYpbxwMqaMZWJ9nUdb7/9i9KuCBH5H7h8Urwm97wvhRRO7NPoa/nCzaoXWHrINZaLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749078635; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YtmjHVzZPNZDkcIfTes7DktHFTWQe+tKrKtaku2lNFo=; b=kVW9xXaNLRlL6IZRqO73u9a4DbiddrbibnRpw9C5gW2WzOuYoxyq9cvR/vwy4Mw3GPATI4KbXaR740I216ZGHJV9XtZfZTbyie17sXkRA3yVtEnVJlNvJBeQ5ydibnZtLEQebFf+5F0jAvH/aAU/s1yTEr6mdIP744YwsThcpCA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1749078635211723.2623190104416; Wed, 4 Jun 2025 16:10:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1006005.1385276 (Exim 4.92) (envelope-from ) id 1uMxFF-00068x-Od; Wed, 04 Jun 2025 23:10:05 +0000 Received: by outflank-mailman (output) from mailman id 1006005.1385276; Wed, 04 Jun 2025 23:10:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uMxFF-00068M-MA; Wed, 04 Jun 2025 23:10:05 +0000 Received: by outflank-mailman (input) for mailman id 1006005; Wed, 04 Jun 2025 23:10:04 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uMxFE-0005oG-12 for xen-devel@lists.xenproject.org; Wed, 04 Jun 2025 23:10:04 +0000 Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 0a761421-4199-11f0-b894-0df219b8e170; Thu, 05 Jun 2025 01:10:01 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 4D4B761139; Wed, 4 Jun 2025 23:10:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 008B8C4CEE4; Wed, 4 Jun 2025 23:09:58 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0a761421-4199-11f0-b894-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749078600; bh=9hPBLa6j3nmZiASL002dh5+4P4fO7fZUVLERjQNoOek=; h=Date:From:To:cc:Subject:From; b=RW9Lrgm9o3ErOnQzUfWj1aEmj547mXpmBm4/gXmZi3ny9trmzaWvBDvHet4aLC5is 3n5iw8VE2lEA9V6OBWwi1AwVOgZuz0MJWPBhzEH8ejFt+t19Zf7B7BCNrO1PaBxFQO 2jGuWB1tsTZp1fBf2qFOuZfVZDNt3m2hb779Yb2HrWA2BNPHBnVIIurxF0JybRWQZ9 6OJIMxnolgYX/Nx2K6nTGD0WEbzUEiH5HJ2MSqCLC7UCeCLXnUN9gO3zdzB3s1T1zF jYib+gYSTDYoXYWnEOlPEVv2eV4jjlsS1mXyh4scBciP9kPa3jkWE7kCxn63aqlimF 2Foy237COEfGg== Date: Wed, 4 Jun 2025 16:09:57 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: sstabellini@kernel.org, andrew.cooper3@citrix.com, anthony.perard@vates.tech, michal.orzel@amd.com, jbeulich@suse.com, julien@xen.org, roger.pau@citrix.com Subject: [PATCH] xen: add header guards to generated asm generic headers Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1749078635938116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" MISRA D4.10 requires to have proper header guards in place in all header files. Add header guards for generated asm generic headers as well. Suggested-by: Jan Beulich Signed-off-by: Stefano Stabellini diff --git a/xen/scripts/Makefile.asm-generic b/xen/scripts/Makefile.asm-ge= neric index b0d356bfa3..a44844bed0 100644 --- a/xen/scripts/Makefile.asm-generic +++ b/xen/scripts/Makefile.asm-generic @@ -32,7 +32,12 @@ old-headers :=3D $(wildcard $(obj)/*.h) unwanted :=3D $(filter-out $(generic-y) $(generated-y),$(old-headers)) =20 quiet_cmd_wrap =3D WRAP $@ - cmd_wrap =3D echo "\#include " > $@ + cmd_wrap =3D \ + upper=3D$$(echo $*.h | tr a-z A-Z | tr '/.' '__'); \ + printf "\#ifndef ASM_GENERIC_$${upper}\n" > $@; \ + printf "\#define ASM_GENERIC_$${upper}\n" >> $@; \ + printf "\#include \n" >> $@; \ + printf "\#endif /* ASM_GENERIC_$${upper} */\n" >> $@ =20 quiet_cmd_remove =3D REMOVE $(unwanted) cmd_remove =3D rm -f $(unwanted)