qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] loader: remove load_image_gzipped function as its not used anywhere
@ 2024-07-11  7:24 Ani Sinha
  2024-07-11 10:23 ` Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ani Sinha @ 2024-07-11  7:24 UTC (permalink / raw)
  Cc: peter.maydell, philmd, Ani Sinha, qemu-devel

load_image_gzipped() does not seem to be used anywhere. Remove it.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
---
 hw/core/loader.c    | 13 -------------
 include/hw/loader.h |  4 +---
 2 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/hw/core/loader.c b/hw/core/loader.c
index a3bea1e718..c04fae55c0 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -845,19 +845,6 @@ ssize_t load_image_gzipped_buffer(const char *filename, uint64_t max_sz,
     return ret;
 }
 
-/* Load a gzip-compressed kernel. */
-ssize_t load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz)
-{
-    ssize_t bytes;
-    uint8_t *data;
-
-    bytes = load_image_gzipped_buffer(filename, max_sz, &data);
-    if (bytes != -1) {
-        rom_add_blob_fixed(filename, data, bytes, addr);
-        g_free(data);
-    }
-    return bytes;
-}
 
 /* The PE/COFF MS-DOS stub magic number */
 #define EFI_PE_MSDOS_MAGIC        "MZ"
diff --git a/include/hw/loader.h b/include/hw/loader.h
index 9844c5e3cf..7f6d06b956 100644
--- a/include/hw/loader.h
+++ b/include/hw/loader.h
@@ -77,15 +77,13 @@ ssize_t load_image_targphys(const char *filename, hwaddr,
 ssize_t load_image_mr(const char *filename, MemoryRegion *mr);
 
 /* This is the limit on the maximum uncompressed image size that
- * load_image_gzipped_buffer() and load_image_gzipped() will read. It prevents
+ * load_image_gzipped_buffer() will read. It prevents
  * g_malloc() in those functions from allocating a huge amount of memory.
  */
 #define LOAD_IMAGE_MAX_GUNZIP_BYTES (256 << 20)
 
 ssize_t load_image_gzipped_buffer(const char *filename, uint64_t max_sz,
                                   uint8_t **buffer);
-ssize_t load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz);
-
 /**
  * unpack_efi_zboot_image:
  * @buffer: pointer to a variable holding the address of a buffer containing the
-- 
2.42.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] loader: remove load_image_gzipped function as its not used anywhere
  2024-07-11  7:24 [PATCH] loader: remove load_image_gzipped function as its not used anywhere Ani Sinha
@ 2024-07-11 10:23 ` Peter Maydell
  2024-07-11 13:58 ` Philippe Mathieu-Daudé
  2024-07-15  9:51 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2024-07-11 10:23 UTC (permalink / raw)
  To: Ani Sinha; +Cc: philmd, qemu-devel

On Thu, 11 Jul 2024 at 08:25, Ani Sinha <anisinha@redhat.com> wrote:
>
> load_image_gzipped() does not seem to be used anywhere. Remove it.
>
> Signed-off-by: Ani Sinha <anisinha@redhat.com>
> ---

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] loader: remove load_image_gzipped function as its not used anywhere
  2024-07-11  7:24 [PATCH] loader: remove load_image_gzipped function as its not used anywhere Ani Sinha
  2024-07-11 10:23 ` Peter Maydell
@ 2024-07-11 13:58 ` Philippe Mathieu-Daudé
  2024-07-15  9:51 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-07-11 13:58 UTC (permalink / raw)
  To: Ani Sinha; +Cc: peter.maydell, qemu-devel

On 11/7/24 09:24, Ani Sinha wrote:
> load_image_gzipped() does not seem to be used anywhere. Remove it.
> 
> Signed-off-by: Ani Sinha <anisinha@redhat.com>
> ---
>   hw/core/loader.c    | 13 -------------
>   include/hw/loader.h |  4 +---
>   2 files changed, 1 insertion(+), 16 deletions(-)
> 
> diff --git a/hw/core/loader.c b/hw/core/loader.c
> index a3bea1e718..c04fae55c0 100644
> --- a/hw/core/loader.c
> +++ b/hw/core/loader.c
> @@ -845,19 +845,6 @@ ssize_t load_image_gzipped_buffer(const char *filename, uint64_t max_sz,
>       return ret;
>   }
>   
> -/* Load a gzip-compressed kernel. */
> -ssize_t load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz)
> -{
> -    ssize_t bytes;
> -    uint8_t *data;
> -
> -    bytes = load_image_gzipped_buffer(filename, max_sz, &data);
> -    if (bytes != -1) {
> -        rom_add_blob_fixed(filename, data, bytes, addr);
> -        g_free(data);
> -    }
> -    return bytes;
> -}

Indeed last one removed in commit 68115ed5fc ("hw/arm/boot: take
Linux/arm64 TEXT_OFFSET header field into account").

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] loader: remove load_image_gzipped function as its not used anywhere
  2024-07-11  7:24 [PATCH] loader: remove load_image_gzipped function as its not used anywhere Ani Sinha
  2024-07-11 10:23 ` Peter Maydell
  2024-07-11 13:58 ` Philippe Mathieu-Daudé
@ 2024-07-15  9:51 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-07-15  9:51 UTC (permalink / raw)
  To: Ani Sinha; +Cc: peter.maydell, qemu-devel

On 11/7/24 09:24, Ani Sinha wrote:
> load_image_gzipped() does not seem to be used anywhere. Remove it.
> 
> Signed-off-by: Ani Sinha <anisinha@redhat.com>
> ---
>   hw/core/loader.c    | 13 -------------
>   include/hw/loader.h |  4 +---
>   2 files changed, 1 insertion(+), 16 deletions(-)

Patch queued, thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-15  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-11  7:24 [PATCH] loader: remove load_image_gzipped function as its not used anywhere Ani Sinha
2024-07-11 10:23 ` Peter Maydell
2024-07-11 13:58 ` Philippe Mathieu-Daudé
2024-07-15  9:51 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).