[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 4/6] xen: refactor include guards


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Date: Fri, 16 May 2025 17:10:05 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aGrahaZmw62enb+JyxIjlzeO4SXgBzF+7p04fVlxdwA=; b=KlyRAbyLSQnsxwUYv+u7+H7+6NUr1qu2vFTAPvy9PllkVHtF6rGZZORJCsmb7kmU8qJ8j382ji+DsR8DqzwflP63CmJVRaARnfrRq2AbEzAMOjTfIrEhnCF5iCllsbcagQ3T/7c8UokVZWBcWmC1j1RWxh9qXQ8qvLdNFhSa6vao8oGFd55mlKCbcU04dCklPji8nmfdczXQKO4oQ+gwDVbWNZQlSOb5MEnBLg+YUZtzAmh3+PAS3V84BeaQ7OAZvBt8ErQvGK6SOzv75v9oRNXal6eppjFQKtSRVq7pOZ24Q425PleSnCj9v6gM2R2V60u7vOiT8i5y3CYQT8USOA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=buAAEHRU1YORHJJuiu/nB4rf5mkgP0keKqv38GgoNQsE2oWhm4J5vveH+vRnEAchf1ZDFK+fqpGGKW0EvdxUDsQEqRWrDWqcQfzCA9AQup2we/6ck3FaL7PgBSvFThM1RJqcLVQ8OZLCdOvDjEe0kafoY2QVget28omJlYvgvukciiw6hCDYnfuq+IPfPy2Y20bQTM2Q60bq2jJeJN8jVCApZuE3vucfrWTzg+LD5EroGDCtXnXuKLRAmpu4zYEpiyoGaeDBOnnKhao8FHgrMWYYOYF8aryC6bjxK4Rezx+NXngXRf6hiMSRDJWqtZFHVdskWQiKF6GcOb2E6+xq2A==
  • Cc: <andrew.cooper3@xxxxxxxxxx>, <michal.orzel@xxxxxxx>, <jbeulich@xxxxxxxx>, <julien@xxxxxxx>, <roger.pau@xxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <bertrand.marquis@xxxxxxx>, Federico Serafini <federico.serafini@xxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Sat, 17 May 2025 00:10:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Federico Serafini <federico.serafini@xxxxxxxxxxx>

Refactor inclusion guards:
1) use a syntax that is more likely to be recognized by static
   analyzers;
2) follow the CODING_STYLE.

No functional change.

Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
---
Changes in v2:
- use normal #ifndef
---
 xen/include/xen/err.h     | 10 +++++++---
 xen/include/xen/softirq.h | 10 +++++++---
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/xen/include/xen/err.h b/xen/include/xen/err.h
index cbdd1bf7f8..a5971e290c 100644
--- a/xen/include/xen/err.h
+++ b/xen/include/xen/err.h
@@ -1,5 +1,7 @@
-#if !defined(__XEN_ERR_H__) && !defined(__ASSEMBLY__)
-#define __XEN_ERR_H__
+#ifndef XEN_ERR_H
+#define XEN_ERR_H
+
+#ifndef __ASSEMBLY__
 
 #include <xen/compiler.h>
 #include <xen/errno.h>
@@ -41,4 +43,6 @@ static inline int __must_check PTR_RET(const void *ptr)
        return IS_ERR(ptr) ? PTR_ERR(ptr) : 0;
 }
 
-#endif /* __XEN_ERR_H__ */
+#endif /* __ASSEMBLY__ */
+
+#endif /* XEN_ERR_H */
diff --git a/xen/include/xen/softirq.h b/xen/include/xen/softirq.h
index 33d6f2ecd2..e9f79ec0ce 100644
--- a/xen/include/xen/softirq.h
+++ b/xen/include/xen/softirq.h
@@ -1,5 +1,7 @@
-#if !defined(__XEN_SOFTIRQ_H__) && !defined(__ASSEMBLY__)
-#define __XEN_SOFTIRQ_H__
+#ifndef XEN_SOFTIRQ_H
+#define XEN_SOFTIRQ_H
+
+#ifndef __ASSEMBLY__
 
 /* Low-latency softirqs come first in the following list. */
 enum {
@@ -40,4 +42,6 @@ void cpu_raise_softirq_batch_finish(void);
  */
 void process_pending_softirqs(void);
 
-#endif /* __XEN_SOFTIRQ_H__ */
+#endif /* __ASSEMBLY__ */
+
+#endif /* XEN_SOFTIRQ_H */
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.