diff mbox series

[1/5] gzip: colocate gunzip code files

Message ID 20240411152518.2995-2-dpsmith@apertussolutions.com (mailing list archive)
State Superseded
Headers show
Series Clean up of gzip decompressor | expand

Commit Message

Daniel P. Smith April 11, 2024, 3:25 p.m. UTC
This patch moves the gunzip code files to common/gzip. Makefiles are adjusted
accordingly.

Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/common/Makefile             | 2 +-
 xen/common/gzip/Makefile        | 1 +
 xen/common/{ => gzip}/gunzip.c  | 0
 xen/common/{ => gzip}/inflate.c | 0
 4 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 xen/common/gzip/Makefile
 rename xen/common/{ => gzip}/gunzip.c (100%)
 rename xen/common/{ => gzip}/inflate.c (100%)

Comments

Luca Fancellu April 11, 2024, 4 p.m. UTC | #1
> On 11 Apr 2024, at 16:25, Daniel P. Smith <dpsmith@apertussolutions.com> wrote:
> 
> This patch moves the gunzip code files to common/gzip. Makefiles are adjusted
> accordingly.
> 
> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
> ---
> xen/common/Makefile             | 2 +-
> xen/common/gzip/Makefile        | 1 +
> xen/common/{ => gzip}/gunzip.c  | 0
> xen/common/{ => gzip}/inflate.c | 0
> 4 files changed, 2 insertions(+), 1 deletion(-)
> create mode 100644 xen/common/gzip/Makefile
> rename xen/common/{ => gzip}/gunzip.c (100%)
> rename xen/common/{ => gzip}/inflate.c (100%)

For inflate.c you will need to update also docs/misra/exclude-list.json
Andrew Cooper April 11, 2024, 6:44 p.m. UTC | #2
On 11/04/2024 5:00 pm, Luca Fancellu wrote:
>> On 11 Apr 2024, at 16:25, Daniel P. Smith <dpsmith@apertussolutions.com> wrote:
>>
>> This patch moves the gunzip code files to common/gzip. Makefiles are adjusted
>> accordingly.
>>
>> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
>> ---
>> xen/common/Makefile             | 2 +-
>> xen/common/gzip/Makefile        | 1 +
>> xen/common/{ => gzip}/gunzip.c  | 0
>> xen/common/{ => gzip}/inflate.c | 0
>> 4 files changed, 2 insertions(+), 1 deletion(-)
>> create mode 100644 xen/common/gzip/Makefile
>> rename xen/common/{ => gzip}/gunzip.c (100%)
>> rename xen/common/{ => gzip}/inflate.c (100%)
> For inflate.c you will need to update also docs/misra/exclude-list.json

Something like this?

diff --git a/docs/misra/exclude-list.json b/docs/misra/exclude-list.json
index 36bad9e54f7d..095636415897 100644
--- a/docs/misra/exclude-list.json
+++ b/docs/misra/exclude-list.json
@@ -118,7 +118,7 @@
             "comment": "Imported from Linux, ignore for now"
         },
         {
-            "rel_path": "common/inflate.c",
+            "rel_path": "common/gzip/inflate.c",
             "comment": "Imported from Linux, ignore for now"
         },
         {

I can fold on commit.

~Andrew
Luca Fancellu April 11, 2024, 7:43 p.m. UTC | #3
>>> create mode 100644 xen/common/gzip/Makefile
>>> rename xen/common/{ => gzip}/gunzip.c (100%)
>>> rename xen/common/{ => gzip}/inflate.c (100%)
>> For inflate.c you will need to update also docs/misra/exclude-list.json
> 
> Something like this?
> 
> diff --git a/docs/misra/exclude-list.json b/docs/misra/exclude-list.json
> index 36bad9e54f7d..095636415897 100644
> --- a/docs/misra/exclude-list.json
> +++ b/docs/misra/exclude-list.json
> @@ -118,7 +118,7 @@
>              "comment": "Imported from Linux, ignore for now"
>          },
>          {
> -            "rel_path": "common/inflate.c",
> +            "rel_path": "common/gzip/inflate.c",
>              "comment": "Imported from Linux, ignore for now"
>          },
>          {

Yes indeed
Daniel P. Smith April 12, 2024, 11:07 a.m. UTC | #4
On 4/11/24 15:43, Luca Fancellu wrote:
> 
>>>> create mode 100644 xen/common/gzip/Makefile
>>>> rename xen/common/{ => gzip}/gunzip.c (100%)
>>>> rename xen/common/{ => gzip}/inflate.c (100%)
>>> For inflate.c you will need to update also docs/misra/exclude-list.json
>>
>> Something like this?
>>
>> diff --git a/docs/misra/exclude-list.json b/docs/misra/exclude-list.json
>> index 36bad9e54f7d..095636415897 100644
>> --- a/docs/misra/exclude-list.json
>> +++ b/docs/misra/exclude-list.json
>> @@ -118,7 +118,7 @@
>>               "comment": "Imported from Linux, ignore for now"
>>           },
>>           {
>> -            "rel_path": "common/inflate.c",
>> +            "rel_path": "common/gzip/inflate.c",
>>               "comment": "Imported from Linux, ignore for now"
>>           },
>>           {
> 
> Yes indeed

Ack, will add.
diff mbox series

Patch

diff --git a/xen/common/Makefile b/xen/common/Makefile
index e5eee19a8537..d512cad5243f 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -14,7 +14,7 @@  obj-y += event_channel.o
 obj-y += event_fifo.o
 obj-$(CONFIG_GRANT_TABLE) += grant_table.o
 obj-y += guestcopy.o
-obj-bin-y += gunzip.init.o
+obj-y += gzip/
 obj-$(CONFIG_HYPFS) += hypfs.o
 obj-$(CONFIG_IOREQ_SERVER) += ioreq.o
 obj-y += irq.o
diff --git a/xen/common/gzip/Makefile b/xen/common/gzip/Makefile
new file mode 100644
index 000000000000..bda73c0184ad
--- /dev/null
+++ b/xen/common/gzip/Makefile
@@ -0,0 +1 @@ 
+obj-bin-y += gunzip.init.o
diff --git a/xen/common/gunzip.c b/xen/common/gzip/gunzip.c
similarity index 100%
rename from xen/common/gunzip.c
rename to xen/common/gzip/gunzip.c
diff --git a/xen/common/inflate.c b/xen/common/gzip/inflate.c
similarity index 100%
rename from xen/common/inflate.c
rename to xen/common/gzip/inflate.c