[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/6] xsm: expanding function related macros in dummy.h
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 18 Jun 2021 14:40:56 +0200
- 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-SenderADCheck; bh=joSpaatqX+/3axrhqntVSZyIQpT7Mxe2NSP2FvFuLyA=; b=g6AiWqLC1gMz71c7+SIhR9cCekJgOHd39h/z4wKjMKk43aZRR4dtMP9GZHc005MHOYp0KZPfdXa29cDlVupOqjuZZ91cZtZI+E5ta40XtipY/IcYjIAK7f1RoYiZVzplCoCzaFj+YOaf1PVZYo2gxbwhvOYggTN4nlDOLVMvq5wIAGiPoOedjSSihGF9L1PV1M4uNOoACdbI8fTTcqCm1KnIXILovMGTJmgsAq+pJDs3BeBbio0yn4TX/scx9uzUV58f8NYz2AD+BaYIfjqscWihE/hg5nd8X41WvkOpb08kCeD9udesdyBgW2XPVIC27gtQcgDaxwNtGNdPj6mPQA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d6CxTyXFg5QyfSK+jmsuzteSOuc4xvQc20FrMVx8Cr7Sw+8kkc9DRdCd9LFmfg6Sj3nOteh8p3u1SM6TFTLLIsEaM2+l6nXYWIu4sDHR4fkktE81CuA2bcWrvujaR/uGW7Pwp89f+sP1iO/IkGTnK5iETKlVz2/KjbFt0gwmIhp8tAc2RnU2LVVdEXI8OBHtL8SLN8D8n9DjqRucl/dun5TS95/H4Nyd7Q5GfJ4Ec31hhSfiGxUqZMO6bas/pmRqJYgJZNGBWgtno2gEJUDg4kS+3EEVI/57K56tZYAN+xLoqce4vY33VrPA8y8wh3BvrgT6zxZW94AjQQ5TPjZXXg==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, persaur@xxxxxxxxx, christopher.w.clark@xxxxxxxxx, adam.schwalm@xxxxxxxxxx, scott.davis@xxxxxxxxxx, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 18 Jun 2021 12:41:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18.06.2021 14:03, Andrew Cooper wrote:
> On 18/06/2021 00:39, Daniel P. Smith wrote:
>> diff --git a/xen/xsm/dummy.h b/xen/xsm/dummy.h
>> index 7e2bb09dac..0f8ea163af 100644
>> --- a/xen/xsm/dummy.h
>> +++ b/xen/xsm/dummy.h
>> @@ -9,7 +9,7 @@
>> *
>> *
>> * Each XSM hook implementing an access check should have its first
>> parameter
>> - * preceded by XSM_DEFAULT_ARG (or use XSM_DEFAULT_VOID if it has no
>> + * preceded by (or use XSM_DEFAULT_VOID if it has no
>> * arguments). The first non-declaration statement shold be
>> XSM_ASSERT_ACTION
>> * with the expected type of the hook, which will either define or check
>> the
>> * value of action.
>> @@ -47,14 +47,12 @@ void __xsm_action_mismatch_detected(void);
>> * xsm_default_t argument available, so the value from the assertion is
>> used to
>> * initialize the variable.
>> */
>> -#define XSM_INLINE __maybe_unused
>
> Nothing in a header file should ever need __maybe_unused. Now that the
> !XSM case has been untangled, I think this can be dropped, rather than
> expanded inline.
>
>> -
>> -#define XSM_DEFAULT_ARG /* */
>> #define XSM_DEFAULT_VOID void
>
> XSM_DEFAULT_VOID needs to disappear too. I can't see what it is even
> doing before the cleanup, because if it is missing, you'll fail the
> compile for using K&R style functions.
You need to look at the state before patch 3 to see its purpose. Patch 3
removed the other variant, and hence the need for this one as well, but
I think it is reasonable to not clean up everything in one go (unless
it would mean touching exactly the same code a 2nd time later on).
Jan
|