From patchwork Sat Mar 11 18:22:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9618915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 289DA604CC for ; Sat, 11 Mar 2017 18:25:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06EF628722 for ; Sat, 11 Mar 2017 18:25:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D879E2873B; Sat, 11 Mar 2017 18:25:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 494A928722 for ; Sat, 11 Mar 2017 18:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:Subject:From:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qwLLhlTK8LDEfi0oogexYvIhlmu+Sl2uAXI7ZBfzSUI=; b=PdCnWLn89htDo0 6wBQcyq28g+V3y109PzYu+OC55R6/btkY1rnTuIltNW+hb6fFozqttJd/3T2l/zl4yY3C1dL/pwBh axRZ39YkAVDskfYmwE6V63D0l+3x49Y1GOOkg+gAFsUMVoKYWrntk6IGAqTuVqmdnm0XLP9o3dlH8 xRAMb7eo97Ia5C+PG6xy3oQtGXQ6IaFAtxjVtXC/ZCQp0xjJCYiqUHgZQQpKEqAQo6We2RwWN5MiK bmIDAAA6CfgqMKZwPFEXVJP69K2LFS+OWF7oFireSwIqf281k8mXxlUwshm4Re2T9BcB9jxzHy6Sl ENJV/9dHAHRgIRlI0LuA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cmlhW-000267-Fe; Sat, 11 Mar 2017 18:25:10 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cmlhR-0000sB-Pi for linux-amlogic@lists.infradead.org; Sat, 11 Mar 2017 18:25:08 +0000 Received: by mail-wr0-x241.google.com with SMTP id l37so15221483wrc.3 for ; Sat, 11 Mar 2017 10:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=d4b9+b/DFgmfNu+jMuFWBPltHL2p/Kv+MmD3Wwdubf4=; b=NoQiUf7cU4zPj2s2cXn4LM0A8eSdzKpYHlcgubtCwlPV3b1kGLdrq78tqhz6HZ7hZB rXRROdGIChZBiR17C01Vv+8f6SH9GIs8mstvSE9UR/jFOlv0dOjte/FBW3pSWa0kwnx+ l63e+QOVaTN2FVWe4F1SXxQ3U970Ka08UKr+6urHkpBsKLzmUQy24VaWKXWH8L2dX3KZ q1YlAVoC7S4lnSbITkZw+H6uIkiQv8Zk4wVkXAJ56cWwft9rc4F+6rLHIY7OriqURJ6u wM+qQ9u7ycOaKs8txZ1O1AIuaUGOykpJ8mZgjBFShU/oFAgmmG2XpFS0Ckj0Tn1Wd5/s NFlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=d4b9+b/DFgmfNu+jMuFWBPltHL2p/Kv+MmD3Wwdubf4=; b=o5u5pptRxYRcmKTEbqXPNjrXjayeWyvJTctJOKYO42MfEzoPRrdcsUJvOno1mfHvmu hY9McyjMYuRCjEUhhf6TGVyYf9oO/zLVGxQkde8t18afEdFf4nD4SxEfsYCLlUc6g/8B fRWPfu5uk+TYv5UgpcvcRw+6aGwPmKNLYQ644vwY5wsHZ+tFbSKRvshDjQUFOGSf4rd2 cjjVtHlhYaqKcASn8MkkYNinAsuSNVedvyge7hqBIYMrWH6sFr27NZXnH5iUnAKcOsEc Iyf/87tggBBb+TGYHvfLhZoJk7YnxGU1Itms0WEQOAySGeEW4W++PCR0zKWUnAWEJgRD sEeA== X-Gm-Message-State: AMke39lOOT/2PRwCRUO9az3sYRgOM/6LXVO19iwNu1mv1kRWzts6UDWBkx7XdS3E2PEwHw== X-Received: by 10.223.152.83 with SMTP id v77mr21137244wrb.109.1489256683274; Sat, 11 Mar 2017 10:24:43 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:3419:a191:120:8b2e? (p200300C6EBDC40003419A19101208B2E.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:3419:a191:120:8b2e]) by smtp.googlemail.com with ESMTPSA id p93sm18084601wrc.67.2017.03.11.10.24.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Mar 2017 10:24:42 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v3 02/10] i2c: meson: remove member irq from struct meson_i2c To: Wolfram Sang , Jerome Brunet References: Message-ID: Date: Sat, 11 Mar 2017 19:22:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170311_102506_035769_C7E55569 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, "linux-i2c@vger.kernel.org" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Member irq can be replaced with a local variable in probe because it's nowhere else accessed. Signed-off-by: Heiner Kallweit Reviewed-by: Jerome Brunet --- v2: - added Reviewed-by v3: - no changes --- drivers/i2c/busses/i2c-meson.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c index 40e5da9a..50059d09 100644 --- a/drivers/i2c/busses/i2c-meson.c +++ b/drivers/i2c/busses/i2c-meson.c @@ -82,7 +82,6 @@ struct meson_i2c { struct device *dev; void __iomem *regs; struct clk *clk; - int irq; struct i2c_msg *msg; int state; @@ -391,7 +390,7 @@ static int meson_i2c_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct meson_i2c *i2c; struct resource *mem; - int ret = 0; + int irq, ret = 0; i2c = devm_kzalloc(&pdev->dev, sizeof(struct meson_i2c), GFP_KERNEL); if (!i2c) @@ -418,14 +417,14 @@ static int meson_i2c_probe(struct platform_device *pdev) if (IS_ERR(i2c->regs)) return PTR_ERR(i2c->regs); - i2c->irq = platform_get_irq(pdev, 0); - if (i2c->irq < 0) { + irq = platform_get_irq(pdev, 0); + if (irq < 0) { dev_err(&pdev->dev, "can't find IRQ\n"); - return i2c->irq; + return irq; } - ret = devm_request_irq(&pdev->dev, i2c->irq, meson_i2c_irq, - 0, dev_name(&pdev->dev), i2c); + ret = devm_request_irq(&pdev->dev, irq, meson_i2c_irq, 0, + dev_name(&pdev->dev), i2c); if (ret < 0) { dev_err(&pdev->dev, "can't request IRQ\n"); return ret;