Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755230AbbLIJyG (ORCPT ); Wed, 9 Dec 2015 04:54:06 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:45462 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754798AbbLIJlY (ORCPT ); Wed, 9 Dec 2015 04:41:24 -0500 From: Luis Henriques To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Roger Quadros , Sebastian Reichel , Luis Henriques Subject: [PATCH 3.16.y-ckt 097/126] hsi: omap_ssi_port: Prevent warning if cawake_gpio is not defined. Date: Wed, 9 Dec 2015 09:37:47 +0000 Message-Id: <1449653896-5236-98-git-send-email-luis.henriques@canonical.com> In-Reply-To: <1449653896-5236-1-git-send-email-luis.henriques@canonical.com> References: <1449653896-5236-1-git-send-email-luis.henriques@canonical.com> X-Extended-Stable: 3.16 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3929 Lines: 64 3.16.7-ckt21 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Roger Quadros commit e74eba049356fdad6713ab66322d9aeb0e85608b upstream. The error handling path is broken as cawake_gpio was defined as unsigned integer causing the following warnings on boards that don't use SSI port and so don't have cawake_gpio defined. e.g. beagleboard C4. [ 30.094635] WARNING: CPU: 0 PID: 322 at drivers/gpio/gpiolib.c:86 gpio_to_desc+0xa4/0xb8() [ 30.103363] invalid GPIO -2 [ 30.106292] Modules linked in: omap_ssi_port(+) cpufreq_dt cfbfillrect cfbimgblt leds_gpio cfbcopyarea thermal_sys led_class hwmon gpio_keys encoder_tfp410 connector_analog_tv connector_dvi omap_hdq snd phy_i [ 30.145477] CPU: 0 PID: 322 Comm: modprobe Not tainted 4.3.0-rc4-00030-gca978c0-dirty #335 [ 30.154174] Hardware name: Generic OMAP3-GP (Flattened Device Tree) [ 30.160827] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 30.168975] [] (show_stack) from [] (dump_stack+0x80/0x9c) [ 30.176635] [] (dump_stack) from [] (warn_slowpath_common+0x7c/0xb8) [ 30.185180] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [ 30.194366] [] (warn_slowpath_fmt) from [] (gpio_to_desc+0xa4/0xb8) [ 30.202819] [] (gpio_to_desc) from [] (gpio_request_one+0x14/0x11c) [ 30.211273] [] (gpio_request_one) from [] (devm_gpio_request_one+0x3c/0x78) [ 30.220458] [] (devm_gpio_request_one) from [] (ssi_port_probe+0x118/0x504 [omap_ssi_port]) [ 30.231170] [] (ssi_port_probe [omap_ssi_port]) from [] (platform_drv_probe+0x48/0xa4) [ 30.241424] [] (platform_drv_probe) from [] (driver_probe_device+0x1dc/0x2a0) [ 30.250793] [] (driver_probe_device) from [] (__driver_attach+0x94/0x98) [ 30.259643] [] (__driver_attach) from [] (bus_for_each_dev+0x54/0x88) [ 30.268249] [] (bus_for_each_dev) from [] (bus_add_driver+0xe8/0x1f8) [ 30.276916] [] (bus_add_driver) from [] (driver_register+0x78/0xf4) [ 30.285369] [] (driver_register) from [] (__platform_driver_probe+0x34/0xd8) [ 30.294647] [] (__platform_driver_probe) from [] (do_one_initcall+0x80/0x1d8) [ 30.303985] [] (do_one_initcall) from [] (do_init_module+0x5c/0x1cc) [ 30.312561] [] (do_init_module) from [] (load_module+0x18c8/0x1f0c) [ 30.320983] [] (load_module) from [] (SyS_init_module+0xdc/0x150) [ 30.329223] [] (SyS_init_module) from [] (ret_fast_syscall+0x0/0x1c) Fixes: b209e047bc743 ("HSI: Introduce OMAP SSI driver") Signed-off-by: Roger Quadros Signed-off-by: Sebastian Reichel Signed-off-by: Luis Henriques --- drivers/hsi/controllers/omap_ssi_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index 29aea0b93360..1c4d101c2844 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -1110,7 +1110,7 @@ static int __init ssi_port_probe(struct platform_device *pd) struct omap_ssi_port *omap_port; struct hsi_controller *ssi = dev_get_drvdata(pd->dev.parent); struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); - u32 cawake_gpio = 0; + int cawake_gpio = 0; u32 port_id; int err; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/