[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/nodemask: Remove _unused_nodemask_arg_


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 12 Jan 2026 10:55:38 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fGMd9dCw2jxOIgg6Aa7j+76NQID7VHLeTGk8VWtlkIA=; b=s4zEdShDhLcx/wrx5+1shzADKSwmNJ4JJhpZIv7b9BJJYeDqsgHq2ZitPTsKoJaeRwYOUqH3eF9Y/Fc8vaPnI/gzzlg40mAHt/roLGAW+xC7XSxJ6VPg1gCJBlVPwrQPfdTurPGJG0iBlEMLR2AU8TcECtxIrDHmiZ3VbUW2XcepzOIwCyvtDvlqKXnGTAC6IA7RpCrKCTZMCYbQRQWzos/+Xu+H4OkEVl9mrYTe5yMcPGSeipl/1sVwL1AU9pjO1ge6V8BwheJGBB5injbyxxRLBaMtk7ok69slh5+Bh0luCfskbuOIxgDOCqRdRYL8ImUOlDT8i31CzScRAmcN+A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l4lD4Dn7P5q0a/C7SVB2drz2Osy1nQJ7DwsER/44G4h4DeEhdNyZnpbW+Lz5JaTGCF0OVUHdRppt7aWcxq0MbICXsJbWAfcNbMFmJQcBXPm5Tslx38+ZmXSe+XzLv0sQyPNyXBb14a6Bu5RjNLVAwkXgquleqyW7DqB0HLTsEe6dTHlmytFD0LZmMq9nxaaA02BFhqslUPBSBQyvGTwgIT0DW704TttNV6MUVyvNe9POSdAjpysO2eIAF6kS7J0FedCYyQD2PmW8pzkbPZCg7lsQqCJUHjpO0AyRh/cexBW/Xecuui72Gf5RDfATT2Rq2lkGn5m42NlgLO3TZLh4Yw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 12 Jan 2026 10:55:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12/01/2026 10:47 am, Jan Beulich wrote:
> On 12.01.2026 11:40, Andrew Cooper wrote:
>> 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 <andrew.cooper3@xxxxxxxxxx>
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Thanks.

>
>> --- a/xen/include/xen/nodemask.h
>> +++ b/xen/include/xen/nodemask.h
>> @@ -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 {                                                        \
> 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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.