Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1848484ybv; Sun, 23 Feb 2020 16:51:15 -0800 (PST) X-Google-Smtp-Source: APXvYqyIcdOuszmK0I7JEn441fXXBtli9ysPk9DbVRkdPlz+HqbO/RkOsdZwuz5BYQhyXl7woGsZ X-Received: by 2002:a9d:7489:: with SMTP id t9mr38351582otk.255.1582505474993; Sun, 23 Feb 2020 16:51:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582505474; cv=none; d=google.com; s=arc-20160816; b=Hu/RgGIOwUaYjRHEF/mZiZOmAFfzHodK6MP4oqBbxSfXav6NVn8hV/dBjPhCOXOf9Q fD9mxx0HtHMKZ/woGAQ9ehANftSc92v6Cz+9hmV20iwZwbC02ueshzQSME0lQDRjtSfF dC1F5CHHBELbYo5KNt9XUrfKURnr5yCxZLJQ++4lEcMWL/40SwoNQzxlH8JhsgwcxX8R bKIVQB0D9IcWTGm4vktD2pKxI66JKfuIBt8h0AZaU3P6TgkCfksGVPX/vd/Vq/r5l133 oJDl0K6AuNSSy8rA+exQHPch/AXGguPtFQx4Cm0en3Jwg8OBBE3HDfGrGEMyL1WXWrtD Wqeg== 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=bRs/6UurSkQmTd0HvCFOeF6FqxH77Vxv+5Td3VByxMw=; b=U6vErxaRYSCk+77WotH+0ihIYNeZ+LGZbCgzJC9MI5ezqkcdfgQ50l+6SBW4+8TnSY CtRzT9v7YmdZ5fMOjCt1E2Md0P3dIkEbwp4SetvJZYDcAVE2nDn0GG3qP8Q0fL/5kKk/ HIwbp6w6N588sd/DHjAhTWBs9gjdQ3Coi6H25oeYRAW+tA2I5cLdgOz5tj5r4UGADMP8 hPmN1k1bP5EbqHrymVsOQD7dcGkh9I2u0L8MsqkmCoKqU4C01nIxfLf3hRrT3V5dJ7h0 8zcT1e3XcsSJe0NwSPrjdxFyZEZbEXJW71Lo8VhopVtDkU9KzCDfIB53jgX3detOBSL+ ZdGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VcgaZIpk; 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 g26si5296814otn.180.2020.02.23.16.51.02; Sun, 23 Feb 2020 16:51:14 -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=@gmail.com header.s=20161025 header.b=VcgaZIpk; 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 S1727197AbgBXAuj (ORCPT + 99 others); Sun, 23 Feb 2020 19:50:39 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:35844 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727151AbgBXAuj (ORCPT ); Sun, 23 Feb 2020 19:50:39 -0500 Received: by mail-pj1-f68.google.com with SMTP id gv17so3402245pjb.1 for ; Sun, 23 Feb 2020 16:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bRs/6UurSkQmTd0HvCFOeF6FqxH77Vxv+5Td3VByxMw=; b=VcgaZIpkCWIJefUSsYN8uyJzslMdOWTew8X/TECGf7x9xHM1ZMhmj95lZVevynOyL8 QBtCLZm4tFAd4Xim4kuO5MKGJCZ7Pd1r2EA5jlzTHWM7pZ8QO6vYyykAkCqpBedNCwwE bhNzrfVMRR4bTNek/538WwCj5iPqdTR+rFaUby86nOh+wdd8C+ubkx0Uy22t1Z8/WSsy 5+U/LdVc2ycjrQYHrfz9dEcb0ILfFUzbrm/SMpOcxxehc2qDdqcJtWGvi9yVzwNvLEHy DO1vsQdCwc1AK1Tjo8z4a8C9ysOsCT8WVGP1iXyx3MarwRljwpwSvUndz+oYZ20pdLke CvPQ== 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=bRs/6UurSkQmTd0HvCFOeF6FqxH77Vxv+5Td3VByxMw=; b=MODu/8gpXCEaChGZVYI/2PvGWRgVHpQvNa0ndFqiYQphPfWXjimfp7IkfhaDKUuuJS NOQDdK7QraHE+w1MetUwyOpmCb5O8ANc3Abe1mAHtIhBFf2xQZM1xDBD2zKIu8wmBdko ppPiG40AlMgDE4NWihOPGYC6W2oZYsr/cXf7HwPtK9tO1D7VDGf35FjfYTKciuNYL+T6 DjUEHrlrkmjCncAatdt+H1iAkKCfsmUcSiaecH1D9jIX/m68YAPy9M+gW7FGAqymYEfn bSNW+LzO9Kiy+zlPXCo2BTG+R2dQFdKufWwH8OeK4SZzlvx7dkav59s/L9136Ka//U4O oz9g== X-Gm-Message-State: APjAAAV3r850GQ0Kgu4CCn48blN3EnOHl7OUJ5oTMuZ2TeQyikdZ+1Dz xg4gT4FyGB8Q79J5dNTffQED/ABECD4= X-Received: by 2002:a17:902:8207:: with SMTP id x7mr46131864pln.185.1582505438099; Sun, 23 Feb 2020 16:50:38 -0800 (PST) Received: from localhost ([106.51.232.35]) by smtp.gmail.com with ESMTPSA id x21sm10053050pfn.164.2020.02.23.16.50.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Feb 2020 16:50:37 -0800 (PST) Date: Mon, 24 Feb 2020 06:20:35 +0530 From: afzal mohammed To: linux-kernel@vger.kernel.org Cc: Michal Simek , Thomas Gleixner Subject: [PATCH v2 07/18] microblaze: Replace setup_irq() by request_irq() Message-ID: <2059d2aae0cf9dc2216540c8b0a3042f532dcaf4.1582471508.git.afzal.mohd.ma@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) 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(). The early boot setup_irq() invocations happen either via 'init_IRQ()' or '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 --- v2: * Replace pr_err("request_irq() on %s failed" by pr_err("%s: request_irq() failed" * Commit message massage arch/microblaze/kernel/timer.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c index a6683484b3a1..f8832cf49384 100644 --- a/arch/microblaze/kernel/timer.c +++ b/arch/microblaze/kernel/timer.c @@ -161,13 +161,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static struct irqaction timer_irqaction = { - .handler = timer_interrupt, - .flags = IRQF_TIMER, - .name = "timer", - .dev_id = &clockevent_xilinx_timer, -}; - static __init int xilinx_clockevent_init(void) { clockevent_xilinx_timer.mult = @@ -309,7 +302,8 @@ static int __init xilinx_timer_init(struct device_node *timer) freq_div_hz = timer_clock_freq / HZ; - ret = setup_irq(irq, &timer_irqaction); + ret = request_irq(irq, timer_interrupt, IRQF_TIMER, "timer", + &clockevent_xilinx_timer); if (ret) { pr_err("Failed to setup IRQ"); return ret; -- 2.25.1