search for: __virtio_native_typeof

Displaying 8 results from an estimated 8 matches for "__virtio_native_typeof".

2020 Aug 04
1
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...y the checker differentiates between __virtioXX and __uXX types. But we > + * try to share as much code as we can with the regular GCC build. > + */ > +#if !defined(CONFIG_CC_IS_GCC) && !defined(__CHECKER__) > + > +/* Not a checker - we can keep things simple */ > +#define __virtio_native_typeof(x) typeof(x) > + > +#else > + > +/* > + * We build this out of a couple of helper macros in a vain attempt to > + * help you keep your lunch down while reading it. > + */ It might help with the lunch, but it still gives a slight queasiness. No ideas for a better version, thoug...
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...y the checker differentiates between __virtioXX and __uXX types. But we > + * try to share as much code as we can with the regular GCC build. > + */ > +#if !defined(CONFIG_CC_IS_GCC) && !defined(__CHECKER__) > + > +/* Not a checker - we can keep things simple */ > +#define __virtio_native_typeof(x) typeof(x) > + > +#else > + > +/* > + * We build this out of a couple of helper macros in a vain attempt to > + * help you keep your lunch down while reading it. > + */ > +#define __virtio_pick_value(x, type, then, otherwise) \ > + __builtin_choose_expr(__same_type(x,...
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...y the checker differentiates between __virtioXX and __uXX types. But we > + * try to share as much code as we can with the regular GCC build. > + */ > +#if !defined(CONFIG_CC_IS_GCC) && !defined(__CHECKER__) > + > +/* Not a checker - we can keep things simple */ > +#define __virtio_native_typeof(x) typeof(x) > + > +#else > + > +/* > + * We build this out of a couple of helper macros in a vain attempt to > + * help you keep your lunch down while reading it. > + */ > +#define __virtio_pick_value(x, type, then, otherwise) \ > + __builtin_choose_expr(__same_type(x,...
2020 Aug 03
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...(vdev), val); } +/* + * Only the checker differentiates between __virtioXX and __uXX types. But we + * try to share as much code as we can with the regular GCC build. + */ +#if !defined(CONFIG_CC_IS_GCC) && !defined(__CHECKER__) + +/* Not a checker - we can keep things simple */ +#define __virtio_native_typeof(x) typeof(x) + +#else + +/* + * We build this out of a couple of helper macros in a vain attempt to + * help you keep your lunch down while reading it. + */ +#define __virtio_pick_value(x, type, then, otherwise) \ + __builtin_choose_expr(__same_type(x, type), then, otherwise) + +#define __virtio_...
2020 Aug 05
0
[PATCH v3 03/38] virtio: allow __virtioXX, __leXX in config space
...(vdev), val); } +/* + * Only the checker differentiates between __virtioXX and __uXX types. But we + * try to share as much code as we can with the regular GCC build. + */ +#if !defined(CONFIG_CC_IS_GCC) && !defined(__CHECKER__) + +/* Not a checker - we can keep things simple */ +#define __virtio_native_typeof(x) typeof(x) + +#else + +/* + * We build this out of a couple of helper macros in a vain attempt to + * help you keep your lunch down while reading it. + */ +#define __virtio_pick_value(x, type, then, otherwise) \ + __builtin_choose_expr(__same_type(x, type), then, otherwise) + +#define __virtio_...
2020 Aug 05
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...etween __virtioXX and __uXX types. But we > > + * try to share as much code as we can with the regular GCC build. > > + */ > > +#if !defined(CONFIG_CC_IS_GCC) && !defined(__CHECKER__) > > + > > +/* Not a checker - we can keep things simple */ > > +#define __virtio_native_typeof(x) typeof(x) > > + > > +#else > > + > > +/* > > + * We build this out of a couple of helper macros in a vain attempt to > > + * help you keep your lunch down while reading it. > > + */ > > +#define __virtio_pick_value(x, type, then, otherwise) \ &gt...
2020 Aug 05
0
[PATCH v3 24/38] virtio_config: rewrite using _Generic
...: (x), \ + __u16: virtio16_to_cpu((vdev), (__force __virtio16)(x)), \ + __u32: virtio32_to_cpu((vdev), (__force __virtio32)(x)), \ + __u64: virtio64_to_cpu((vdev), (__force __virtio64)(x)) \ + ) \ + ) \ + ) -/* Not a checker - we can keep things simple */ -#define __virtio_native_typeof(x) typeof(x) - -#else - -/* - * We build this out of a couple of helper macros in a vain attempt to - * help you keep your lunch down while reading it. - */ -#define __virtio_pick_value(x, type, then, otherwise) \ - __builtin_choose_expr(__same_type(x, type), then, otherwise) - -#define __virtio_...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are not tagged with the correct endian-ness so it's easy to make mistakes like instanciating config space in native endian-ness. The following patches adding sparse tagging are currently in my tree. Lightly tested. As a follow-up, I plan to add new APIs that handle modern config space in a more efficient way (bypassing the version check).