[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 02/12] libx86: introduce helper to fetch cpuid leaf
- To: Andrew Cooper <amc96@xxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 18 Jan 2022 14:18:49 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=rN/pcYDgKi9S9+FHngAonSfjJ4ZATOReaSHk9xDICYY=; b=TIgL/RVyYLbffxJMqZL4dMWtyXTeFvf76fUiBcAi+XXWFyN7Q6XLSHO2wmgfel92GuQWHXU4Cg9hq+ndqi1Jcvam0Kp1jNea+jzS6M7wMoyiy5C1nQDORpBdl7WDDioCedDZv6rGD4M7cHFltaH0O7O6j3dXUhH7BRq7G4+IePqUcHdR//hRMNgdHVjVE8sILPPiwK2BIVvJastaLglhHpeoBAvgcYEbv5HWRvSWbEQE2/CUWExqaxfPHCWrc0rf4tSmyXr0lCD7tn4PS5Da90XonC6C3Igtqq7ERvcta3iPuS6byx0WvpyM1f7/zbbATjpcyzAFa1f+PeuemdEvWQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GIA0vu6nZGGNgpZpBvbEoM3My/Zc1jUJ/l5yyAOvYhaaC50EyXl43DQMVbajRia0KXsfGmT7pPt9R0VgvQfyAZBFpvIEtMGfIVbhZf6e9sfC28Ci0asroGnEGkJZ+hk6WBXt6SbFhr+sKh0ZY1vGYpSo3mAea7WOwGhsZ7OGZBRvciFpvbi2qQrcWq/J46nqSzuVdUULeS030mF5H/4M5JY6W8Oava44aNPl2ux3wB2Z6yGIaa6qCvqUQX2JDPMmTftJh2jIknkLWWYxX9BbuhFoyppeBMZDCKSqyn3BwzuG0FK6xlJg+fUwR1Xlm0WkbicBTl7FwEjcdEciFjqdeA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 18 Jan 2022 13:19:15 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18.01.2022 13:26, Andrew Cooper wrote:
> On 17/01/2022 09:48, Roger Pau Monne wrote:
>> +#define x86_cpuid_get_leaf(p, l, s) \
>> + ((__typeof__(&(p)->basic.raw[0]))x86_cpuid_get_leaf_const(p, l, s))
>
> You can drop the outermost brackets.
How that? While people aren't expected to write
x86_cpuid_get_leaf(p, l, s)[0], such a case shouldn't result in misleading
compiler diagnostics. Afaict omitting outermost parentheses is only ever
safe on postfix expressions.
Jan
|