From: Pavel Machek <pavel@ucw.cz>
To: Nigel Cunningham <ncunningham@cyclades.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: LZF Cryptoapi support.
Date: Thu, 21 Jul 2005 07:29:18 +0200 [thread overview]
Message-ID: <20050721052917.GA5230@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <1121921767.2938.207.camel@localhost>
Hi!
> New revision. Anything left to fix up?
It certainly looks better now.
> +static int lzf_compress_init(void *context)
> +{
> + struct lzf_ctx *ctx = (struct lzf_ctx *)context;
> +
> + /* Get LZF ready to go */
> + ctx->hbuf = vmalloc_32((1 << hlog) * sizeof(char *));
> + if (!ctx->hbuf) {
> + printk(KERN_WARNING
> + "Failed to allocate %d bytes for lzf workspace\n",
> + (1 << hlog) * sizeof(char *));
> + return -ENOMEM;
> + }
> +
> + /* Allocate local buffer */
> + ctx->local_buffer = (char *)get_zeroed_page(GFP_ATOMIC);
> +
> + if (!ctx->local_buffer) {
> + lzf_compress_exit(ctx);
> + return -ENOMEM;
> + }
> +
> + /* Allocate page buffer */
> + ctx->page_buffer = (char *)get_zeroed_page(GFP_ATOMIC);
Why GFP_ATOMIC in last two?
> + if (!ctx->page_buffer) {
> + free_page((unsigned long)ctx->local_buffer);
> + lzf_compress_exit(ctx);
> + return -ENOMEM;
> + }
> +
> + ctx->first_call = 1;
> +
> + return 0;
> +}
> +
> +static int lzf_compress(void *context, const u8 * in_data, unsigned int in_len,
~ extra space; it
is inconsistent all over the file.
Pavel
--
Boycott Kodak -- for their patent abuse against Java.
next prev parent reply other threads:[~2005-07-21 5:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-18 3:30 Nigel Cunningham
2005-07-19 13:54 ` Pavel Machek
2005-07-21 4:56 ` Nigel Cunningham
2005-07-21 5:29 ` Pavel Machek [this message]
2005-07-31 3:56 ` Herbert Xu
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=20050721052917.GA5230@atrey.karlin.mff.cuni.cz \
--to=pavel@ucw.cz \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@cyclades.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®