Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1848197ybv; Sun, 23 Feb 2020 16:50:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwEMj0Memjh+6zI7DZ0nNUZk1qJY9AJiW5OjzMclb4M1o6uZ/EVxkqcHA70lvSVtuXka6+S X-Received: by 2002:aca:6749:: with SMTP id b9mr10360882oiy.13.1582505451186; Sun, 23 Feb 2020 16:50:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582505451; cv=none; d=google.com; s=arc-20160816; b=N9KWJwNjomNTfjrc7uHS1P2cC0NZC+g86cvfWjD4m9n5uRQepzTbzvSPpRJ1TQbrlf K5+gUXot7XGV4zOziAFoFfna3cXkUC8Sx85lSW/0stfnDv7cTfGYT5h/0vZ1eLyv08/i WwP4+46s4ZppCy1VPIPYXcPiMkqgrhKExmc/JIEDJXFNxDMgEbO0e9BJmtsnGkMp87E2 TqsJglb2FHgKJONq+kfuOnDMk9+mGiw1eqgIlauX4PF3Pce0GiXQGyvUezLMllFwXCyt WGSGZjXM4RO6oFchNImcCtoxaXgKfWbq75QRqQr69sX6NB1zK5qHDpJrKREiofqtKd1h mbAQ== 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=aF2z8+E0AwYI5qjyMhAQIkKUTThSQyGv129oA05SnGM=; b=hZxhwwfLcNuMWpMaBJA/Gs88OHPSxqSs405xJq6/2NcoQSx0zRgBvVd4XeV5bCPK+2 b3Ko7xRB+qMc57MapV/F1mRosGQZ0kSdQIAtx6KOiFOwLterXn7h6fMSuoJrDBqDSV2O mMKxbK4h3KihjeFiS3cj6aDGsbmRzG4Bgjc1OQq0RtW3VQhp7Spq/2tOGyGST5EklXB5 MR0ASC3xqhkJXugdX+UfEvpgdjjF3FsrUtzWU3hJ8DJeypufVrQbKWYnmBz+CbMrwmsF WbYaJyqgVRPGvQkNFv1dtdjYeizDdyyCx7wK6Djn3W2ILlrraoA+K+yytlgJZzaYUxnx u+1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=miOEcLxQ; 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 r10si5845210otn.241.2020.02.23.16.50.39; Sun, 23 Feb 2020 16:50:51 -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=miOEcLxQ; 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 S1727223AbgBXAtX (ORCPT + 99 others); Sun, 23 Feb 2020 19:49:23 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38220 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727158AbgBXAtX (ORCPT ); Sun, 23 Feb 2020 19:49:23 -0500 Received: by mail-pg1-f194.google.com with SMTP id d6so4225364pgn.5 for ; Sun, 23 Feb 2020 16:49:23 -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=aF2z8+E0AwYI5qjyMhAQIkKUTThSQyGv129oA05SnGM=; b=miOEcLxQCYxHHwgKXBkzt7cOJoZ9yVJPPnFMYemYVT8SQNxK9vvqxphw46vVxMtp1i jxRZR3dnVEmjsBvqIWb4k+jenwLh9dZmkV8ej87DehLHyVfY59jcg1duFhqqq/pqYazT nPsHI2fN1vDPCEOj0FwAAre31Igfv+h/OysQAOJwM5IW6jtufta2Jzkz9vR+sNeK0qjA c8AQWUfRq9KXFbr9EY6Y8RyPLuRU33TKUm82cdZuqjwVevkvFOS3ItfxJUixrAne0SDI BLHEiTdN9USkzafMFgRI/LWYsQ4B5DCTYR3oN2ba+UML+a/N1f6DLIqxyWKMmkctKQP6 k7sA== 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=aF2z8+E0AwYI5qjyMhAQIkKUTThSQyGv129oA05SnGM=; b=H2GxSLCxaSCWCPw5HbZsBPVUnQCCTLr9Vr1iBoiwwrIbGZYJTZiyXEp83wNTUVbOUf G75lFuI7+JPpPtA46krVqJg3shTpozVZdE/sz5egtPpNyJPnHwUk/8enaYEVIM45t+vF +evTf+UBa2ndWT1PcYq00r+gpJoQF2YPaXzQquZ/Kw15NNHUpTeMSM76eBqbyQ/OttlJ wMHWAyNMnIAHzdbJo+9Lt+fPFa+7Rh4ZMibK1ki61v7oF7jhQl7EY6EmmF8K4S8OZuWn mEWc7Vkp93IF/VoArmvzcliQ14b40cso/QET7KwBcqM9Db09OMpC7ZN9s1Z055nDnnL7 bJww== X-Gm-Message-State: APjAAAWmqFHVMfRKmufvarBE4XWlW10MFzQV4NRo78RO0EaZquD0WGJ/ 1yfruwjUYJkJlgGbMgRqQjo= X-Received: by 2002:a62:1c95:: with SMTP id c143mr47345462pfc.219.1582505362707; Sun, 23 Feb 2020 16:49:22 -0800 (PST) Received: from localhost ([106.51.232.35]) by smtp.gmail.com with ESMTPSA id f81sm10244442pfa.118.2020.02.23.16.49.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Feb 2020 16:49:22 -0800 (PST) Date: Mon, 24 Feb 2020 06:19:20 +0530 From: afzal mohammed To: linux-c6x-dev@linux-c6x.org, linux-kernel@vger.kernel.org Cc: Mark Salter , Aurelien Jacquiot , Thomas Gleixner , Enrico Weigelt , Kate Stewart , Allison Randal Subject: [PATCH v2 03/18] c6x: 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(). 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 Acked-by: Mark Salter --- v2: * Replace pr_err("request_irq() on %s failed" by pr_err("%s: request_irq() failed" * Commit message massage arch/c6x/platforms/timer64.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/c6x/platforms/timer64.c b/arch/c6x/platforms/timer64.c index d98d94303498..0b8c47bc16ce 100644 --- a/arch/c6x/platforms/timer64.c +++ b/arch/c6x/platforms/timer64.c @@ -165,13 +165,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static struct irqaction timer_iact = { - .name = "timer", - .flags = IRQF_TIMER, - .handler = timer_interrupt, - .dev_id = &t64_clockevent_device, -}; - void __init timer64_init(void) { struct clock_event_device *cd = &t64_clockevent_device; @@ -238,7 +231,9 @@ void __init timer64_init(void) cd->cpumask = cpumask_of(smp_processor_id()); clockevents_register_device(cd); - setup_irq(cd->irq, &timer_iact); + if (request_irq(cd->irq, timer_interrupt, IRQF_TIMER, "timer", + &t64_clockevent_device)) + pr_err("%s: request_irq() failed\n", "timer"); out: of_node_put(np); -- 2.25.1