Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5800438ybv; Wed, 12 Feb 2020 00:11:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwucYzG/ou/nksln4msVxBFq20MYe/XbtVgXNwtBKbtE9eosc5o9FSk4KDQQ5GoUeXleT0r X-Received: by 2002:a54:468b:: with SMTP id k11mr5284513oic.134.1581495067297; Wed, 12 Feb 2020 00:11:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581495067; cv=none; d=google.com; s=arc-20160816; b=mFqVZc4ZgA04gV9k1XkhFHC3jSHUn4jD52C/Ic77x4f2jtO2tXFaiJA7RijnN7fZqy deRslKJxfQ+AFzLMFJHjEfD+Sjn4eJfjhNFRQz1dCP2mXTg+pMWOUkAs1DLNYYz/dsQZ /cASGE3+hJFZ8ciidz4vvyp53IwfNDHPjiDk19nRXouXk36jqN3IzRCPb6nMN/Z+fVI+ RfWFHcTN1eL05Ot4USQ7ESTKnPku2BMHEzrNSSpw6TYLI5FkUWd3TWM+HszdqPQ0vKxM B5m7kcO7dI2KVE1BshpYGnmZQaTWK2oYrwLhZUSNWPkOn+OFx12slKIP7rcn8rtpDgQ/ bjDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9CFz1c+0fNvk1cgA4VQ08nCs0e3XAVZxLPN7eKmCEBM=; b=yNX1XGjQqJL3cPxLbl+kz4Uj1pCUoTrU35jq0QJaiJFpLgkPLiN18X5M5ER0jSstce CVlr0KToapN9jVCpsB3w+sDROKrTUKTmDWSIWhG2InVDe8RI9axCW/tfZHLNrkce6+5J pjZ7rv+JKfXUlVZGhrrkoHDA+8erBrVpNYVzK3iKIe8yHZ4Hx9dwgsR6qmfYyRL4DHbv ejZHO5EDDNezdezobL4jmrXNjyDaMBBzzOBTLBtJHvwm3aTSJc8psTR8iglvdoFv8E3t KATmusTZsz5DLY47fCm85o9omWE7B/nNxIghHPGOLRfpwxR0eHjCeLDYxeBdWBU2K8AG fbsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a78fnOoI; 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 b8si3339234otf.32.2020.02.12.00.10.54; Wed, 12 Feb 2020 00:11:07 -0800 (PST) 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=a78fnOoI; 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 S1728435AbgBLIKs (ORCPT + 99 others); Wed, 12 Feb 2020 03:10:48 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:33217 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728250AbgBLIKr (ORCPT ); Wed, 12 Feb 2020 03:10:47 -0500 Received: by mail-pl1-f194.google.com with SMTP id ay11so673500plb.0 for ; Wed, 12 Feb 2020 00:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9CFz1c+0fNvk1cgA4VQ08nCs0e3XAVZxLPN7eKmCEBM=; b=a78fnOoI0rTVtIC+JFO46RJEEvzyk/fZDQMjE9y10nP/lGnhNPun68nys1C7h7sbzk 9YBllWzWVhWfw2cmPFaTCCuEV2nfKqqHQCBcgPwbdR32gh5Rnixt+ZE8Kk/XxwlP/Tit bl/k27WscBk03Fii24U/Bn3YlT2V9B3tz0ikYzU680Oazv8B4sclT71RuUREhif3K3vf wl6SdhFyrDnFS9cRBTbGj4OpS5TePB2QBg4hAyuBUB5TNUR8LjMSxs2Zb6p3g5WUMHLd jd4FEJslzVsOyMGwzCouKDatnTR4RRkaFi7ML0j89ElqbYAkkDLBhf41JrX+fTQaso6j 996A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9CFz1c+0fNvk1cgA4VQ08nCs0e3XAVZxLPN7eKmCEBM=; b=Io2UpFUWOtkiIqKlQwlavN6grKIw5ukM0Cfgzhx2PSd4u/HOy41kmnRbtFIFcutyDj 5tv0VhYQgNSe9s2eEYKaOCxpnIWdkP+ZorlU7chPAUAulsvEes+wBTDlV6q8on8fxM/P +eJgrW5kcwRgWp3WqrWmYNGj0rcMZG93pAFLqPNmvmnstPTrQRrqXWz+yLwoZTK+fQ15 IYQeV+Vg4vWk2QoEONeE5f2sssMJogdDjqrxjErLdzsgzUmr9RmIECuwliZ/VUIt3FI3 EMxE0yUpqqCFc3qfDtkngBCFLkjRIeqy+SbFu97BoTEL+dmxQyjMUBnTpP7yasr5/KOI 2dmQ== X-Gm-Message-State: APjAAAWBk16H32ODsMAubdNlFPPolhlUH85wu5o0dVzHzLPz6tFoF5ug a/8J77b5k53jxz7e9Enq9Vc+8Q== X-Received: by 2002:a17:90b:14a:: with SMTP id em10mr8645460pjb.4.1581495047048; Wed, 12 Feb 2020 00:10:47 -0800 (PST) Received: from localhost ([122.167.210.63]) by smtp.gmail.com with ESMTPSA id k8sm6926990pgg.18.2020.02.12.00.10.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Feb 2020 00:10:46 -0800 (PST) Date: Wed, 12 Feb 2020 13:40:44 +0530 From: Viresh Kumar To: afzal mohammed Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Krzysztof Halasa , Russell King , Hartley Sweeten , Alexander Sverdlin , Lubomir Rintel , Kevin Hilman , Aaro Koskinen , Tony Lindgren , Viresh Kumar , Shiraz Hashim , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Allison Randal , Greg Kroah-Hartman , Thomas Gleixner , Arnd Bergmann , Enrico Weigelt Subject: Re: [PATCH 02/18] ARM: replace setup_irq() by request_irq() Message-ID: <20200212081044.lsw6to5kmzl22ywc@vireshk-i7> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12-02-20, 13:32, afzal mohammed wrote: > request_irq() is preferred over setup_irq(). Existing callers of > setup_irq() reached mostly via 'init_IRQ()' & 'time_init()', while > memory allocators are ready by 'mm_init()'. > > 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(). > > Seldom remove_irq() usage has been observed coupled with setup_irq(), > wherever that has been found, it too has been replaced by free_irq(). > > [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos > > Signed-off-by: afzal mohammed > --- > arch/arm/mach-spear/time.c | 9 ++------- > > diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c > index 289e036c9c30..92b2850eeb4f 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("request_irq() on %s failed\n", "timer"); > } Acked-by: Viresh Kumar -- viresh