Re: [PATCH 07/17] Add boot.c, boot.h

Krzysztof Kozlowski
2024-05-22T11:12:24Z

On 22/05/2024 10:54, Breno Leitao wrote:
> Hello Michael,
>
> On Tue, May 21, 2024 at 08:18:31PM +0300, michael.nemanov@ti.com wrote:
>> From: Michael Nemanov <Michael.Nemanov@ti.com>
>
>> +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);
> | ^~~~~~~

So neither this nor previous version was ever built...

Best regards,
Krzysztof