diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-08-25 16:19:50 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-08-25 16:20:59 -0400 |
commit | 763d77b127bec4aaacffd904238b30d4860d5b2d (patch) | |
tree | 7bfb28c578c181bbfd6b24f061f60ab8f120c2e9 | |
parent | 1bea03301c1ca2651154129ec733e0b5cd1f8138 (diff) | |
download | longterm-queue-4.12-763d77b127bec4aaacffd904238b30d4860d5b2d.tar.gz |
gpio: drop patch adding several new build warnings
drivers/gpio/gpiolib-devprop.c: In function ‘devprop_gpiochip_set_names’:
drivers/gpio/gpiolib-devprop.c:36:42: warning: passing argument 1 of ‘fwnode_property_read_string_array’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ret = fwnode_property_read_string_array(fwnode, "gpio-line-names",
^
In file included from drivers/gpio/gpiolib-devprop.c:12:0:
./include/linux/property.h:67:5: note: expected ‘struct fwnode_handle *’ but argument is of type ‘const struct fwnode_handle *’
int fwnode_property_read_string_array(struct fwnode_handle *fwnode,
^
drivers/gpio/gpiolib-devprop.c:52:42: warning: passing argument 1 of ‘fwnode_property_read_string_array’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ret = fwnode_property_read_string_array(fwnode, "gpio-line-names",
^
In file included from drivers/gpio/gpiolib-devprop.c:12:0:
./include/linux/property.h:67:5: note: expected ‘struct fwnode_handle *’ but argument is of type ‘const struct fwnode_handle *’
int fwnode_property_read_string_array(struct fwnode_handle *fwnode,
^
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/gpio-fix-gpio-line-names-property-retrieval.patch | 123 | ||||
-rw-r--r-- | queue/series | 1 | ||||
-rw-r--r-- | queue/usbip-prevent-leaking-socket-pointer-address-in-mess.patch | 5 |
3 files changed, 3 insertions, 126 deletions
diff --git a/queue/gpio-fix-gpio-line-names-property-retrieval.patch b/queue/gpio-fix-gpio-line-names-property-retrieval.patch deleted file mode 100644 index 931ed86..0000000 --- a/queue/gpio-fix-gpio-line-names-property-retrieval.patch +++ /dev/null @@ -1,123 +0,0 @@ -From f2f2a33131c15dd4b54adbfa3c96d69618e07524 Mon Sep 17 00:00:00 2001 -From: Christophe Leroy <christophe.leroy@c-s.fr> -Date: Fri, 15 Dec 2017 15:02:33 +0100 -Subject: [PATCH] gpio: fix "gpio-line-names" property retrieval - -commit 822703354774ec935169cbbc8d503236bcb54fda upstream. - -Following commit 9427ecbed46cc ("gpio: Rework of_gpiochip_set_names() -to use device property accessors"), "gpio-line-names" DT property is -not retrieved anymore when chip->parent is not set by the driver. -This is due to OF based property reads having been replaced by device -based property reads. - -This patch fixes that by making use of -fwnode_property_read_string_array() instead of -device_property_read_string_array() and handing over either -of_fwnode_handle(chip->of_node) or dev_fwnode(chip->parent) -to that function. - -Fixes: 9427ecbed46cc ("gpio: Rework of_gpiochip_set_names() to use device property accessors") -Cc: stable@vger.kernel.org -Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> -Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> -Signed-off-by: Linus Walleij <linus.walleij@linaro.org> -Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> - -diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c -index 8fa5fcd00e9a..6d02e07639cf 100644 ---- a/drivers/gpio/gpiolib-acpi.c -+++ b/drivers/gpio/gpiolib-acpi.c -@@ -1004,7 +1004,7 @@ void acpi_gpiochip_add(struct gpio_chip *chip) - } - - if (!chip->names) -- devprop_gpiochip_set_names(chip); -+ devprop_gpiochip_set_names(chip, dev_fwnode(chip->parent)); - - acpi_gpiochip_request_regions(acpi_gpio); - acpi_gpiochip_scan_gpios(acpi_gpio); -diff --git a/drivers/gpio/gpiolib-devprop.c b/drivers/gpio/gpiolib-devprop.c -index 27f383bda7d9..f748aa3e77f7 100644 ---- a/drivers/gpio/gpiolib-devprop.c -+++ b/drivers/gpio/gpiolib-devprop.c -@@ -19,30 +19,27 @@ - /** - * devprop_gpiochip_set_names - Set GPIO line names using device properties - * @chip: GPIO chip whose lines should be named, if possible -+ * @fwnode: Property Node containing the gpio-line-names property - * - * Looks for device property "gpio-line-names" and if it exists assigns - * GPIO line names for the chip. The memory allocated for the assigned - * names belong to the underlying firmware node and should not be released - * by the caller. - */ --void devprop_gpiochip_set_names(struct gpio_chip *chip) -+void devprop_gpiochip_set_names(struct gpio_chip *chip, -+ const struct fwnode_handle *fwnode) - { - struct gpio_device *gdev = chip->gpiodev; - const char **names; - int ret, i; - -- if (!chip->parent) { -- dev_warn(&gdev->dev, "GPIO chip parent is NULL\n"); -- return; -- } -- -- ret = device_property_read_string_array(chip->parent, "gpio-line-names", -+ ret = fwnode_property_read_string_array(fwnode, "gpio-line-names", - NULL, 0); - if (ret < 0) - return; - - if (ret != gdev->ngpio) { -- dev_warn(chip->parent, -+ dev_warn(&gdev->dev, - "names %d do not match number of GPIOs %d\n", ret, - gdev->ngpio); - return; -@@ -52,10 +49,10 @@ void devprop_gpiochip_set_names(struct gpio_chip *chip) - if (!names) - return; - -- ret = device_property_read_string_array(chip->parent, "gpio-line-names", -+ ret = fwnode_property_read_string_array(fwnode, "gpio-line-names", - names, gdev->ngpio); - if (ret < 0) { -- dev_warn(chip->parent, "failed to read GPIO line names\n"); -+ dev_warn(&gdev->dev, "failed to read GPIO line names\n"); - kfree(names); - return; - } -diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c -index b13b7c7c335f..e6d51e018bf1 100644 ---- a/drivers/gpio/gpiolib-of.c -+++ b/drivers/gpio/gpiolib-of.c -@@ -492,7 +492,8 @@ int of_gpiochip_add(struct gpio_chip *chip) - - /* If the chip defines names itself, these take precedence */ - if (!chip->names) -- devprop_gpiochip_set_names(chip); -+ devprop_gpiochip_set_names(chip, -+ of_fwnode_handle(chip->of_node)); - - of_node_get(chip->of_node); - -diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h -index 2495b7ee1b42..0799a25c130d 100644 ---- a/drivers/gpio/gpiolib.h -+++ b/drivers/gpio/gpiolib.h -@@ -210,7 +210,8 @@ static int __maybe_unused gpio_chip_hwgpio(const struct gpio_desc *desc) - return desc - &desc->gdev->descs[0]; - } - --void devprop_gpiochip_set_names(struct gpio_chip *chip); -+void devprop_gpiochip_set_names(struct gpio_chip *chip, -+ const struct fwnode_handle *fwnode); - - /* With descriptor prefix */ - --- -2.15.0 - diff --git a/queue/series b/queue/series index abe4221..97f7dc3 100644 --- a/queue/series +++ b/queue/series @@ -8,7 +8,6 @@ ASoC-da7218-fix-fix-child-node-lookup.patch ASoC-fsl_ssi-AC-97-ops-need-regmap-clock-and-cleanin.patch ASoC-twl4030-fix-child-node-lookup.patch ASoC-tlv320aic31xx-Fix-GPIO1-register-definition.patch -gpio-fix-gpio-line-names-property-retrieval.patch IB-mlx5-Serialize-access-to-the-VMA-list.patch IB-uverbs-Fix-command-checking-as-part-of-ib_uverbs_.patch ALSA-hda-Drop-useless-WARN_ON.patch diff --git a/queue/usbip-prevent-leaking-socket-pointer-address-in-mess.patch b/queue/usbip-prevent-leaking-socket-pointer-address-in-mess.patch index be29642..90d6249 100644 --- a/queue/usbip-prevent-leaking-socket-pointer-address-in-mess.patch +++ b/queue/usbip-prevent-leaking-socket-pointer-address-in-mess.patch @@ -12,6 +12,7 @@ are useful for debugging. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +[PG: drop printing sockfd number - does not exist on 4.12.x] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> diff --git a/drivers/usb/usbip/stub_dev.c b/drivers/usb/usbip/stub_dev.c @@ -24,7 +25,7 @@ index c653ce533430..720408d39f11 100644 if (ud->tcp_socket) { - dev_dbg(&sdev->udev->dev, "shutdown tcp_socket %p\n", - ud->tcp_socket); -+ dev_dbg(&sdev->udev->dev, "shutdown sockfd %d\n", ud->sockfd); ++ dev_dbg(&sdev->udev->dev, "shutdown sockfd\n"); kernel_sock_shutdown(ud->tcp_socket, SHUT_RDWR); } @@ -73,7 +74,7 @@ index 0585078638db..1485603890c9 100644 /* need this? see stub_dev.c */ if (ud->tcp_socket) { - pr_debug("shutdown tcp_socket %p\n", ud->tcp_socket); -+ pr_debug("shutdown tcp_socket %d\n", ud->sockfd); ++ pr_debug("shutdown tcp_socket\n"); kernel_sock_shutdown(ud->tcp_socket, SHUT_RDWR); } |