From patchwork Wed Oct 14 10:44:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 54899 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id DAD3320490 for ; Wed, 14 Oct 2015 10:44:44 +0000 (UTC) Received: by wijq8 with SMTP id q8sf24447471wij.1 for ; Wed, 14 Oct 2015 03:44:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=8UtgedTspJ4iG06JYU0/pVAzxxTPqZ+tf74PND5JnQQ=; b=DM3lk/LCbWhaBf2GfZnx9mVzccbG8LKNAsk4JJBLmm2FLXg78GlfhJTeKtQNt+rFeU wxd9Iv8yBiREh/SEQRiFAdfh2Y+pZ3VWr4FDNKEkjJc0Ij5zmbKVBFTP0S70QOvN6Be2 5Ru8bH2KI5Xh3I2wXI1wjc2T4xaURQpPBHEUoq7IrncpCjsg12Hf7CBXM1OK+pYgiYJW HcwWCfdmBD8zI9UNXPe4QJii2W9XPGEO5apH5UOflW2eLuG2GUufE93imuD1NjxKfaHZ PpCDCUBDGW4+IPoIFe7OZxRNocraZ1om5xrF33WW51wp6pG6ZeAwxqyJRj2W62S9mlES d7/Q== X-Gm-Message-State: ALoCoQmLIx0oUuoPP4xpvNa+++JXubgBGoW8eru5Yp35/UnT6o7gsEpTzUvBOnjppBcdNmCzirq4 X-Received: by 10.180.10.202 with SMTP id k10mr5369142wib.2.1444819484240; Wed, 14 Oct 2015 03:44:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.152.199 with SMTP id a190ls24347lfe.62.gmail; Wed, 14 Oct 2015 03:44:44 -0700 (PDT) X-Received: by 10.25.18.39 with SMTP id h39mr813126lfi.7.1444819484086; Wed, 14 Oct 2015 03:44:44 -0700 (PDT) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id r10si5117258lfg.142.2015.10.14.03.44.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 03:44:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by lffy185 with SMTP id y185so9165213lff.2 for ; Wed, 14 Oct 2015 03:44:43 -0700 (PDT) X-Received: by 10.25.210.206 with SMTP id j197mr802153lfg.86.1444819483723; Wed, 14 Oct 2015 03:44:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2648075lbq; Wed, 14 Oct 2015 03:44:42 -0700 (PDT) X-Received: by 10.68.65.37 with SMTP id u5mr3017092pbs.76.1444819482664; Wed, 14 Oct 2015 03:44:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bx3si12349002pbc.35.2015.10.14.03.44.42; Wed, 14 Oct 2015 03:44:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753119AbbJNKok (ORCPT + 5 others); Wed, 14 Oct 2015 06:44:40 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:36851 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753065AbbJNKoe (ORCPT ); Wed, 14 Oct 2015 06:44:34 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id t9EAiPPg017290; Wed, 14 Oct 2015 05:44:25 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t9EAiOdd029720; Wed, 14 Oct 2015 05:44:24 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Wed, 14 Oct 2015 05:44:24 -0500 Received: from rockdesk.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t9EAiIXD018360; Wed, 14 Oct 2015 05:44:21 -0500 From: Roger Quadros To: CC: , , , , , , Roger Quadros Subject: [PATCH 1/2] hsi: omap_ssi_port: Prevent warning if cawake_gpio is not defined. Date: Wed, 14 Oct 2015 13:44:15 +0300 Message-ID: <1444819456-26728-2-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444819456-26728-1-git-send-email-rogerq@ti.com> References: <1444819456-26728-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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) Signed-off-by: Roger Quadros --- 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 1f8652b..02e6603 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -1111,7 +1111,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;