All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef
@ 2021-10-12 14:52 Ian Jackson
  2021-10-12 15:02 ` Anthony PERARD
  2021-10-12 15:06 ` [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef Juergen Gross
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Jackson @ 2021-10-12 14:52 UTC (permalink / raw)
  To: xen-devel; +Cc: iwj, Wei Liu, Anthony PERARD, Juergen Gross

We don't use ifdefs in the main code.  Actually document this.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
 tools/libs/light/CODING_STYLE | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/libs/light/CODING_STYLE b/tools/libs/light/CODING_STYLE
index 3d572f6925..c2342c9d3b 100644
--- a/tools/libs/light/CODING_STYLE
+++ b/tools/libs/light/CODING_STYLE
@@ -121,6 +121,16 @@ permitted exceptions to the usual libxl code formatting rules.
 
 
 
+ARCHITECTURE-SPECIFIC CODE, CONDITIONAL COMPILATION
+---------------------------------------------------
+
+Architecture-specific code should be isolated in libxl_<arch>.c,
+with a function call interface, whereever possible.
+
+#ifdefs should be avoided, and in any case not interspersed through
+the primary functional code.
+
+
 IDEMPOTENT DATA STRUCTURE CONSTRUCTION/DESTRUCTION
 --------------------------------------------------
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef
  2021-10-12 14:52 [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef Ian Jackson
@ 2021-10-12 15:02 ` Anthony PERARD
  2021-10-13 14:11   ` [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef [and 1 more messages] Ian Jackson
  2021-10-12 15:06 ` [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef Juergen Gross
  1 sibling, 1 reply; 4+ messages in thread
From: Anthony PERARD @ 2021-10-12 15:02 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Wei Liu, Juergen Gross

On Tue, Oct 12, 2021 at 03:52:26PM +0100, Ian Jackson wrote:
> We don't use ifdefs in the main code.  Actually document this.
> 
> Signed-off-by: Ian Jackson <iwj@xenproject.org>
> ---
>  tools/libs/light/CODING_STYLE | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/tools/libs/light/CODING_STYLE b/tools/libs/light/CODING_STYLE
> index 3d572f6925..c2342c9d3b 100644
> --- a/tools/libs/light/CODING_STYLE
> +++ b/tools/libs/light/CODING_STYLE
> @@ -121,6 +121,16 @@ permitted exceptions to the usual libxl code formatting rules.
>  
>  
>  
> +ARCHITECTURE-SPECIFIC CODE, CONDITIONAL COMPILATION
> +---------------------------------------------------
> +
> +Architecture-specific code should be isolated in libxl_<arch>.c,
> +with a function call interface, whereever possible.

s/whereever/wherever/ ?

> +
> +#ifdefs should be avoided, and in any case not interspersed through
> +the primary functional code.
> +
> +
>  IDEMPOTENT DATA STRUCTURE CONSTRUCTION/DESTRUCTION
>  --------------------------------------------------
>  

Sounds good,

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

-- 
Anthony PERARD


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef
  2021-10-12 14:52 [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef Ian Jackson
  2021-10-12 15:02 ` Anthony PERARD
@ 2021-10-12 15:06 ` Juergen Gross
  1 sibling, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2021-10-12 15:06 UTC (permalink / raw)
  To: Ian Jackson, xen-devel; +Cc: Wei Liu, Anthony PERARD


[-- Attachment #1.1.1: Type: text/plain, Size: 221 bytes --]

On 12.10.21 16:52, Ian Jackson wrote:
> We don't use ifdefs in the main code.  Actually document this.
> 
> Signed-off-by: Ian Jackson <iwj@xenproject.org>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef [and 1 more messages]
  2021-10-12 15:02 ` Anthony PERARD
@ 2021-10-13 14:11   ` Ian Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2021-10-13 14:11 UTC (permalink / raw)
  To: Juergen Gross, Anthony PERARD; +Cc: Ian Jackson, xen-devel, Wei Liu

Anthony PERARD writes ("Re: [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef"):
> On Tue, Oct 12, 2021 at 03:52:26PM +0100, Ian Jackson wrote:
> > +Architecture-specific code should be isolated in libxl_<arch>.c,
> > +with a function call interface, whereever possible.
> 
> s/whereever/wherever/ ?

Fixed, thanks.

> Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Juergen Gross writes ("Re: [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef"):
> Reviewed-by: Juergen Gross <jgross@suse.com>

And committed.

Thanks,
Ian.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-13 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 14:52 [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef Ian Jackson
2021-10-12 15:02 ` Anthony PERARD
2021-10-13 14:11   ` [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef [and 1 more messages] Ian Jackson
2021-10-12 15:06 ` [PATCH] libxl: CODING_STYLE: Explicitly deprecate #ifdef Juergen Gross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.