Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5796911ybv; Wed, 12 Feb 2020 00:06:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyZ6H3kg386czICd4AwR+qmA9NKmw+VIkqqAvW6+Z5xbCuF6uFoUFS6WnjgHSDCUW7VOAkX X-Received: by 2002:a9d:2ae5:: with SMTP id e92mr2169530otb.72.1581494797345; Wed, 12 Feb 2020 00:06:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581494797; cv=none; d=google.com; s=arc-20160816; b=kfhw8J5haE/2+pU33o4tLucusDzjmRz/Dw+IpVkVbGWcDbAKdGAciw0tFIdmHejG0Q JzNCASiM/J1dRUE/+lbQFO0nfSDxzoPiahTWEi8GFKlDLgM+TZVo+Ulx9oal1gD7ZFx9 OD7eIxmmcOO/iU26RmUoJA1fP2y+MVSDurTq1G0wcUQLTrbPoo5NOTJ0t8Pw/BfFUfMA 63jJsNhe51neEPCk07bmOVGRzLjmCuLPaXFsGCbAvyH/csNp5fRgsIKgGqL8wjp9zfdy Fd3ZwLEdD36ZZlkJZEvWupQflc10Jp2hjt4jVhZTBUHRiAiwFGYL+RXn6IPNJ+8Wa+zY c4cw== 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=kq2WhCwr7jfZotAo5gF9snLf2LQrQrOPcoUeZRf16vE=; b=rcR7brb1MGUH+R/QAlSXnxVlesOex8LScTkr9ugxen8IrmGJ/leCYY2nqCXijFpZhA kKMA6WvauDMgRoEWnKi86VxjB7j987VObNtBq5gpDNxbG89eSi2dqH0fTqjS1J3GCwTy inFOC5rwhJK4tZQLjd0f8+JyaRaeNd+flRPvE4AodmB+42OLEc1PUDoVPVba0FoLGqdV oGUOmkOQy1O0KWLP8CzvmTMD3IoxlXszpHkT7aDphHSJoRRsW6QruliJ4xRW/nZQSyq8 Ca4gCXX+zmAokZxDROXONLiOCdfYKBYGA7gRSH7TS20xKbxhVHGU2+tX9KclOEqhFgu5 DEsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Cp9J/w0D"; 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 e13si3369767otr.167.2020.02.12.00.06.25; Wed, 12 Feb 2020 00:06:37 -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="Cp9J/w0D"; 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 S1728506AbgBLIFE (ORCPT + 99 others); Wed, 12 Feb 2020 03:05:04 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45992 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728323AbgBLIFD (ORCPT ); Wed, 12 Feb 2020 03:05:03 -0500 Received: by mail-pg1-f196.google.com with SMTP id b9so649506pgk.12 for ; Wed, 12 Feb 2020 00:05:03 -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=kq2WhCwr7jfZotAo5gF9snLf2LQrQrOPcoUeZRf16vE=; b=Cp9J/w0DE+CEWsDi7e2nrISfjjs2uN3pHcebDiicPXElGgKNjfHxe3Y84fZwh7YiC8 U+ZIIlxUKD4sd6wbrcvljfkGNPGVpX2GwfSZfm0acm2pf1LEQJUALLJdGuufYUYsMj4+ jKh7zIksuLEA+4FFq/LN37N6USTiDjBYWx8Aheafar7Fe3stNLO7Zpejw4cVoUtiTAFD aTi9BqUbeeHpY/nsm3LxbWErrc3TC0A0258YVRSkH9czR/SQEQ4+NncjA2h3jVdBWQuR CKqXXo97yptBHkmKLAzbkQUyz5KLhNZousu5Yd06P7cWcxQfJMU6w7DoevzYzYOpFFwz 79Bg== 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=kq2WhCwr7jfZotAo5gF9snLf2LQrQrOPcoUeZRf16vE=; b=f03HIDz6O5gbojgloU2mJABGEcXxGQLv+qVazoC40fGghO2rUAOTE2jzMOQMMgFYVz s/0HInWKqUofUCyE8PfMfX5ae2iVh7J8mPdGaRCCI/RSbxoZQS7MCbRQ80WDHDtUWDZH 16eWBTH6WuAHHgA0cDbfIEBhSGuX39+QNwklCAhEcfrvTN/5/SSb139sZZszESHMVhyj eJap12fU++uo6PvcyTbZWDV4SQv8QHGNXjiwJ5NDdkjhSCrfwWiPsPTw5FPyQ3n0XS8+ Ky9i/DiZHTVWO9x/+ND950ep9m8JxnEnHFCXRMs0GCtgE7N3a7+JIX3vveFvSn38NkdJ 9OuA== X-Gm-Message-State: APjAAAW2dFY5U3ivYTs1EKAbhEMvZ9zCKAzecBIrmrfLICQyPM7nCRQy q0dtokNc0VT62j8EUzuStU3jzeR6yY8= X-Received: by 2002:a63:5848:: with SMTP id i8mr10877081pgm.438.1581494702892; Wed, 12 Feb 2020 00:05:02 -0800 (PST) Received: from localhost ([106.51.21.91]) by smtp.gmail.com with ESMTPSA id x26sm7342047pfq.55.2020.02.12.00.05.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Feb 2020 00:05:02 -0800 (PST) Date: Wed, 12 Feb 2020 13:35:00 +0530 From: afzal mohammed To: linux-kernel@vger.kernel.org Cc: Guan Xuetao , Kate Stewart , Greg Kroah-Hartman , Enrico Weigelt , Thomas Gleixner Subject: [PATCH 13/18] unicore32: replace setup_irq() by request_irq() Message-ID: 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(). 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 --- Since cc'ing cover letter to all maintainers/reviewers would be too many, refer for cover letter, https://lkml.kernel.org/r/cover.1581478323.git.afzal.mohd.ma@gmail.com arch/unicore32/kernel/time.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/unicore32/kernel/time.c b/arch/unicore32/kernel/time.c index 8b217a761bf0..6f29c3ae95ff 100644 --- a/arch/unicore32/kernel/time.c +++ b/arch/unicore32/kernel/time.c @@ -72,13 +72,6 @@ static struct clocksource cksrc_puv3_oscr = { .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; -static struct irqaction puv3_timer_irq = { - .name = "ost0", - .flags = IRQF_TIMER | IRQF_IRQPOLL, - .handler = puv3_ost0_interrupt, - .dev_id = &ckevt_puv3_osmr0, -}; - void __init time_init(void) { writel(0, OST_OIER); /* disable any timer interrupts */ @@ -94,7 +87,9 @@ void __init time_init(void) ckevt_puv3_osmr0.min_delta_ticks = MIN_OSCR_DELTA * 2; ckevt_puv3_osmr0.cpumask = cpumask_of(0); - setup_irq(IRQ_TIMER0, &puv3_timer_irq); + if (request_irq(IRQ_TIMER0, puv3_ost0_interrupt, + IRQF_TIMER | IRQF_IRQPOLL, "ost0", &ckevt_puv3_osmr0)) + pr_err("request_irq() on %s failed\n", "ost0"); clocksource_register_hz(&cksrc_puv3_oscr, CLOCK_TICK_RATE); clockevents_register_device(&ckevt_puv3_osmr0); -- 2.24.1