diff mbox series

soc: mediatek: mtk-svs: Explicitly include bitfield header

Message ID 20220829204439.3748648-1-nfraprado@collabora.com (mailing list archive)
State New, archived
Headers show
Series soc: mediatek: mtk-svs: Explicitly include bitfield header | expand

Commit Message

Nícolas F. R. A. Prado Aug. 29, 2022, 8:44 p.m. UTC
Commit a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros
where possible") introduced the use of FIELD_GET and FIELD_PREP macros,
which are defined in the bitfield header. Add an explicit include for it
so we're sure to have the symbols defined independently of the config.

Fixes: a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros where possible")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

---

 drivers/soc/mediatek/mtk-svs.c | 1 +
 1 file changed, 1 insertion(+)

Comments

AngeloGioacchino Del Regno Aug. 30, 2022, 7:20 a.m. UTC | #1
Il 29/08/22 22:44, Nícolas F. R. A. Prado ha scritto:
> Commit a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros
> where possible") introduced the use of FIELD_GET and FIELD_PREP macros,
> which are defined in the bitfield header. Add an explicit include for it
> so we're sure to have the symbols defined independently of the config.
> 
> Fixes: a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros where possible")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Matthias Brugger Aug. 30, 2022, 7:37 a.m. UTC | #2
On 29/08/2022 22:44, Nícolas F. R. A. Prado wrote:
> Commit a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros
> where possible") introduced the use of FIELD_GET and FIELD_PREP macros,
> which are defined in the bitfield header. Add an explicit include for it
> so we're sure to have the symbols defined independently of the config.
> 
> Fixes: a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros where possible")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 
> ---
> 
>   drivers/soc/mediatek/mtk-svs.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
> index 64dba9f830f3..f67f3e971653 100644
> --- a/drivers/soc/mediatek/mtk-svs.c
> +++ b/drivers/soc/mediatek/mtk-svs.c
> @@ -3,6 +3,7 @@
>    * Copyright (C) 2022 MediaTek Inc.
>    */
>   
> +#include <linux/bitfield.h>
>   #include <linux/bits.h>

What do we need the bits.h for?

Regards,
Matthias

>   #include <linux/clk.h>
>   #include <linux/completion.h>
AngeloGioacchino Del Regno Aug. 30, 2022, 8:06 a.m. UTC | #3
Il 30/08/22 09:37, Matthias Brugger ha scritto:
> 
> 
> On 29/08/2022 22:44, Nícolas F. R. A. Prado wrote:
>> Commit a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros
>> where possible") introduced the use of FIELD_GET and FIELD_PREP macros,
>> which are defined in the bitfield header. Add an explicit include for it
>> so we're sure to have the symbols defined independently of the config.
>>
>> Fixes: a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros where 
>> possible")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>>
>> ---
>>
>>   drivers/soc/mediatek/mtk-svs.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
>> index 64dba9f830f3..f67f3e971653 100644
>> --- a/drivers/soc/mediatek/mtk-svs.c
>> +++ b/drivers/soc/mediatek/mtk-svs.c
>> @@ -3,6 +3,7 @@
>>    * Copyright (C) 2022 MediaTek Inc.
>>    */
>> +#include <linux/bitfield.h>
>>   #include <linux/bits.h>
> 
> What do we need the bits.h for?
> 

bits.h has the definition for GENMASK(h, l), used in this file :-)

Cheers,
Angelo

> Regards,
> Matthias
> 
>>   #include <linux/clk.h>
>>   #include <linux/completion.h>
Matthias Brugger Aug. 30, 2022, 8:56 a.m. UTC | #4
On 30/08/2022 10:06, AngeloGioacchino Del Regno wrote:
> Il 30/08/22 09:37, Matthias Brugger ha scritto:
>>
>>
>> On 29/08/2022 22:44, Nícolas F. R. A. Prado wrote:
>>> Commit a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros
>>> where possible") introduced the use of FIELD_GET and FIELD_PREP macros,
>>> which are defined in the bitfield header. Add an explicit include for it
>>> so we're sure to have the symbols defined independently of the config.
>>>
>>> Fixes: a92438c5a30a ("soc: mediatek: mtk-svs: Use bitfield access macros 
>>> where possible")
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>>>
>>> ---
>>>
>>>   drivers/soc/mediatek/mtk-svs.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
>>> index 64dba9f830f3..f67f3e971653 100644
>>> --- a/drivers/soc/mediatek/mtk-svs.c
>>> +++ b/drivers/soc/mediatek/mtk-svs.c
>>> @@ -3,6 +3,7 @@
>>>    * Copyright (C) 2022 MediaTek Inc.
>>>    */
>>> +#include <linux/bitfield.h>
>>>   #include <linux/bits.h>
>>
>> What do we need the bits.h for?
>>
> 
> bits.h has the definition for GENMASK(h, l), used in this file :-)
> 

Right, seems that some other include includes bits.h as well, as compilation 
does not break. But we probably don't want to rely on that for the future.

Applied thanks.

> Cheers,
> Angelo
> 
>> Regards,
>> Matthias
>>
>>>   #include <linux/clk.h>
>>>   #include <linux/completion.h>
> 
>
diff mbox series

Patch

diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index 64dba9f830f3..f67f3e971653 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -3,6 +3,7 @@ 
  * Copyright (C) 2022 MediaTek Inc.
  */
 
+#include <linux/bitfield.h>
 #include <linux/bits.h>
 #include <linux/clk.h>
 #include <linux/completion.h>