diff mbox series

pinctrl: meson: fix unused variable warning

Message ID 20220329060821.15251-1-qianggui.song@amlogic.com (mailing list archive)
State Superseded
Headers show
Series pinctrl: meson: fix unused variable warning | expand

Commit Message

Qianggui Song March 29, 2022, 6:08 a.m. UTC
The kernel test robot reported a warning as below:
>> drivers/pinctrl/meson/pinctrl-meson-s4.c:178:27: warning: unused variable 'tdm_sclk1_c_pins' [-Wunused-const-variable]
   static const unsigned int tdm_sclk1_c_pins[]            = { GPIOC_3 };

Fix it by adding missing description about this pins

Fixes: 775214d389c2 ("pinctrl: meson: add pinctrl driver support for Meson-S4 Soc")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
---
 drivers/pinctrl/meson/pinctrl-meson-s4.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jerome Brunet March 29, 2022, 8:21 a.m. UTC | #1
On Tue 29 Mar 2022 at 14:08, Qianggui Song <qianggui.song@amlogic.com> wrote:

> The kernel test robot reported a warning as below:
>>> drivers/pinctrl/meson/pinctrl-meson-s4.c:178:27: warning: unused variable 'tdm_sclk1_c_pins' [-Wunused-const-variable]
>    static const unsigned int tdm_sclk1_c_pins[]            = { GPIOC_3 };
>
> Fix it by adding missing description about this pins
>
> Fixes: 775214d389c2 ("pinctrl: meson: add pinctrl driver support for Meson-S4 Soc")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
> ---
>  drivers/pinctrl/meson/pinctrl-meson-s4.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pinctrl/meson/pinctrl-meson-s4.c b/drivers/pinctrl/meson/pinctrl-meson-s4.c
> index 3c7358f53302..067c6749c849 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson-s4.c
> +++ b/drivers/pinctrl/meson/pinctrl-meson-s4.c
> @@ -575,6 +575,7 @@ static struct meson_pmx_group meson_s4_periphs_groups[] = {
>  	GROUP(tdm_d2_c,			4),
>  	GROUP(tdm_d3_c,			4),
>  	GROUP(tdm_fs1_c,		4),
> +	GROUP(tdm_sclk1_c,		4),
>  	GROUP(mclk_1_c,			4),
>  	GROUP(tdm_d4_c,			4),
>  	GROUP(tdm_d5_c,			4),
> @@ -937,6 +938,7 @@ static const char * const iso7816_groups[] = {
>  
>  static const char * const tdm_groups[] = {
>  	"tdm_d2_c", "tdm_d3_c", "tdm_fs1_c", "tdm_d4_c", "tdm_d5_c",
> +	"tdm_sclk1_c",

Thanks for fixing this.
Could you please try to keep this list somehow ordered a bit ?
Here you are adding a new line in the middle with single entry ... it
looks weird. 

>  	"tdm_fs1_d", "tdm_d4_d", "tdm_d3_d", "tdm_d2_d", "tdm_sclk1_d",
>  	"tdm_sclk1_h", "tdm_fs1_h", "tdm_d2_h", "tdm_d3_h", "tdm_d4_h",
>  	"tdm_d1", "tdm_d0", "tdm_fs0", "tdm_sclk0", "tdm_fs2", "tdm_sclk2",
Qianggui Song March 29, 2022, 8:54 a.m. UTC | #2
On 3/29/22 16:21, Jerome Brunet wrote:
> 
> On Tue 29 Mar 2022 at 14:08, Qianggui Song <qianggui.song@amlogic.com> wrote:
> 
>> The kernel test robot reported a warning as below:
>>>> drivers/pinctrl/meson/pinctrl-meson-s4.c:178:27: warning: unused variable 'tdm_sclk1_c_pins' [-Wunused-const-variable]
>>     static const unsigned int tdm_sclk1_c_pins[]            = { GPIOC_3 };
>>
>> Fix it by adding missing description about this pins
>>
>> Fixes: 775214d389c2 ("pinctrl: meson: add pinctrl driver support for Meson-S4 Soc")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
>> ---
>>   drivers/pinctrl/meson/pinctrl-meson-s4.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/pinctrl/meson/pinctrl-meson-s4.c b/drivers/pinctrl/meson/pinctrl-meson-s4.c
>> index 3c7358f53302..067c6749c849 100644
>> --- a/drivers/pinctrl/meson/pinctrl-meson-s4.c
>> +++ b/drivers/pinctrl/meson/pinctrl-meson-s4.c
>> @@ -575,6 +575,7 @@ static struct meson_pmx_group meson_s4_periphs_groups[] = {
>>   	GROUP(tdm_d2_c,			4),
>>   	GROUP(tdm_d3_c,			4),
>>   	GROUP(tdm_fs1_c,		4),
>> +	GROUP(tdm_sclk1_c,		4),
>>   	GROUP(mclk_1_c,			4),
>>   	GROUP(tdm_d4_c,			4),
>>   	GROUP(tdm_d5_c,			4),
>> @@ -937,6 +938,7 @@ static const char * const iso7816_groups[] = {
>>   
>>   static const char * const tdm_groups[] = {
>>   	"tdm_d2_c", "tdm_d3_c", "tdm_fs1_c", "tdm_d4_c", "tdm_d5_c",
>> +	"tdm_sclk1_c",
> 
> Thanks for fixing this.
> Could you please try to keep this list somehow ordered a bit ?
> Here you are adding a new line in the middle with single entry ... it
> looks weird.
> 
>>   	"tdm_fs1_d", "tdm_d4_d", "tdm_d3_d", "tdm_d2_d", "tdm_sclk1_d",
>>   	"tdm_sclk1_h", "tdm_fs1_h", "tdm_d2_h", "tdm_d3_h", "tdm_d4_h",
>>   	"tdm_d1", "tdm_d0", "tdm_fs0", "tdm_sclk0", "tdm_fs2", "tdm_sclk2",
> 
> .
Just think that put the tdm_sclk1_c in first line make line too long. 
Okay, will put it to first line next patch that make one line per bank 
for pins in order.
diff mbox series

Patch

diff --git a/drivers/pinctrl/meson/pinctrl-meson-s4.c b/drivers/pinctrl/meson/pinctrl-meson-s4.c
index 3c7358f53302..067c6749c849 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-s4.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-s4.c
@@ -575,6 +575,7 @@  static struct meson_pmx_group meson_s4_periphs_groups[] = {
 	GROUP(tdm_d2_c,			4),
 	GROUP(tdm_d3_c,			4),
 	GROUP(tdm_fs1_c,		4),
+	GROUP(tdm_sclk1_c,		4),
 	GROUP(mclk_1_c,			4),
 	GROUP(tdm_d4_c,			4),
 	GROUP(tdm_d5_c,			4),
@@ -937,6 +938,7 @@  static const char * const iso7816_groups[] = {
 
 static const char * const tdm_groups[] = {
 	"tdm_d2_c", "tdm_d3_c", "tdm_fs1_c", "tdm_d4_c", "tdm_d5_c",
+	"tdm_sclk1_c",
 	"tdm_fs1_d", "tdm_d4_d", "tdm_d3_d", "tdm_d2_d", "tdm_sclk1_d",
 	"tdm_sclk1_h", "tdm_fs1_h", "tdm_d2_h", "tdm_d3_h", "tdm_d4_h",
 	"tdm_d1", "tdm_d0", "tdm_fs0", "tdm_sclk0", "tdm_fs2", "tdm_sclk2",