'conf_items' is used only in this file. Silences the below
sparse warning:
drivers/pinctrl/pinconf-generic.c:37:24: warning:
symbol 'conf_items' was not declared. Should it be static?
Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/pinctrl/pinconf-generic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 9c43685..791e6a3 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -34,7 +34,7 @@ struct pin_config_item {
#define PCONFDUMP(a, b, c) { .param = a, .display = b, .format = c }
-struct pin_config_item conf_items[] = {
+static struct pin_config_item conf_items[] = {
PCONFDUMP(PIN_CONFIG_BIAS_DISABLE, "input bias disabled", NULL),
PCONFDUMP(PIN_CONFIG_BIAS_HIGH_IMPEDANCE, "input bias high impedance", NULL),
PCONFDUMP(PIN_CONFIG_BIAS_PULL_UP, "input bias pull up", NULL),
--
1.7.4.1
Fixes the following type of checkpatch errors:
ERROR: space required before the open parenthesis '('
Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/pinctrl/pinconf-generic.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 791e6a3..2ad5a8d 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -60,7 +60,7 @@ void pinconf_generic_dump_pin(struct pinctrl_dev *pctldev,
if (!ops->is_generic)
return;
- for(i = 0; i < ARRAY_SIZE(conf_items); i++) {
+ for (i = 0; i < ARRAY_SIZE(conf_items); i++) {
unsigned long config;
int ret;
@@ -95,7 +95,7 @@ void pinconf_generic_dump_group(struct pinctrl_dev *pctldev,
if (!ops->is_generic)
return;
- for(i = 0; i < ARRAY_SIZE(conf_items); i++) {
+ for (i = 0; i < ARRAY_SIZE(conf_items); i++) {
unsigned long config;
int ret;
@@ -126,7 +126,7 @@ void pinconf_generic_dump_config(struct pinctrl_dev *pctldev,
{
int i;
- for(i = 0; i < ARRAY_SIZE(conf_items); i++) {
+ for (i = 0; i < ARRAY_SIZE(conf_items); i++) {
if (pinconf_to_config_param(config) != conf_items[i].param)
continue;
seq_printf(s, "%s: 0x%x", conf_items[i].display,
--
1.7.4.1
On Fri, Mar 15, 2013 at 5:53 AM, Sachin Kamat <[email protected]> wrote:
> 'conf_items' is used only in this file. Silences the below
> sparse warning:
> drivers/pinctrl/pinconf-generic.c:37:24: warning:
> symbol 'conf_items' was not declared. Should it be static?
>
> Signed-off-by: Sachin Kamat <[email protected]>
Nice catch! Nice sparseing!
Patch applied!
Thanks,
Linus Walleij
On Fri, Mar 15, 2013 at 5:53 AM, Sachin Kamat <[email protected]> wrote:
> Fixes the following type of checkpatch errors:
> ERROR: space required before the open parenthesis '('
>
> Signed-off-by: Sachin Kamat <[email protected]>
Patch applied!
Thanks,
Linus Walleij