Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1233268ybf; Sun, 1 Mar 2020 04:23:32 -0800 (PST) X-Google-Smtp-Source: APXvYqzgPKPcMDS+1iItwgV44Ko8n6OqjqipaNL/bNdo2luJW7G8AUODnJ033q3ZnqhIhk101ab5 X-Received: by 2002:a05:6830:1e76:: with SMTP id m22mr10178021otr.295.1583065412791; Sun, 01 Mar 2020 04:23:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583065412; cv=none; d=google.com; s=arc-20160816; b=QqaYwV/yFbNV6vvFaxuBe3xnRbS1gsOTWz1zTsOdPa51YQrRI6u3LfitLI+p6FAtve ijd8SXdOJ2XikJZFuuzokxNctH/id8cb7YzbXzVur5zdGwCV3i5MxJdjAf6o6Arx42+F BEEAdXHfbFngNLPbz2zCs3vE2McDNAZoHLga+arUfcKqalJrYS6Tx9RPCkmJY2rYx923 vEVb6FDn6Ghok5zTYG41eYPFeVWo/tyRdEqOthXAgMPUBAgM0NRZMO9/3jzmf3baEUpR ppwcj12YpzCNhwCpQTw/1WE4VD6AzQkmn7+a40EI4MBxAAdOXRe67I3+sYYuXPQzEVIu EFPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=GR/xI2gMyvXWdFF9S5uRZpICRt+f76h6nOitHcoQYmY=; b=IG1N9I2NXHGlgBRJ0cVjFIPzbWRnBzC+kGR3hq12T/2VI6JD3SQGrJWhpFpVuHAFtl ageZnlFlXd/rTnTgBPIa5X3VLMBsKxcLwKdfwjuzsc/0+0uyMWv7W1L957baSxioaM+B d4/sCzWIH1x0oBq1vNkzBQJka9oGODlpbAp7wGB/daV6VDFYsZ3I2JkBjMb3v6ZD3D4s BamvJHPzTr5M1P91YJlxVyKtWP1MVlfWImSLlnzsK6Q5JYmJLaz2cjuS8yUlvidvndSC EXFqbC48XojuZKZ043+pNUXI1yUDnEvZvvIwHkJXJchpK6tJhfHqdOLQTu47VLvWD7qq 2ukA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UK5HCV40; 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 x20si3067784otq.253.2020.03.01.04.23.21; Sun, 01 Mar 2020 04:23:32 -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=UK5HCV40; 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 S1726775AbgCAMXK (ORCPT + 99 others); Sun, 1 Mar 2020 07:23:10 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35567 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgCAMXK (ORCPT ); Sun, 1 Mar 2020 07:23:10 -0500 Received: by mail-pl1-f196.google.com with SMTP id g6so3080763plt.2 for ; Sun, 01 Mar 2020 04:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=GR/xI2gMyvXWdFF9S5uRZpICRt+f76h6nOitHcoQYmY=; b=UK5HCV40LjKSntbr1iFufyeFeOXrmKYkN2ZIwvyGnR4UH3pldM0FCkS0Mmg/uqK7+p bFypS/136bNGzhW+erlbqIlAlTxlvavQGDgEuqQ340AnRsFHIy5a74Mj7nysOkOpHvKt tLes7YFdOiW1lAA0QvFfI64LRKMsgBuDWJlZ3g+VrxW86hpzpeHN69qnrSwXScq1yzS8 l+nXaxJN2vnvclJAB1H0nDqPNK9jL/Oi9tk0PDyHPwC3Y1kUhShqk2qTWQsdOPYpggXU x8QA4pdaauaYHm5J56DXVrDR2QbvJU67q8ByUJD37GGO0gkWsOE5Enarqs8npp/mbMrg IdGg== 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; bh=GR/xI2gMyvXWdFF9S5uRZpICRt+f76h6nOitHcoQYmY=; b=iiDZtX9TCkQv+B+hOAbh669j/x4wUo/d7W9wYtGkgSTrPru3y9PEOltDaBR53SVCwH qrxkngJRVRfadYQvHH1xE27V6fPoLKFpGWxciJo6i+FKyjb+xLJvnTf3YPaMTL4wSqYy 3f28cMeXD3/iWDoWTGj7gmvQCV05tHzf8ZEGAXU78j7pu6kkMy9sMN5O5iaMHKqzppiQ oT7W9JuJayHylEaHeuEhef9dN5lf8Z4qi8IdvXVxYtJWf2qKxn/oAACkvXJD68vnbx9u vcBEpq8Z7ZYMshi2GfQaoM5BP/psvgZ4a3eQ+bxZF7oi6Q/lArAU610JBRGKsTW44I+U TXNg== X-Gm-Message-State: APjAAAUxmwDvxd7pOod1jt1LCrsCY4NzGOu78m+uIxjoMBW2E0S/4pM4 ZcRLYDasVMZhd2tZJUG/6mk= X-Received: by 2002:a17:902:104:: with SMTP id 4mr12889185plb.24.1583065389361; Sun, 01 Mar 2020 04:23:09 -0800 (PST) Received: from localhost.localdomain ([106.51.232.35]) by smtp.gmail.com with ESMTPSA id 26sm8623725pjk.3.2020.03.01.04.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 04:23:08 -0800 (PST) From: afzal mohammed To: Viresh Kumar , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: afzal mohammed Subject: [PATCH v3] ARM: rpc: replace setup_irq() by request_irq() Date: Sun, 1 Mar 2020 17:53:00 +0530 Message-Id: <20200301122300.4185-1-afzal.mohd.ma@gmail.com> X-Mailer: git-send-email 2.18.0 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 --- 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/mach-rpc/time.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-rpc/time.c b/arch/arm/mach-rpc/time.c index 1d750152b160..da85cac761ba 100644 --- a/arch/arm/mach-rpc/time.c +++ b/arch/arm/mach-rpc/time.c @@ -85,11 +85,6 @@ ioc_timer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static struct irqaction ioc_timer_irq = { - .name = "timer", - .handler = ioc_timer_interrupt -}; - /* * Set up timer interrupt. */ @@ -97,5 +92,6 @@ void __init ioc_timer_init(void) { WARN_ON(clocksource_register_hz(&ioctime_clocksource, RPC_CLOCK_FREQ)); ioctime_init(); - setup_irq(IRQ_TIMER0, &ioc_timer_irq); + if (request_irq(IRQ_TIMER0, ioc_timer_interrupt, 0, "timer", NULL)) + pr_err("Failed to request irq %d (timer)\n", IRQ_TIMER0); } -- 2.25.1