Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5796487ybv; Wed, 12 Feb 2020 00:06:08 -0800 (PST) X-Google-Smtp-Source: APXvYqzAYK8QkKmAe6pRIWvPrDI4YHAj4zC0lT6KrjppnDOt89exTTu2dH8OKWeOpEMz6kK5ggAn X-Received: by 2002:a05:6830:1188:: with SMTP id u8mr8337215otq.274.1581494768834; Wed, 12 Feb 2020 00:06:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581494768; cv=none; d=google.com; s=arc-20160816; b=yfQD82YktIIs6lL7NAF0O+XZtVlpGPrBu1ajdPoSn5cTGgYVOgfIjuivI9G5TDyasp lHCuZsLBdr0UNm68EuzTBsdDd3oYIyF4LMXwhioMs0mFmXF+z38BVTfEkwEqaY9fh7AP +csqiF+HE+5/gUQBk4+jMXd3WXN7kj9Q+k9O2Ebmxj4agFlfsV7z1xItbqShXrFpppe6 sbyZbQ5ZVsKYDUm1B2LeIM9zhbztp5+6filfyAGqfKIGryOFL1rltR5B6A5GNz86fsNi bl82SKYUPamRXQnS1D3IYTf6L36mxJk0i6bHbT+ZXPVy+hQCrsPKh1xTU4JJm3ryo+3l tTUg== 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=zuDNKH5NHt/i5nd0z3Pcz2o0VZtvfQqEQkILfY6Q8DY=; b=eTiGjbdp+bQvzNfMQ/N8lcVv5Ah65i0hELJtVbFy6GJN5efBY0o7t0RJzjr+6oxANp TjVPLMCQfKqUzCJTIwQArJwKklRnctdDG/uZLBhhNdibgKlxNxhwTj1Mp/vsbKVO5r6l JI5w/m1eYPvHfeJXiDMiOVRVDnzzE2ixHY3yFLmrPm0XPeX9c60m8Adf6589jAnPjaP2 XQdgaY3EP2AeStUXOY7yGTwpwNhNmwfrDSBfolDjUTffLi7FIKbljpkta6Ds5v08BVcW ivLi7e/EWXT3PzxHucGcxH5bdsEN+dhtkpRo3n9yEokOqp2R5E21eGbJBHhbbUSovfGx K+bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dCjeNWLt; 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 a20si3267035otf.271.2020.02.12.00.05.54; Wed, 12 Feb 2020 00:06:08 -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=dCjeNWLt; 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 S1728556AbgBLIEk (ORCPT + 99 others); Wed, 12 Feb 2020 03:04:40 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:37941 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728483AbgBLIEk (ORCPT ); Wed, 12 Feb 2020 03:04:40 -0500 Received: by mail-pj1-f65.google.com with SMTP id j17so542300pjz.3; Wed, 12 Feb 2020 00:04:39 -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=zuDNKH5NHt/i5nd0z3Pcz2o0VZtvfQqEQkILfY6Q8DY=; b=dCjeNWLtgR4h2tDSrDBiR6MfWAAAlRbx8lVVjJqMl3KWeT3IN9WOJBLTtYs21f7Rvz jVdygF5K1YGdQ7KMVGy2N+/U1WUn3uZtd3Fg/jBkK2MOa/uSP9lpV50wTAsdwS96IQGa MOTRROOPa6VjOTrKzgBI0uKC2Raar0zbOntQxKWh/KJm5uWXW1c/IsgqxrUKg9tJSqut Z0VQhNcwyQ8bSN2zhIYirbXkk1NKo6YSKe6PNWET5mIXDfpLYbauR/M4Smnac24MH4ty DS2JUV/SUWS3AuDzjyt3uAHoOpP6Ez4iGNxbKOV/Vdgn8QtGy3w6mzpn9BOejcblxXQT mbsA== 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=zuDNKH5NHt/i5nd0z3Pcz2o0VZtvfQqEQkILfY6Q8DY=; b=DJFenv3UQANj8wWvPA1qr+20ACELXXNSfS9KOTlCfvviG9aG2FjETwlYII1WkqxrhI /JPyvnD3v2U8iiXQGo2JW6lR0cGzQsPyxYJy1WlhRKl3B1JiMwktnZjP8Qqy7Y9B5WDy Wu5qsImStWz6DPZe+L3sgQIAzE6/HckaDTHcKKQdZ1yaI6EzFnNK4UBECPKptlh5M/Fz iiZO7aNVuzJdB895q7SyHD+sa16jl93uMlxHCExpuxCOxu2+jYlNk4EEAAH92DIyP8SY tzUtWrbRbAEPAk9yI+VgzMIEzId+IkYZ64ZaSPigFcln9MidNvaV5+5nkfAuW1BR7h8u YUZA== X-Gm-Message-State: APjAAAWSqprT1J3UxKtGVW0odpgicdhrcBITmV1lDcDx/RUpkJh1ahLm L5LL0KoZE0B9Hs2z1oRcK/POjhbNG+o= X-Received: by 2002:a17:90a:d80b:: with SMTP id a11mr8656701pjv.142.1581494679235; Wed, 12 Feb 2020 00:04:39 -0800 (PST) Received: from localhost ([106.51.21.91]) by smtp.gmail.com with ESMTPSA id i64sm6749888pgc.51.2020.02.12.00.04.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Feb 2020 00:04:38 -0800 (PST) Date: Wed, 12 Feb 2020 13:34:37 +0530 From: afzal mohammed To: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sebastian Ott , Peter Oberparleiter , Martin Schwidefsky , Thomas Gleixner Subject: [PATCH 11/18] s390: replace setup_irq() by request_irq() Message-ID: <30f6d47f87ec794ea3fb91387d43d19016fa10bc.1581478324.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(). 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/s390/kernel/irq.c | 8 ++------ drivers/s390/cio/airq.c | 8 ++------ drivers/s390/cio/cio.c | 8 ++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index 8371855042dc..6dd90e8d4e3a 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c @@ -294,11 +294,6 @@ static irqreturn_t do_ext_interrupt(int irq, void *dummy) return IRQ_HANDLED; } -static struct irqaction external_interrupt = { - .name = "EXT", - .handler = do_ext_interrupt, -}; - void __init init_ext_interrupts(void) { int idx; @@ -308,7 +303,8 @@ void __init init_ext_interrupts(void) irq_set_chip_and_handler(EXT_INTERRUPT, &dummy_irq_chip, handle_percpu_irq); - setup_irq(EXT_INTERRUPT, &external_interrupt); + if (request_irq(EXT_INTERRUPT, do_ext_interrupt, 0, "EXT", NULL)) + pr_err("request_irq() on %s failed\n", "EXT"); } static DEFINE_SPINLOCK(irq_subclass_lock); diff --git a/drivers/s390/cio/airq.c b/drivers/s390/cio/airq.c index 427b2e24a8ce..773208a3bb68 100644 --- a/drivers/s390/cio/airq.c +++ b/drivers/s390/cio/airq.c @@ -105,16 +105,12 @@ static irqreturn_t do_airq_interrupt(int irq, void *dummy) return IRQ_HANDLED; } -static struct irqaction airq_interrupt = { - .name = "AIO", - .handler = do_airq_interrupt, -}; - void __init init_airq_interrupts(void) { irq_set_chip_and_handler(THIN_INTERRUPT, &dummy_irq_chip, handle_percpu_irq); - setup_irq(THIN_INTERRUPT, &airq_interrupt); + if (request_irq(THIN_INTERRUPT, do_airq_interrupt, 0, "AIO", NULL)) + pr_err("request_irq() on %s failed\n", "AIO"); } static inline unsigned long iv_size(unsigned long bits) diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 18f5458f90e8..1b87e2e84007 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -563,16 +563,12 @@ static irqreturn_t do_cio_interrupt(int irq, void *dummy) return IRQ_HANDLED; } -static struct irqaction io_interrupt = { - .name = "I/O", - .handler = do_cio_interrupt, -}; - void __init init_cio_interrupts(void) { irq_set_chip_and_handler(IO_INTERRUPT, &dummy_irq_chip, handle_percpu_irq); - setup_irq(IO_INTERRUPT, &io_interrupt); + if (request_irq(IO_INTERRUPT, do_cio_interrupt, 0, "I/O", NULL)) + pr_err("request_irq() on %s failed\n", "I/O"); } #ifdef CONFIG_CCW_CONSOLE -- 2.24.1