All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Smith" <dpsmith@apertussolutions.com>
To: xen-devel@lists.xenproject.org
Cc: Jason Andryuk <jason.andryuk@amd.com>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: [PATCH v2 6/6] gzip: drop huffman code table tracking
Date: Wed, 17 Apr 2024 10:37:16 -0400	[thread overview]
Message-ID: <20240417143716.27189-7-dpsmith@apertussolutions.com> (raw)
In-Reply-To: <20240417143716.27189-1-dpsmith@apertussolutions.com>

The "tracking" bits does not appear to be used, so dropping from the code.

Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/common/gzip/inflate.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/xen/common/gzip/inflate.c b/xen/common/gzip/inflate.c
index c18ce20210b0..15bc187c2bbe 100644
--- a/xen/common/gzip/inflate.c
+++ b/xen/common/gzip/inflate.c
@@ -264,8 +264,6 @@ static const int dbits = 6;          /* bits in base distance lookup table */
 #define BMAX 16         /* maximum bit length of any code (16 for explode) */
 #define N_MAX 288       /* maximum number of codes in any set */
 
-static unsigned __initdata hufts;      /* track memory usage */
-
 /*
  * Given a list of code lengths and a maximum table size, make a set of
  * tables to decode that set of codes.  Return zero on success, one if
@@ -445,7 +443,6 @@ static int __init huft_build(
                     goto out;
                 }
                 DEBG1("4 ");
-                hufts += z + 1;         /* track memory usage */
                 *t = q + 1;             /* link to list for huft_free() */
                 *(t = &(q->v.t)) = (struct huft *)NULL;
                 u[h] = ++q;             /* table starts after link */
@@ -1028,15 +1025,12 @@ static int __init inflate(struct gzip_state *s)
     /* decompress until the last block */
     h = 0;
     do {
-        hufts = 0;
 #ifdef ARCH_HAS_DECOMP_WDOG
         arch_decomp_wdog();
 #endif
         r = inflate_block(s, &e);
         if (r)
             return r;
-        if (hufts > h)
-            h = hufts;
     } while (!e);
 
     /* Undo too much lookahead. The next read will be byte aligned so we
-- 
2.30.2



  parent reply	other threads:[~2024-04-17 14:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 14:37 [PATCH v2 0/6] Clean up of gzip decompressor Daniel P. Smith
2024-04-17 14:37 ` [PATCH v2 1/6] gzip: drop unused define checks Daniel P. Smith
2024-04-17 16:27   ` Andrew Cooper
2024-04-18  7:47   ` Jan Beulich
2024-04-17 14:37 ` [PATCH v2 2/6] gzip: clean up comments and fix code alignment Daniel P. Smith
2024-04-17 14:37 ` [PATCH v2 3/6] gzip: remove custom memory allocator Daniel P. Smith
2024-04-17 16:52   ` Andrew Cooper
2024-04-17 14:37 ` [PATCH v2 4/6] gzip: refactor state tracking Daniel P. Smith
2024-04-17 18:45   ` Andrew Cooper
2024-04-17 14:37 ` [PATCH v2 5/6] gzip: move crc state into consilidated gzip state Daniel P. Smith
2024-04-17 17:00   ` Andrew Cooper
2024-04-17 14:37 ` Daniel P. Smith [this message]
2024-04-17 16:31   ` [PATCH v2 6/6] gzip: drop huffman code table tracking Andrew Cooper
2024-04-18  7:43 ` [PATCH v2 0/6] Clean up of gzip decompressor Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240417143716.27189-7-dpsmith@apertussolutions.com \
    --to=dpsmith@apertussolutions.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jason.andryuk@amd.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.