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

Re: [PATCH v3 10/14] x86/vmx: move declarations used only by vmx code from vmx.h to private headers




On 2/27/23 17:25, Jan Beulich wrote:
On 24.02.2023 19:50, Xenia Ragiadakou wrote:
--- /dev/null
+++ b/xen/arch/x86/hvm/vmx/pi.h
@@ -0,0 +1,78 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * pi.h: VMX Posted Interrupts
+ *
+ * Copyright (c) 2004, Intel Corporation.
+ */
+
+#ifndef __X86_HVM_VMX_PI_PRIV_H__
+#define __X86_HVM_VMX_PI_PRIV_H__

I can see that you need something to disambiguate the two vmx.h. But
here you don't need the PRIV infix, do you? Even in the private vmx.h
I'd like to ask to consider e.g. __VMX_H__ as the guard (and then
__PI_H__ here), rather than one which doesn't really match the
filename.

I do agree that adding _PRIV_ is off target.
For the purpose of disambiguation, the header guards need to conform to a well specified pattern guaranteed not to be used for anything else. For that reason I would suggest the guard to include the path, not just the file name. In any case, the pattern that is used to generate the header guards should be mentioned in the coding style doc.


Jan

--
Xenia



 


Rackspace

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