Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2145679ybh; Fri, 13 Mar 2020 13:40:40 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsjpqvLbMoIJY19fYBumWws/8XF7qc9VYVnOfKJhqmj3u4X2/NdE9GBikFmCkQCNfbJT10r X-Received: by 2002:a05:6830:4038:: with SMTP id i24mr10097808ots.0.1584132040091; Fri, 13 Mar 2020 13:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584132040; cv=none; d=google.com; s=arc-20160816; b=XQnHB5B6uo1c29nI3SPqrhFpps5TT2gMVsq+5xZKFxA3dG+lerLB5ZDNQZjnmvHlPm AbGRcBrbpr2zxxRk0MoH0wgyhqd4evdL7l2V/FU2MsXMU5DBCasHshVdNED0ndIa3/ri LtAl7xqhKhUjODrrA91jbneGvR/NasE+/lSp2+n1QDuod2qZoAC5X0D6e8kzY8X4P8iS qCMGPKkzovb6+9uZ0iIy/SB+E51jO/Cq5ftxRRz+Hfx3LVWgG+ggOj/KVBgcdjHiW7QA iXc6lPHAmFOTq2mJ0zEf6b3dsq9jErZ6yYu/DjAL7ieioeM/FKZm/BIxOJDY8EAF5JHT wDIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=yg8w7425KkIYqe+egmfyte+V2eE2gctWDcLAI2hjfik=; b=I6Oe3Nhr1E+SckHRb1+ozIe7NSI5SG676LYTWhH7HvbCvD3lcOe/rW4RPjpcqSLQ3K SiKU/pNkZPBmv93svzA6Girsvq5NLbhoLfLXbz3BaW4oF9O+sF426JbKWkc32CCNJsu5 Fypg5gsgEDpiEK0A4scmtKndXrMMDAaG9xYH+YAT7Xb+6S4RmdDKC20N76j6L9y599WO +rI6EcuRSRKE1YiJTvweWpRk4j8ZgwQ7TD5fN4qHeMsEf0LISBOKeBg0K+C1fLVggEbx Cc69MP7gy/0QMeIq2qfruqstR5k3mrlDsB4LLuV6sA7zPkypY+ffwDpogIcDYDvknUMZ t3KA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j64si4835877oif.49.2020.03.13.13.40.10; Fri, 13 Mar 2020 13:40:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727385AbgCMUjW (ORCPT + 99 others); Fri, 13 Mar 2020 16:39:22 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:34575 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727210AbgCMUjW (ORCPT ); Fri, 13 Mar 2020 16:39:22 -0400 X-Originating-IP: 87.231.134.186 Received: from localhost (87-231-134-186.rev.numericable.fr [87.231.134.186]) (Authenticated sender: gregory.clement@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 744E420007; Fri, 13 Mar 2020 20:39:15 +0000 (UTC) From: Gregory CLEMENT To: afzal mohammed , Viresh Kumar , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: afzal mohammed Subject: Re: [PATCH v3] ARM: orion: replace setup_irq() by request_irq() In-Reply-To: <20200301122330.4296-1-afzal.mohd.ma@gmail.com> References: <20200301122330.4296-1-afzal.mohd.ma@gmail.com> Date: Fri, 13 Mar 2020 21:39:15 +0100 Message-ID: <87sgicxa4s.fsf@FE-laptop> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi afzal, > 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 Applied on mvebu/arm Thanks, Gregory > --- > Hi sub-arch maintainers, > > If the patch is okay, please take it thr' your tree. > > Regards > afzal > > 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/plat-orion/time.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c > index ffb93db68e9c..509d4824dc1c 100644 > --- a/arch/arm/plat-orion/time.c > +++ b/arch/arm/plat-orion/time.c > @@ -177,12 +177,6 @@ static irqreturn_t orion_timer_interrupt(int irq, void *dev_id) > return IRQ_HANDLED; > } > > -static struct irqaction orion_timer_irq = { > - .name = "orion_tick", > - .flags = IRQF_TIMER, > - .handler = orion_timer_interrupt > -}; > - > void __init > orion_time_set_base(void __iomem *_timer_base) > { > @@ -236,7 +230,9 @@ orion_time_init(void __iomem *_bridge_base, u32 _bridge_timer1_clr_mask, > /* > * Setup clockevent timer (interrupt-driven). > */ > - setup_irq(irq, &orion_timer_irq); > + if (request_irq(irq, orion_timer_interrupt, IRQF_TIMER, "orion_tick", > + NULL)) > + pr_err("Failed to request irq %u (orion_tick)\n", irq); > orion_clkevt.cpumask = cpumask_of(0); > clockevents_config_and_register(&orion_clkevt, tclk, 1, 0xfffffffe); > } > -- > 2.25.1 > -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com