xen/nodemask: Remove _unused_nodemask_arg_
PATCH 1/1 xen/nodemask: Remove _unused_nodemask_arg_
This only exists to have it's type taken, despite there being a perfectly good concrete type to use.
No functional change.
---
CC: Anthony PERARD <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Julien Grall <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
--- xen/include/xen/nodemask.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
xen/include/xen/nodemask.h +1 -3
@@ -67,8 +67,6 @@ typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;#define nodemask_bits (src) ((src)->bits) -extern nodemask_t _unused_nodemask_arg_; -#define node_set (node, dst) __node_set((node), &(dst))static inline void __node_set (int node,volatile nodemask_t *dstp) {
@@ -215,7 +213,7 @@ static inline int __last_node(const nodemask_t *srcp, int nbits)#define nodemask_of_node (node) \ ({ \ - typeof(_unused_nodemask_arg_) m; \ + nodemask_t m; \ if (sizeof(m) == sizeof(unsigned long)) { \ m.bits[0] = 1UL<<(node); \ } else { \
Signature · 1 line
2.39.5
Quoted 6 lines · Andrew Cooper
This only exists to have it's type taken, despite there being a perfectly good concrete type to use.
No functional change.
Signed-off-by Andrew Cooper <[email protected]>
Quoted 12 lines
xen/include/xen/nodemask.h +0
-2@@ -67,8 +67,6 @@ typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;#define nodemask_bits (src) ((src)->bits) -extern nodemask_t _unused_nodemask_arg_; -#define node_set (node, dst) __node_set((node), &(dst))static inline void __node_set (int node,volatile nodemask_t *dstp) {
xen/include/xen/nodemask.h static inline int __last_node(const nodemask_t *srcp, int nbits) · line 219
Quoted 8 lines
xen/include/xen/nodemask.h +1
-1@@ -215,7 +213,7 @@ static inline int __last_node(const nodemask_t *srcp, int nbits)#define nodemask_of_node (node) \ ({ \ - typeof(_unused_nodemask_arg_) m; \ + nodemask_t m; \ if (sizeof(m) == sizeof(unsigned long)) { \ m.bits[0] = 1UL<<(node); \ } else { \
Hard to see why Linux would have introduced that either. (It still has it, btw.)
Jan
Quoted 8 lines · Jan Beulich
Quoted 6 lines · Andrew Cooper
This only exists to have it's type taken, despite there being a perfectly good concrete type to use.
No functional change.
Signed-off-by Andrew Cooper <[email protected]>Acked-by Jan Beulich <[email protected]>
Thanks.
Quoted 14 lines
Quoted 14 lines
xen/include/xen/nodemask.h +0
-2@@ -67,8 +67,6 @@ typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;#define nodemask_bits (src) ((src)->bits) -extern nodemask_t _unused_nodemask_arg_; -#define node_set (node, dst) __node_set((node), &(dst))static inline void __node_set (int node,volatile nodemask_t *dstp) {@@ -215,7 +213,7 @@ static inline int __last_node(const nodemask_t *srcp, int nbits)
Quoted 8 lines
xen/include/xen/nodemask.h static inline int __last_node(const nodemask_t *srcp, int nbits) · line 219
Quoted 7 lines
xen/include/xen/nodemask.h +1
-1#define nodemask_of_node (node) \ ({ \ - typeof(_unused_nodemask_arg_) m; \ + nodemask_t m; \ if (sizeof(m) == sizeof(unsigned long)) { \ m.bits[0] = 1UL<<(node); \ } else { \Hard to see why Linux would have introduced that either. (It still has it, btw.)
Yeah, it is a bizarre construct. I only noticed it when trying to do some more typeof cleanup.
~Andrew