Re: [PATCH 07/17] Add boot.c, boot.h
From: Breno Leitao
Date: Wed May 22 2024 - 04:54:40 EST
Hello Michael,
On Tue, May 21, 2024 at 08:18:31PM +0300, michael.nemanov@xxxxxx wrote:
> From: Michael Nemanov <Michael.Nemanov@xxxxxx>
> +static u8 *fetch_container(struct cc33xx *cc, const char *container_name,
> + size_t *container_len)
> +{
> + u8 *container_data = NULL;
> + const struct firmware *container;
> + int ret;
> +
> + ret = request_firmware(&container, container_name, cc->dev);
> +
> + if (ret < 0) {
> + cc33xx_error("could not get container %s: (%d)",
> + container_name, ret);
> + return NULL;
> + }
> +
> + if (container->size % 4) {
> + cc33xx_error("container size is not word-aligned: %zu",
> + container->size);
> + goto out;
> + }
> +
> + *container_len = container->size;
> + container_data = vmalloc(container->size);
I got the following error when compiling it:
drivers/net/wireless/ti/cc33xx/boot.c: In function ‘fetch_container’:
drivers/net/wireless/ti/cc33xx/boot.c:76:26: error: implicit declaration of function ‘vmalloc’; did you mean ‘kmalloc’? [-Werror=implicit-function-declaration]
76 | container_data = vmalloc(container->size);
| ^~~~~~~
| kmalloc
drivers/net/wireless/ti/cc33xx/boot.c:76:24: warning: assignment to ‘u8 *’ {aka ‘unsigned char *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
76 | container_data = vmalloc(container->size);