Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2442746ybb; Fri, 27 Mar 2020 05:45:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv3yXmD1PzhxV22YtLJuHczrJaQ1SLqThtGrIb3GCiHiN3cfQdU0UFjQOvUa8dHgVRQQanh X-Received: by 2002:aca:5f8a:: with SMTP id t132mr3873568oib.132.1585313118212; Fri, 27 Mar 2020 05:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585313118; cv=none; d=google.com; s=arc-20160816; b=oevwpmwMPhqD9ysC6I1/cql2XYtmMpUzfgmPkHvBpF7N1//YWtvhG8TM8EsxLER03G zlcenTzmHh6lHNeFLxVLI54MWZr2y3Ue+Lp1724Ee6CeQkF7mY7NO1sVTA6Et2QtAkdR +hdQ7epdS25DS6IYODlmKfca9iQzIz3qZuMULeHkExtScqxI1UdBHFH3F7PBsRqwxekM 2TYXv7mNsWM7D6V4aPIJf7l/l+rIadqhZPhvwlCfzZ1lCybH8mr2DQfzk2OrAH+Gu8Ll j//wSRvKuN9+masC7K34GjHseg0IYktRqdPuFgUNUYtxkXIJ5SLEzd6BexmkK672kMtf 1dhA== 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=OrmCqFezly2Rfxgtc8/QFu/0W5F3zvpkrW43juhNMPA=; b=T6xZm+FCTIjBhJu/VhluhEGaa2Q0gzKIgozn1cWoZ95OVVlFMfB+aAcKJYjRB4ZaEE vUDmkofz1nb2CjbroVCbhgwGCc1Y45nYRhPikQNouXHRyo47o7OiUbogrhbmJq6xd0Do 41kNBM5YgO6e9taKX+YBUJfSN2r+BUgA7WQ+sWiSEfHBLLT2vGIqtE4qmevs/3dNgeyI varJXgGon68fBHR9fD4Sr2Nl88mbTeVJvmak1qvHa6nL/LZ9pV0wg4XHum1LN6DwD0BL uRAgBkHiS05KBeBMU69ZOn0Bo7yR9kKW9LmA8eppET2SJTappW3r7S5HmLxmcO4apFGh 6fnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GIA92C3G; 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 y4si2238190ooh.53.2020.03.27.05.45.05; Fri, 27 Mar 2020 05:45:18 -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=GIA92C3G; 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 S1727393AbgC0Mod (ORCPT + 99 others); Fri, 27 Mar 2020 08:44:33 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44594 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727247AbgC0Mod (ORCPT ); Fri, 27 Mar 2020 08:44:33 -0400 Received: by mail-pg1-f195.google.com with SMTP id 142so4511657pgf.11 for ; Fri, 27 Mar 2020 05:44:30 -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=OrmCqFezly2Rfxgtc8/QFu/0W5F3zvpkrW43juhNMPA=; b=GIA92C3GyqkFnDX8sA9Rknn8fwTnET1ETunHwCgySE9vDZlgyPZM1GTEDiX4Ed9drc YH4plfCR6mDkoPfE0nOfFfGPjfLT+W2/okVZ5EhQ+LPZD+3k3spQS23pLTXBiYuvPVjx o87eiA3EwHWieUIzUz0Xe1Up70BMgfdBO+fHkji+RKnEtXlrpr8/rOeK064Y/AmaDTya RcA9Vm3DNDRleceqduZA8aNk0u38lr/33qFn8a+ay0hVHF40ghOEWJqr4PkbpBpSavrW ZKpgwHZ525bKABBbRN8QEulmTk7qyiRpqA+dN3IRCfA+WZ+NBdJSPtEJ3DFpcz4HCpN+ r5Gw== 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=OrmCqFezly2Rfxgtc8/QFu/0W5F3zvpkrW43juhNMPA=; b=aT0cPuGu7rTEry4csGBISds2tpzYUJ9qVekkwUiIGwJt6Q/EZUGt5kcRjohihCz5Vy yPoKDFoLqktmfVSRi9UK09Hy3OCVXKBrM9fLCo4Z/U2YeRaBx30wkVd3Uz33Dl03VuwR XJm6fdotPxegQVMYR87daTh1OqUUl0spKdYjEaJT1o1IWiOfgPhoeRjY6TjOzQR2xoUH NAtULEiAS8BW7cz2Fe9VoOp9Xu8cy5B/bNZtebGHL99SlmkGtamu1DOMPdoEq29sTVzP l2gdEG0NaBbV5ddfn/Ea65BdJ470VaPnPByoD1XdKQPovWSDziO7LpuWjNyJXrAxZOCY +6VA== X-Gm-Message-State: ANhLgQ3iw+uNfxK3H2+pn6fvpAR5+J8XzBZncrC4nM6TryddsD3HAZdJ 1izEB+96KAfhu+aGKp8kp3U= X-Received: by 2002:a62:6503:: with SMTP id z3mr14798534pfb.232.1585313070409; Fri, 27 Mar 2020 05:44:30 -0700 (PDT) Received: from localhost.localdomain ([49.207.51.33]) by smtp.gmail.com with ESMTPSA id u129sm4070380pfb.101.2020.03.27.05.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 05:44:29 -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 3/5] ARM: cns3xxx: replace setup_irq() by request_irq() Date: Fri, 27 Mar 2020 18:14:22 +0530 Message-Id: <20200327124422.4181-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: Krzysztof Halasa --- 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-cns3xxx/core.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c index 1d61a7701c11..e4f4b20b83a2 100644 --- a/arch/arm/mach-cns3xxx/core.c +++ b/arch/arm/mach-cns3xxx/core.c @@ -189,12 +189,6 @@ static irqreturn_t cns3xxx_timer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static struct irqaction cns3xxx_timer_irq = { - .name = "timer", - .flags = IRQF_TIMER | IRQF_IRQPOLL, - .handler = cns3xxx_timer_interrupt, -}; - /* * Set up the clock source and clock events devices */ @@ -245,7 +239,9 @@ static void __init __cns3xxx_timer_init(unsigned int timer_irq) writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET); /* Make irqs happen for the system timer */ - setup_irq(timer_irq, &cns3xxx_timer_irq); + if (request_irq(timer_irq, cns3xxx_timer_interrupt, + IRQF_TIMER | IRQF_IRQPOLL, "timer", NULL)) + pr_err("Failed to request irq %d (timer)\n", timer_irq); cns3xxx_clockevents_init(timer_irq); } -- 2.25.1