From patchwork Tue Sep 25 09:03:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 10613735 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92A9E112B for ; Tue, 25 Sep 2018 09:05:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 841662908E for ; Tue, 25 Sep 2018 09:05:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 782D72931C; Tue, 25 Sep 2018 09:05:19 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 183492908E for ; Tue, 25 Sep 2018 09:05:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727526AbeIYPLu (ORCPT ); Tue, 25 Sep 2018 11:11:50 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38668 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726356AbeIYPL2 (ORCPT ); Tue, 25 Sep 2018 11:11:28 -0400 Received: by mail-wm1-f65.google.com with SMTP id z16-v6so6329022wmi.3 for ; Tue, 25 Sep 2018 02:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2GO8tdB0VqF/b2ulgCZCuFFs0ie3KdkmUxeTxxbYG3I=; b=KOyh3egXVnoup8Dg4CvBj/Aq3XnB2Z9Jn0rwy6SseExGuOW/eWS4yRRbJpX7hLf7f7 3pa0iMIQy0wrYn+04NfvD3SqceW9W1svCl3IywZ70NMtIkJy/JqRewnMHs/115//+MVh tMmjyJ3gAe78KtjmMXn3uIsWF7P5AZXlmGz/M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2GO8tdB0VqF/b2ulgCZCuFFs0ie3KdkmUxeTxxbYG3I=; b=LGZ0uzaN3wuP27e1F4aLEA0pHOjvLAyoj/fOY5M0pDv7Gbdz+26HiK4qx0sHn17yii uykDamNySF0iILnIBIzzVJY33aFhYp//q5pKcJuVALla1e+wy7gbOdTzi3lkLT+fBHBs 3tY4s8r99MsQ5ZyEY+rsYm6D/aH/9RVWoaH7futx5j15ECDKBBfbhPk9igkVvYDn/ihk cXrGwIE/zINvw+Mrm59ecyoxQec8NALz168ihwnoN7Rb5l44xfUj33TiJHwFywLFjMiF 4iwLqm+MnPiGJVw8pNGJ7hfO9nUlQ6bQK4a8rKIcAp/VVxF1Yg6vYQ9KAQFLzG4Kjtqd X7HA== X-Gm-Message-State: ABuFfoglTbpXaQYlyrf2bD3jfsvSw+TAv3ATjmZLW1APbJmBYHgx4x2h nHL9h4jz3ZPuzshSBcY7o4A5lA== X-Google-Smtp-Source: ACcGV635Xv/YujAroy4RRVeSE5kz/CceBXIU0wiFoXgaUYKj0MI1RlWwagysKD496PbRnZDZVX08EQ== X-Received: by 2002:a1c:7d51:: with SMTP id y78-v6mr55960wmc.37.1537866293946; Tue, 25 Sep 2018 02:04:53 -0700 (PDT) Received: from localhost.localdomain (251.150.136.77.rev.sfr.net. [77.136.150.251]) by smtp.gmail.com with ESMTPSA id y206-v6sm1523828wmg.14.2018.09.25.02.04.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Sep 2018 02:04:51 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, daniel.lezcano@linaro.org, leo.yan@linaro.org, Zhang Rui Subject: [PATCH 11/14] thermal/drivers/hisi: Remove pointless irq field Date: Tue, 25 Sep 2018 11:03:09 +0200 Message-Id: <1537866192-12320-12-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537866192-12320-1-git-send-email-daniel.lezcano@linaro.org> References: <1537866192-12320-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The irq field in the data structure is pointless as the scope of its usage is just to request the interrupt. It can be replaced by a local variable. Use the 'ret' variable to get the interrupt number. Signed-off-by: Daniel Lezcano --- drivers/thermal/hisi_thermal.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 941c2c4..87d8a13 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -83,7 +83,6 @@ struct hisi_thermal_data { struct clk *clk; void __iomem *regs; int nr_sensors; - int irq; }; /* @@ -579,16 +578,16 @@ static int hisi_thermal_probe(struct platform_device *pdev) return ret; } - data->irq = platform_get_irq_byname(pdev, sensor->irq_name); - if (data->irq < 0) - return data->irq; + ret = platform_get_irq_byname(pdev, sensor->irq_name); + if (ret < 0) + return ret; - ret = devm_request_threaded_irq(dev, data->irq, NULL, + ret = devm_request_threaded_irq(dev, ret, NULL, hisi_thermal_alarm_irq_thread, IRQF_ONESHOT, sensor->irq_name, sensor); if (ret < 0) { - dev_err(dev, "failed to request alarm irq: %d\n", ret); + dev_err(dev, "Failed to request alarm irq: %d\n", ret); return ret; }