Re: [RFC v3 04/18] firmware: thead: Add AON firmware protocol driver

Krzysztof Kozlowski
2025-01-29T07:25:19Z

On 28/01/2025 16:54, Michal Wilczynski wrote:
>
>
> On 1/21/25 10:56, Krzysztof Kozlowski wrote:
>
>>> diff --git a/include/linux/firmware/thead/thead,th1520-aon.h b/include/linux/firmware/thead/thead,th1520-aon.h
>>> new file mode 100644
>>> index 000000000000..3daa17c01d17
>>> --- /dev/null
>>> +++ b/include/linux/firmware/thead/thead,th1520-aon.h
>>> @@ -0,0 +1,186 @@
>>> +/* SPDX-License-Identifier: GPL-2.0 */
>>> +/*
>>> + * Copyright (C) 2021 Alibaba Group Holding Limited.
>>> + */
>>> +
>>> +#ifndef _THEAD_AON_H
>>> +#define _THEAD_AON_H
>>> +
>>> +#include <linux/device.h>
>>> +#include <linux/types.h>
>>> +
>>> +#define AON_RPC_MSG_MAGIC (0xef)
>>> +#define TH1520_AON_RPC_VERSION 2
>>> +#define TH1520_AON_RPC_MSG_NUM 7
>>> +
>>> +extern struct th1520_aon_chan *aon_chan;
>>
>> Drop all externs.
>
> This is required so the code will compile as the
> int th1520_aon_call_rpc(struct th1520_aon_chan *aon_chan, void *msg);
> is non static and exposed in the same header.

No, extern is not required. It's some old coding style, long time
deprecated.

>
> I really would like to keep th1520_aon_call_rpc in this header, as it

It can stay, I commented only on externs.

Best regards,
Krzysztof