diff mbox series

[v3,14/15] xen/decompress: drop STATIC and INIT

Message ID b9410d49-8767-a6f2-ccbe-c94e451c60ba@suse.com (mailing list archive)
State New, archived
Headers show
Series zstd decompression for DomU-s + fallout / consolidation | expand

Commit Message

Jan Beulich Jan. 26, 2021, 9:53 a.m. UTC
All users have been removed in earlier changes.

Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v3: New.

Comments

Julien Grall April 15, 2021, 2:21 p.m. UTC | #1
On 26/01/2021 09:53, Jan Beulich wrote:
> All users have been removed in earlier changes.

This is not entirely correct given there is a still a user of...

> 
> Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> v3: New.
> 
> --- a/xen/arch/arm/efi/efi-dom0.c
> +++ b/xen/arch/arm/efi/efi-dom0.c
> @@ -28,7 +28,7 @@
>   #include <asm/setup.h>
>   #include <asm/acpi.h>
>   #include "../../../common/decompress.h"
> -#define XZ_EXTERN STATIC
> +#define XZ_EXTERN static

STATIC here. So maybe you want to say "all but one users"?

Also, for consistency, I think you want to either remove INITDATA here 
or remove INIT in the patch that drop the last user.

Cheers,

>   #include "../../../common/xz/crc32.c"
>   
>   /* Constant to indicate "Xen" in unicode u16 format */
> --- a/xen/common/decompress.h
> +++ b/xen/common/decompress.h
> @@ -7,9 +7,6 @@
>   #include <xen/types.h>
>   #include <xen/xmalloc.h>
>   
> -#define STATIC static
> -#define INIT __init
> -
>   #define malloc xmalloc_bytes
>   #define free xfree
>   
> @@ -18,9 +15,6 @@
>   
>   #else
>   
> -#define STATIC static
> -#define INIT
> -
>   #undef __init /* tools/libs/guest/xg_private.h has its own one */
>   #define __init
>   #define __initdata
> 
>
Jan Beulich April 15, 2021, 2:32 p.m. UTC | #2
On 15.04.2021 16:21, Julien Grall wrote:
> On 26/01/2021 09:53, Jan Beulich wrote:
>> All users have been removed in earlier changes.
> 
> This is not entirely correct given there is a still a user of...
> 
>>
>> Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> ---
>> v3: New.
>>
>> --- a/xen/arch/arm/efi/efi-dom0.c
>> +++ b/xen/arch/arm/efi/efi-dom0.c
>> @@ -28,7 +28,7 @@
>>   #include <asm/setup.h>
>>   #include <asm/acpi.h>
>>   #include "../../../common/decompress.h"
>> -#define XZ_EXTERN STATIC
>> +#define XZ_EXTERN static
> 
> STATIC here. So maybe you want to say "all but one users"?

Sigh. Of course I re-word this. But does it really matter? The
more that the thing here is more of an abuse than a proper use
anyway? I didn't create this hackery ... In fact this odd use
is why I made this a separate patch in the first place.

> Also, for consistency, I think you want to either remove INITDATA here 
> or remove INIT in the patch that drop the last user.

See my other reply - what matters, I think, is a consistent
end result. I would really like to ask that I be left with some
room on how precisely to get there.

Jan
Julien Grall April 15, 2021, 2:45 p.m. UTC | #3
On 15/04/2021 15:32, Jan Beulich wrote:
> On 15.04.2021 16:21, Julien Grall wrote:
>> On 26/01/2021 09:53, Jan Beulich wrote:
>>> All users have been removed in earlier changes.
>>
>> This is not entirely correct given there is a still a user of...
>>
>>>
>>> Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>> ---
>>> v3: New.
>>>
>>> --- a/xen/arch/arm/efi/efi-dom0.c
>>> +++ b/xen/arch/arm/efi/efi-dom0.c
>>> @@ -28,7 +28,7 @@
>>>    #include <asm/setup.h>
>>>    #include <asm/acpi.h>
>>>    #include "../../../common/decompress.h"
>>> -#define XZ_EXTERN STATIC
>>> +#define XZ_EXTERN static
>>
>> STATIC here. So maybe you want to say "all but one users"?
> 
> Sigh. Of course I re-word this. But does it really matter? 

Just consistency between the diff and the commit message.

> The
> more that the thing here is more of an abuse than a proper use
> anyway? I didn't create this hackery ... In fact this odd use
> is why I made this a separate patch in the first place.
>> Also, for consistency, I think you want to either remove INITDATA here
>> or remove INIT in the patch that drop the last user.
> 
> See my other reply - what matters, I think, is a consistent
> end result. I would really like to ask that I be left with some
> room on how precisely to get there.

I thought I would point out because we often request to shuffle code to 
make a series more logical.

This is not a must to me. The code is fine it is.

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,
diff mbox series

Patch

--- a/xen/arch/arm/efi/efi-dom0.c
+++ b/xen/arch/arm/efi/efi-dom0.c
@@ -28,7 +28,7 @@ 
 #include <asm/setup.h>
 #include <asm/acpi.h>
 #include "../../../common/decompress.h"
-#define XZ_EXTERN STATIC
+#define XZ_EXTERN static
 #include "../../../common/xz/crc32.c"
 
 /* Constant to indicate "Xen" in unicode u16 format */
--- a/xen/common/decompress.h
+++ b/xen/common/decompress.h
@@ -7,9 +7,6 @@ 
 #include <xen/types.h>
 #include <xen/xmalloc.h>
 
-#define STATIC static
-#define INIT __init
-
 #define malloc xmalloc_bytes
 #define free xfree
 
@@ -18,9 +15,6 @@ 
 
 #else
 
-#define STATIC static
-#define INIT
-
 #undef __init /* tools/libs/guest/xg_private.h has its own one */
 #define __init
 #define __initdata