Message ID | 20210324144253.1011234-1-weiyongjun1@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 601144568ce09f0ca47834ce6cb535cd1cb70b55 |
Headers | show |
Series | [-next] usb: typec: tcpci_maxim: Make symbol 'max_tcpci_tcpci_write_table' static | expand |
On Wed, Mar 24, 2021 at 02:42:53PM +0000, 'Wei Yongjun wrote: > From: Wei Yongjun <weiyongjun1@huawei.com> > > The sparse tool complains as follows: > > drivers/usb/typec/tcpm/tcpci_maxim.c:55:34: warning: > symbol 'max_tcpci_tcpci_write_table' was not declared. Should it be static? > > This symbol is not used outside of tcpci_maxim.c, so this > commit marks it static. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> > --- > drivers/usb/typec/tcpm/tcpci_maxim.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c > index 041a1c393594..df2505570f07 100644 > --- a/drivers/usb/typec/tcpm/tcpci_maxim.c > +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c > @@ -52,7 +52,7 @@ static const struct regmap_range max_tcpci_tcpci_range[] = { > regmap_reg_range(0x00, 0x95) > }; > > -const struct regmap_access_table max_tcpci_tcpci_write_table = { > +static const struct regmap_access_table max_tcpci_tcpci_write_table = { > .yes_ranges = max_tcpci_tcpci_range, > .n_yes_ranges = ARRAY_SIZE(max_tcpci_tcpci_range), > }; >
Wed, Mar 24, 2021 at 02:42:53PM +0000, 'Wei Yongjun kirjoitti: > From: Wei Yongjun <weiyongjun1@huawei.com> > > The sparse tool complains as follows: > > drivers/usb/typec/tcpm/tcpci_maxim.c:55:34: warning: > symbol 'max_tcpci_tcpci_write_table' was not declared. Should it be static? > > This symbol is not used outside of tcpci_maxim.c, so this > commit marks it static. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > --- > drivers/usb/typec/tcpm/tcpci_maxim.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c > index 041a1c393594..df2505570f07 100644 > --- a/drivers/usb/typec/tcpm/tcpci_maxim.c > +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c > @@ -52,7 +52,7 @@ static const struct regmap_range max_tcpci_tcpci_range[] = { > regmap_reg_range(0x00, 0x95) > }; > > -const struct regmap_access_table max_tcpci_tcpci_write_table = { > +static const struct regmap_access_table max_tcpci_tcpci_write_table = { > .yes_ranges = max_tcpci_tcpci_range, > .n_yes_ranges = ARRAY_SIZE(max_tcpci_tcpci_range), > };
diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c index 041a1c393594..df2505570f07 100644 --- a/drivers/usb/typec/tcpm/tcpci_maxim.c +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c @@ -52,7 +52,7 @@ static const struct regmap_range max_tcpci_tcpci_range[] = { regmap_reg_range(0x00, 0x95) }; -const struct regmap_access_table max_tcpci_tcpci_write_table = { +static const struct regmap_access_table max_tcpci_tcpci_write_table = { .yes_ranges = max_tcpci_tcpci_range, .n_yes_ranges = ARRAY_SIZE(max_tcpci_tcpci_range), };