lkml.org 
[lkml]   [2005]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: LZF Cryptoapi support.
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-21 07:39    [W:0.118 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site