OSDN Git Service

usb: typec: tcpci_maxim: Make symbol 'max_tcpci_tcpci_write_table' static
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 24 Mar 2021 14:42:53 +0000 (14:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Mar 2021 13:28:33 +0000 (14:28 +0100)
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>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210324144253.1011234-1-weiyongjun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpci_maxim.c

index 041a1c3..df25055 100644 (file)
@@ -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),
 };