net/sfc/base: fix name of the argument to store RSS flags
[dpdk.git] / drivers / net / sfc / base / efx_annote.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright (c) 2018 Solarflare Communications Inc.
4  * All rights reserved.
5  */
6
7 #ifndef _SYS_EFX_ANNOTE_H
8 #define _SYS_EFX_ANNOTE_H
9
10 #if defined(_WIN32) || defined(_WIN64)
11 #define EFX_HAVE_WINDOWS_ANNOTATIONS 1
12 #else
13 #define EFX_HAVE_WINDOWS_ANNOTATIONS 0
14 #endif  /* defined(_WIN32) || defined(_WIN64) */
15
16 #if defined(__sun)
17 #define EFX_HAVE_SOLARIS_ANNOTATIONS 1
18 #else
19 #define EFX_HAVE_SOLARIS_ANNOTATIONS 0
20 #endif  /* defined(__sun) */
21
22 #if !EFX_HAVE_WINDOWS_ANNOTATIONS
23
24 /* Ignore Windows SAL annotations on other platforms */
25 #define __in
26 #define __in_opt
27 #define __in_ecount(_n)
28 #define __in_ecount_opt(_n)
29 #define __in_bcount(_n)
30 #define __in_bcount_opt(_n)
31
32 #define __out
33 #define __out_opt
34 #define __out_ecount(_n)
35 #define __out_ecount_opt(_n)
36 #define __out_bcount(_n)
37 #define __out_bcount_opt(_n)
38 #define __out_bcount_part(_n, _l)
39 #define __out_bcount_part_opt(_n, _l)
40
41 #define __deref_out
42 #define __deref_inout
43
44 #define __inout
45 #define __inout_opt
46 #define __inout_ecount(_n)
47 #define __inout_ecount_opt(_n)
48 #define __inout_bcount(_n)
49 #define __inout_bcount_opt(_n)
50 #define __inout_bcount_full_opt(_n)
51
52 #define __deref_out_bcount_opt(n)
53
54 #define __checkReturn
55 #define __success(_x)
56
57 #define __drv_when(_p, _c)
58
59 #endif  /* !EFX_HAVE_WINDOWS_ANNOTATIONS */
60
61 #if !EFX_HAVE_SOLARIS_ANNOTATIONS
62
63 #if EFX_HAVE_WINDOWS_ANNOTATIONS
64
65 /*
66  * Support some SunOS/Solaris style _NOTE() annotations
67  *
68  * At present with the facilities provided in the WDL and the SAL we can only
69  * easily act upon _NOTE(ARGUNUSED(arglist)) annotations.
70  *
71  * Intermediate macros to expand individual _NOTE annotation types into
72  * something the WDK or SAL can understand.  They shouldn't be used directly,
73  * for example EFX_NOTE_ARGUNUSED() is only used as an intermediate step on the
74  * transformation of _NOTE(ARGUNSED(arg1, arg2)) into
75  * UNREFERENCED_PARAMETER((arg1, arg2));
76  */
77 #define EFX_NOTE_ALIGNMENT(_fname, _n)
78 #define EFX_NOTE_ARGUNUSED(...)         UNREFERENCED_PARAMETER((__VA_ARGS__));
79 #define EFX_NOTE_CONSTANTCONDITION
80 #define EFX_NOTE_CONSTCOND
81 #define EFX_NOTE_EMPTY
82 #define EFX_NOTE_FALLTHROUGH
83 #define EFX_NOTE_FALLTHRU
84 #define EFX_NOTE_LINTED(_msg)
85 #define EFX_NOTE_NOTREACHED
86 #define EFX_NOTE_PRINTFLIKE(_n)
87 #define EFX_NOTE_SCANFLIKE(_n)
88 #define EFX_NOTE_VARARGS(_n)
89
90 #define _NOTE(_annotation)              EFX_NOTE_ ## _annotation
91
92 #else
93
94 /* Ignore Solaris annotations on other platforms */
95
96 #define _NOTE(_annotation)
97
98 #endif  /* EFX_HAVE_WINDOWS_ANNOTATIONS */
99
100 #endif  /* !EFX_HAVE_SOLARIS_ANNOTATIONS */
101
102 #endif  /* _SYS_EFX_ANNOTE_H */