For !OF builds, the qcom_scm_qseecom_allowlist is unused:
drivers/firmware/qcom/qcom_scm.c:1652:34: error: ‘qcom_scm_qseecom_allowlist’ defined but not used [-Werror=unused-const-variable=]
Fixes: 00b1248606ba ("firmware: qcom_scm: Add support for Qualcomm Secure Execution Environment SCM interface")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/firmware/qcom/qcom_scm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 520de9b5633a..ecdb367dc9b8 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -1649,7 +1649,7 @@ EXPORT_SYMBOL_GPL(qcom_scm_qseecom_app_send);
* We do not yet support re-entrant calls via the qseecom interface. To prevent
+ any potential issues with this, only allow validated machines for now.
*/
-static const struct of_device_id qcom_scm_qseecom_allowlist[] = {
+static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = {
{ .compatible = "lenovo,thinkpad-x13s", },
{ }
};
--
2.34.1
On 11/20/23 19:56, Krzysztof Kozlowski wrote:
> For !OF builds, the qcom_scm_qseecom_allowlist is unused:
>
> drivers/firmware/qcom/qcom_scm.c:1652:34: error: ‘qcom_scm_qseecom_allowlist’ defined but not used [-Werror=unused-const-variable=]
>
> Fixes: 00b1248606ba ("firmware: qcom_scm: Add support for Qualcomm Secure Execution Environment SCM interface")
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> drivers/firmware/qcom/qcom_scm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> index 520de9b5633a..ecdb367dc9b8 100644
> --- a/drivers/firmware/qcom/qcom_scm.c
> +++ b/drivers/firmware/qcom/qcom_scm.c
> @@ -1649,7 +1649,7 @@ EXPORT_SYMBOL_GPL(qcom_scm_qseecom_app_send);
> * We do not yet support re-entrant calls via the qseecom interface. To prevent
> + any potential issues with this, only allow validated machines for now.
> */
> -static const struct of_device_id qcom_scm_qseecom_allowlist[] = {
> +static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = {
> { .compatible = "lenovo,thinkpad-x13s", },
> { }
> };
Thanks! Given that we're right now only allowing qseecom clients to load
on devices within that list, maybe it would be cleaner to make
QCOM_QSEECOM depend on OF explicitly instead?
Anyway, I'm also fine with this solution.
Acked-by: Maximilian Luz <[email protected]>
On 20/11/2023 20:56, Maximilian Luz wrote:
> On 11/20/23 19:56, Krzysztof Kozlowski wrote:
>> For !OF builds, the qcom_scm_qseecom_allowlist is unused:
>>
>> drivers/firmware/qcom/qcom_scm.c:1652:34: error: ‘qcom_scm_qseecom_allowlist’ defined but not used [-Werror=unused-const-variable=]
>>
>> Fixes: 00b1248606ba ("firmware: qcom_scm: Add support for Qualcomm Secure Execution Environment SCM interface")
>> Reported-by: kernel test robot <[email protected]>
>> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>> ---
>> drivers/firmware/qcom/qcom_scm.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
>> index 520de9b5633a..ecdb367dc9b8 100644
>> --- a/drivers/firmware/qcom/qcom_scm.c
>> +++ b/drivers/firmware/qcom/qcom_scm.c
>> @@ -1649,7 +1649,7 @@ EXPORT_SYMBOL_GPL(qcom_scm_qseecom_app_send);
>> * We do not yet support re-entrant calls via the qseecom interface. To prevent
>> + any potential issues with this, only allow validated machines for now.
>> */
>> -static const struct of_device_id qcom_scm_qseecom_allowlist[] = {
>> +static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = {
>> { .compatible = "lenovo,thinkpad-x13s", },
>> { }
>> };
>
> Thanks! Given that we're right now only allowing qseecom clients to load
> on devices within that list, maybe it would be cleaner to make
> QCOM_QSEECOM depend on OF explicitly instead?
There is no code dependency here. The driver should already depend on
ARCH_QCOM which select OF. Are you saying it does not depend on
ARCH_QCOM? Why?
>
> Anyway, I'm also fine with this solution.
>
> Acked-by: Maximilian Luz <[email protected]>
>
Best regards,
Krzysztof
Am 11/21/2023 um 8:07 AM schrieb Krzysztof Kozlowski:
> On 20/11/2023 20:56, Maximilian Luz wrote:
>> On 11/20/23 19:56, Krzysztof Kozlowski wrote:
>>> For !OF builds, the qcom_scm_qseecom_allowlist is unused:
>>>
>>> drivers/firmware/qcom/qcom_scm.c:1652:34: error: ‘qcom_scm_qseecom_allowlist’ defined but not used [-Werror=unused-const-variable=]
>>>
>>> Fixes: 00b1248606ba ("firmware: qcom_scm: Add support for Qualcomm Secure Execution Environment SCM interface")
>>> Reported-by: kernel test robot <[email protected]>
>>> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
>>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>> ---
>>> drivers/firmware/qcom/qcom_scm.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
>>> index 520de9b5633a..ecdb367dc9b8 100644
>>> --- a/drivers/firmware/qcom/qcom_scm.c
>>> +++ b/drivers/firmware/qcom/qcom_scm.c
>>> @@ -1649,7 +1649,7 @@ EXPORT_SYMBOL_GPL(qcom_scm_qseecom_app_send);
>>> * We do not yet support re-entrant calls via the qseecom interface. To prevent
>>> + any potential issues with this, only allow validated machines for now.
>>> */
>>> -static const struct of_device_id qcom_scm_qseecom_allowlist[] = {
>>> +static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = {
>>> { .compatible = "lenovo,thinkpad-x13s", },
>>> { }
>>> };
>>
>> Thanks! Given that we're right now only allowing qseecom clients to load
>> on devices within that list, maybe it would be cleaner to make
>> QCOM_QSEECOM depend on OF explicitly instead?
>
> There is no code dependency here.
Which is why I'm fine with this as well. It would just drop
currently unused code on !OF configs.
> The driver should already depend on
> ARCH_QCOM which select OF. Are you saying it does not depend on
> ARCH_QCOM? Why?
QCOM_QSEECOM depends only on QCOM_SCM. QCOM_SCM does not have
any dependencies. Instead, it is selected by ARCH_QCOM.
Best regards,
Max
On Mon, Nov 20, 2023 at 07:56:23PM +0100, Krzysztof Kozlowski wrote:
> For !OF builds, the qcom_scm_qseecom_allowlist is unused:
>
> drivers/firmware/qcom/qcom_scm.c:1652:34: error: ‘qcom_scm_qseecom_allowlist’ defined but not used [-Werror=unused-const-variable=]
>
> Fixes: 00b1248606ba ("firmware: qcom_scm: Add support for Qualcomm Secure Execution Environment SCM interface")
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Elliot Berman <[email protected]>
Hope this helps bump it :)
> ---
> drivers/firmware/qcom/qcom_scm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> index 520de9b5633a..ecdb367dc9b8 100644
> --- a/drivers/firmware/qcom/qcom_scm.c
> +++ b/drivers/firmware/qcom/qcom_scm.c
> @@ -1649,7 +1649,7 @@ EXPORT_SYMBOL_GPL(qcom_scm_qseecom_app_send);
> * We do not yet support re-entrant calls via the qseecom interface. To prevent
> + any potential issues with this, only allow validated machines for now.
> */
> -static const struct of_device_id qcom_scm_qseecom_allowlist[] = {
> +static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = {
> { .compatible = "lenovo,thinkpad-x13s", },
> { }
> };
> --
> 2.34.1
>
>
On Mon, 20 Nov 2023 19:56:23 +0100, Krzysztof Kozlowski wrote:
> For !OF builds, the qcom_scm_qseecom_allowlist is unused:
>
> drivers/firmware/qcom/qcom_scm.c:1652:34: error: ‘qcom_scm_qseecom_allowlist’ defined but not used [-Werror=unused-const-variable=]
>
>
Applied, thanks!
[1/1] firmware: qcom: qcm: fix unused qcom_scm_qseecom_allowlist
commit: e478c5fb6aa10af7b7edbff69bc8aef6fbb5f0ed
Best regards,
--
Bjorn Andersson <[email protected]>