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: 147416 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp473243lji; Tue, 25 Sep 2018 02:04:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV60h9EBb+KUBJb9+mCvrbBvHb2CB9gLEGRMYcgTiFcuypWvL7+nkE4rTpdR8eTSD/tmnrM13 X-Received: by 2002:a17:902:b496:: with SMTP id y22-v6mr95141plr.314.1537866298651; Tue, 25 Sep 2018 02:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537866298; cv=none; d=google.com; s=arc-20160816; b=uKKPSX7LbWU52Pcj/lnCPAZiTPOpo987UtnU71papM+UgN3l6DJ7gP7wyzVp+hO4SQ 1mqBd4sdIzdcsWBR1o7lb3HYLnLIRt7ODng9o717mmJIEziQ+xESz6U/ySr0T8kGekQG zqUhHdtTunop+f6NlqeetD0QYbAovXYDky3WPYrgj5mzzz5FRXeUU1ls2uUsOvqAUChq NaM0H4wog6DbiJgtGu2aIwPfgMrWguvQqFh6M/6FhDB1i1O3NP9TdylIrvO4cWvwhzhu Q1D/XLF6Iiiqs4QeCEChc3OKDpuP8DCeKmDq5H8fAEGTE0h3GKJ+CuhfyruPJwpO2TiP PHOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=2GO8tdB0VqF/b2ulgCZCuFFs0ie3KdkmUxeTxxbYG3I=; b=JTx/nIpl2QAhZDyqH16sUIJwZ/ymwuC7pkoVAYaILDd0Zf1LEiWo0V0x3DPYVnobmT ffcWIiII7R54385w92E8iD283/MrWCOirfItUWc3qf1IdUJKKY6M/oJpdsdcLK5MQgdR C1PbTcGhtWJpQhOJ0OJR4dSzLOxk6MHeMmFNtWxF2SQvHDlzFIu/Z+COiYQauUvJmoQS kjxAnGx7F61gU3sN8JcYunAtKPGft1q7v86duFv7Vk1uwhILzcaCx5tln5rP+Q3URAgD ARC/g8J1TPXtRyDux7v6ctglRBvCgqHWcFuOsu1F3iI1IRz0PjsnSMnDiI5wF+E16Oad XQqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KOyh3egX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 75-v6si1753115pfy.169.2018.09.25.02.04.58; Tue, 25 Sep 2018 02:04:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KOyh3egX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728889AbeIYPL2 (ORCPT + 32 others); Tue, 25 Sep 2018 11:11:28 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53274 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727550AbeIYPL1 (ORCPT ); Tue, 25 Sep 2018 11:11:27 -0400 Received: by mail-wm1-f68.google.com with SMTP id b19-v6so12519817wme.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=BXyEligTMBqt3/9JocfxMp4CmAaaHdfJWQNAqEyZ1XXMobCEYocChy8iEGEu5irQjB BpHsL/hQoeSStMJPbBtzcBbNenu2L9lQBSQScCl3VJ0NJely49+srLHugWOave7XNfJx rCLKUyekdwDehk8jdNXayP4KVDmCP8gKA/dTHDQRpbwPeKzsJ1RzHz+M51GgPY+EFSMl U5GSJEfPwqCD/6osEjNlD0a8PhlL4yi1u7+EnYd7w1phtrMWMoRMJtl2J6tIlMS/DkZ2 mVX3urz/0NgFJspVAC46d63kPHeLu3gaHH+AmIzVRd9PnHycMtc4D1dljl5QwJVwMgHJ Nnuw== X-Gm-Message-State: ABuFfoiCaE72XcTd3FO4PaHHJRg9hVMFd2sLPTO3+etUNoreoaKsC7O6 Wg+b4ZvpEo/bY3gyv3717OZOeQ== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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; }