search for: _generic

Displaying 13 results from an estimated 13 matches for "_generic".

Did you mean: generic
2020 Aug 05
0
[PATCH v3 24/38] virtio_config: rewrite using _Generic
...(virtio_is_little_endian(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__) +#define virtio_to_cpu(vdev, x) \ + _Generic((x), \ + __u8: (x), \ + __virtio16: virtio16_to_cpu((vdev), (x)), \ + __virtio32: virtio32_to_cpu((vdev), (x)), \ + __virtio64: virtio64_to_cpu((vdev), (x)), \ + /* + * Why define a default? checker can distinguish between + * e.g. __u16, __le16 and __virtio16, but GCC can't so + * a...
2020 Aug 06
0
[vhost:vhost 32/65] drivers/virtio/virtio_input.c:247:3: warning: comparison of distinct pointer types ('typeof (_Generic((virtio_cread_v), __u8: (virtio_cread_v), __le16: (__builtin_constant_p((__u16)((__u16)(__le16)(virtio_cread_v)))
...g make.cross ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp at intel.com> All warnings (new ones prefixed by >>): >> drivers/virtio/virtio_input.c:247:3: warning: comparison of distinct pointer types ('typeof (_Generic((virtio_cread_v), __u8: (virtio_cread_v), __le16: (__builtin_constant_p((__u16)((__u16)(__le16)(virtio_cread_v))) ? ((__u16)((((__u16)((__u16)(__le16)(virtio_cread_v)) & (__u16)255U) << 8) | (((__u16)((__u16)(__le16)(virtio_cread_v)) & (__u16)65280U) >> 8))) : __fswab16((__u16)(...
2020 Aug 05
0
[PATCH v3 25/38] virtio_config: disallow native type fields (again)
_Generic version allowed __uXX types but that is no longer necessary: Transitional devices should all use __virtioXX types (and __leXX for fields not present in the legacy devices). Modern ones should use __leXX. _uXX type would be a bug. Let's prevent that. Signed-off-by: Michael S. Tsirkin <mst a...
2016 Feb 23
3
[3.8 Release] Release status
I had hoped to tag rc3 today (I feel like I've said this a lot lately), but it's at least really, really close. I'm waiting for: - r261297 - Implement the likely resolution of core issue 253. Still in post-commit review. - D17507 - The controlling expression for _Generic is unevaluated New for today. Waiting for review. Thanks, Hans
2020 Aug 05
0
[PATCH v3 26/38] virtio_config: LE config space accessors
...o_config.h @@ -375,6 +375,71 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) sizeof(virtio_cwrite_v)); \ } while(0) +/* + * Nothing virtio-specific about these, but let's worry about generalizing + * these later. + */ +#define virtio_le_to_cpu(x) \ + _Generic((x), \ + __u8: (x), \ + __le16: le16_to_cpu(x), \ + __le32: le32_to_cpu(x), \ + __le64: le64_to_cpu(x) \ + ) + +#define virtio_cpu_to_le(x, m) \ + _Generic((m), \ + __u8: (x), \ + __le16: cpu_to_le16(x), \ + __le32: cpu_to_le32(x), \ + __le64: cpu_to_le64(x) \ + ) + +/* LE (e.g. mo...
2020 Aug 05
0
[PATCH v3 37/38] virtio_config: drop LE option from config space
...u((vdev), (x)), \ - __virtio64: virtio64_to_cpu((vdev), (x)), \ - /* - * Why define a default? checker can distinguish between - * e.g. __u16, __le16 and __virtio16, but GCC can't so - * attempts to define variants for both look like a duplicate - * variant to it. - */ \ - default: _Generic((x), \ - __u8: (x), \ - __le16: virtio16_to_cpu((vdev), (__force __virtio16)(x)), \ - __le32: virtio32_to_cpu((vdev), (__force __virtio32)(x)), \ - __le64: virtio64_to_cpu((vdev), (__force __virtio64)(x)) \ - ) \ + __virtio64: virtio64_to_cpu((vdev), (x)) \ ) #define cpu_...
2023 Apr 10
1
[PATCH] tools/virtio: fix build caused by virtio_ring changes
...out to the containing + * structure and preserve the const-ness of the pointer + * @ptr: the pointer to the member + * @type: the type of the container struct this is embedded in. + * @member: the name of the member within the struct. + */ +#define container_of_const(ptr, type, member) \ + _Generic(ptr, \ + const typeof(*(ptr)) *: ((const type *)container_of(ptr, type, member)),\ + default: ((type *)container_of(ptr, type, member)) \ + ) + +#endif /* _LINUX_CONTAINER_OF_H */ diff --git a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h index 2c51bccb97bb..ac27b3ea6e67 100...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
...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). That is still TBD. I also start with a version using gcc extensions, then switch to _Generic. This is helpful for backports to older kernels/older distros: _Generic patch can just be skipped. Michael S. Tsirkin (24): virtio_balloon: fix sparse warning virtio_ring: sparse warning fixup virtio: allow __virtioXX, __leXX in config space virtio_9p: correct tags for config space fields...
2020 Aug 05
1
[vhost:vhost 32/52] include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: 4c05433bc6fb4ae172270f0279be8ba89a3da64f commit: b025584098e621d88894d28e80af686958e273af [32/52] virtio_input: convert to LE accessors config: parisc-randconfig-r003-20200805 (attached as .config) compiler: hppa-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget
1997 Sep 15
0
Using SMB for web authentication
.... 4) User gets the page if uname/passwd were correct. I thought about using SMBlib for this validating system. Is there a good/easy way to validate users with smblib and how to actually do it? Do I actually need to connect some share (\\ntserver\public) to get user validation or can I just do some _generic calls_ without actually connecting to any share? And how to get group information from NT-domain? Like: User only in admin group can access this web page. Do I need to create _fake shares_ for all groups, say \\ntserver\group1, \\ntserver\admins, etc. and allow only group1 to connect group1-share....
2020 Aug 11
1
[GIT PULL] virtio: features, fixes
...ifo: sparse tags for config access vdpa: make sure set_features is invoked for legacy vhost/vdpa: switch to new helpers virtio_vdpa: legacy features handling vdpa_sim: fix endian-ness of config space virtio_config: cread/write cleanup virtio_config: rewrite using _Generic virtio_config: disallow native type fields (again) virtio_config: LE config space accessors virtio_caif: correct tags for config space fields virtio_config: add virtio_cread_le_feature virtio_balloon: use LE config space accesses virtio_input: convert to LE acces...
2016 Feb 19
12
[3.8 Release] Release status
According to the schedule (e.g. on the right on llvm.org), we should have tagged the release by now, but we haven't, so we're officially behind schedule. I'm still optimistic that we can wrap this up pretty soon, though. This is what's blocking us: - PR26509: Crash in InnerLoopVectorizer::vectorizeLoop() I'm waiting to hear what Cong comes up with, otherwise we can revert
2008 Apr 02
10
[PATCH 0/62] Ocfs2 updates for 2.6.26-rc1
The following series of patches comprises the bulk of our outstanding changes for Ocfs2. Aside from the usual set of cleanups and fixes that were inappropriate for 2.6.25, there are a few highlights: The '/sys/o2cb' directory has been moved to '/sys/fs/o2cb'. The new location meshes better with modern sysfs layout. A symbolic link has been placed in the old location so as to