Re: LZF Cryptoapi support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux