Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2442548ybb; Fri, 27 Mar 2020 05:45:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuZOgwE3qmJUhr1O9tkUkO5wsTCi67uW7fZ8ebamkGCw4iKpA1J5zTgEc33amWfXba08k+J X-Received: by 2002:a4a:d595:: with SMTP id z21mr670570oos.38.1585313103217; Fri, 27 Mar 2020 05:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585313103; cv=none; d=google.com; s=arc-20160816; b=SMK6b7vgJMaCjNTaIh4n1dJB2HZZMpOBjOEWRRDiIDJN1QDQVrPjGYIJAAi1UHCFlS PsOZ/gV/a6Pu0JlyZ21oeQQnEFfbZIk5jGEAhXSmERWTJ6/tVBI7U3qtRJ4XXjv7nAOk zhlQKkNDsp3ZL639Q6TuX8oNVvtleyj7BN25cAH1ldsslBK3v5DwhFVIn5LOV+xuiiDJ vauvZ5HtJDmfTQymjUK1Otbwmym3R7ZC6qZMI3+ML29fwU//KYVXLKeMmThZpq+5YXDI IDQQ7ADemelkzvcaYzimIF6nTgsFmGqA19HJuRwX6u/Ur+yHCRLp4ZO8iAvOAGwfZjzV ZDmw== 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=Fsqy8TfQMOxnl1SbG7WxWf+f3gEqGelUnglQJSOP4Ds=; b=Dwrj9mz8uL81QjIHg8qkMy737zewgLYvzRJXTg/iqRFoiJqAMGeaqYnIA5uLt2Uc05 vc1c6AurT4sZcZWrXQSgncUmmC12bTuqNhXF5gpcc1OPmaiQ4AgvXfSvTBeAcEO0YTnG 4saTeWv+wKipoDHDNKQx5v3WrnrydEyoKlHR6Hdp0uYyUC1bIESrWQ5Lre5jSiaHLe1O v+U+Tg+dJMy8j8SrJw3b7DCespnRtTigb/HZRUNe8UMOSxpnqKbOK6ppUSXzJJchLC8a MUs2rKwduS5XqhkTpk+C88+Nif4sTcg6rztfRhMpFjTCajekiSUFoTGGWqBweXA2euom r8aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q2Otw0ip; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z25si2211501otp.310.2020.03.27.05.44.48; Fri, 27 Mar 2020 05:45:03 -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=@gmail.com header.s=20161025 header.b=Q2Otw0ip; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727173AbgC0MoQ (ORCPT + 99 others); Fri, 27 Mar 2020 08:44:16 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:52009 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbgC0MoP (ORCPT ); Fri, 27 Mar 2020 08:44:15 -0400 Received: by mail-pj1-f68.google.com with SMTP id w9so3809816pjh.1 for ; Fri, 27 Mar 2020 05:44:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Fsqy8TfQMOxnl1SbG7WxWf+f3gEqGelUnglQJSOP4Ds=; b=Q2Otw0ipFM9So8sggRAQgCgojzHVsLtIWn5ukWMxPAJdhOBRRO8zrGPlbCo0y2GA6f sfSVJRy6ndUByUc0Y3zWpTCLkaYG1RKjr/IHeNTv1R/Pb2gMLXbg9ioX4QgQHzRY5cps N3G1ayLdmVxwy4ZjqYlozMN1h34Utvi7fqBiojTRK0pIWMPWvGE0LkUWFA7kqgJuJxja rKlEgcXH3J6jBX59IpTWHjzmjQIIBmiyOt5i1v4tca9ZWxogZVM6CDRSdBnOmpGpFEth pjmUsrvDUdhO3Bv5CYeCGEspT8IqMcwpli64OnZGn6JM6hBdUYfCQ86yCN7labB76D8d c4Aw== 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=Fsqy8TfQMOxnl1SbG7WxWf+f3gEqGelUnglQJSOP4Ds=; b=pbG3GJQqE3qYL1EJB0FcUBf/+6v2yI/eHbksT+APD9emzzHNIYzIBr2xmTy8VUtmC0 1k8t0V6KRDBDnhX0QVvjvqPvZbKeplQLh9WDQlg4Pn+QL+JXSYsnPTBjLVNo7xO+MABX vahqybYMipIDbrTSuiRiHbBq+ELFqxIHkziZdf/1C2DZibxSa4O5sboRsSi1sP1ir7FN fIqFs4yToNKtEzOfrt58h+iPQS3wzkp7218Pa1wJSVe44glVmdRe4FTpVzZunTOnYCIR TAsN82SMi3JOUow9JY/XR2L5wgpZpJYc/zaLyhwtAEjWVjsmD7BmZ3Zai+NhisxSdha3 punA== X-Gm-Message-State: ANhLgQ2ngndMSf001UuLeeP4BDEYhgW6crCTxnxIBO0WugrRvle7hE0H 2JM1/osKu04MV4UZgtvTlv4= X-Received: by 2002:a17:90a:1b22:: with SMTP id q31mr5878074pjq.109.1585313055028; Fri, 27 Mar 2020 05:44:15 -0700 (PDT) Received: from localhost.localdomain ([49.207.51.33]) by smtp.gmail.com with ESMTPSA id v26sm4056641pfn.51.2020.03.27.05.44.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 05:44:14 -0700 (PDT) From: afzal mohammed To: Arnd Bergmann , SoC Team Cc: afzal mohammed , Thomas Gleixner , Tony Lindgren , Alexander Sverdlin , =?UTF-8?q?Krzysztof=20Ha=C5=82asa?= , Viresh Kumar , Lubomir Rintel , Gregory CLEMENT , Hartley Sweeten , Viresh Kumar , Shiraz Hashim , Andrew Lunn , Jason Cooper , Sebastian Hesselbarth , Russell King , Linux ARM , "linux-kernel@vger.kernel.org" , arm-soc , Olof Johansson Subject: [PATCH v4 2/5] ARM: spear: replace setup_irq() by request_irq() Date: Fri, 27 Mar 2020 18:14:06 +0530 Message-Id: <20200327124406.4123-1-afzal.mohd.ma@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org request_irq() is preferred over setup_irq(). Invocations of setup_irq() occur after memory allocators are ready. Per tglx[1], setup_irq() existed in olden days when allocators were not ready by the time early interrupts were initialized. Hence replace setup_irq() by request_irq(). [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos Signed-off-by: afzal mohammed Acked-by: Viresh Kumar --- v4: * Add received tags v3: * Split out from series, also split out from ARM patch to subarch level as Thomas suggested to take it thr' respective maintainers * Modify string displayed in case of error as suggested by Thomas * Re-arrange code as required to improve readability * Remove irrelevant parts from commit message & improve v2: * Replace pr_err("request_irq() on %s failed" by pr_err("%s: request_irq() failed" * Commit message massage arch/arm/mach-spear/time.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c index 289e036c9c30..d1fdb6066f7b 100644 --- a/arch/arm/mach-spear/time.c +++ b/arch/arm/mach-spear/time.c @@ -181,12 +181,6 @@ static irqreturn_t spear_timer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static struct irqaction spear_timer_irq = { - .name = "timer", - .flags = IRQF_TIMER, - .handler = spear_timer_interrupt -}; - static void __init spear_clockevent_init(int irq) { u32 tick_rate; @@ -201,7 +195,8 @@ static void __init spear_clockevent_init(int irq) clockevents_config_and_register(&clkevt, tick_rate, 3, 0xfff0); - setup_irq(irq, &spear_timer_irq); + if (request_irq(irq, spear_timer_interrupt, IRQF_TIMER, "timer", NULL)) + pr_err("Failed to request irq %d (timer)\n", irq); } static const struct of_device_id timer_of_match[] __initconst = { -- 2.25.1