Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp892650pxb; Fri, 22 Apr 2022 13:36:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1Klg0ugJ8TFZG7SFbSlqr6aodiG7366UNj/RU9CAH+ak2T1PiMkNhgZfDFGbEBCJzP4VR X-Received: by 2002:a17:902:ccd0:b0:156:7ac2:5600 with SMTP id z16-20020a170902ccd000b001567ac25600mr6512415ple.156.1650659792677; Fri, 22 Apr 2022 13:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650659792; cv=none; d=google.com; s=arc-20160816; b=EI4ReiFh0wApY+/uRadeoLy8v3p3w1bieC/jCiO32bt8+Yezx0H1HFPZICQmqELhgA D6YwgLzyPukaNJgUkNsHsjNBqkM1mUOFAlyQ2jM7ygcxFtyjULoluXufhkM45+gHhByo HYatNwJUmOy41Vira5pxfiZkARHjIYiOKdnZzukMcD/V9ha4yo9EbJbfZN1vKOCifElr MP/LKGQ6v91honoh+axcEkTjBWhSgqDw4K2Ch+hKeFHX9SPSxmrVGxgVaVJ3moyCr5sX /89RJyi0led4iIozKBWUddcClT1H5xNAQAuLoKRzQXRLFdBx/y7hMHSM2duaDsT1edDv kHug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wWmKOaGrL4CkXTbn+/gnRNrWxLM3MTWpbfZSE/ojIP0=; b=REE5iNDqrh1kA9B0maioApVHQ6YFX3mS6PlpwyVehNdFo64cPSrHYwA2pXKB4n+BMx +djPQAi4+CrIrFaXws5/z0X2iT4Ua/O5n+Tf5l1LO3uEO7VerEPclh0us3aYOffBiI0F 5LuG5zo88OgKThgbslw2Vc5fTZj7hcZnEjhYLPL4gLaUA5es2o57koCkZZn7JRRcGosl 6Ck/BW2bNTqEEIEH3Do7i45pWRTP3RWeSzqrFjSf4U16LxASAqUds3wtbz+FW5Pdkniy YMpFCRscxyVu7ys22JGOqmtOM67Gezcoahhk692Qo0D93L7EBEuZlrgACnEkwCMu6Q8Y jALw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HAd6plBI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n15-20020a170903110f00b0015408026bbfsi10367431plh.309.2022.04.22.13.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:36:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HAd6plBI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C24B61C3792; Fri, 22 Apr 2022 12:22:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379308AbiDTOIn (ORCPT + 99 others); Wed, 20 Apr 2022 10:08:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379305AbiDTOIh (ORCPT ); Wed, 20 Apr 2022 10:08:37 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3EEB3E0E2 for ; Wed, 20 Apr 2022 07:05:51 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id 2so2047012pjw.2 for ; Wed, 20 Apr 2022 07:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wWmKOaGrL4CkXTbn+/gnRNrWxLM3MTWpbfZSE/ojIP0=; b=HAd6plBINYnhg2F8X9HhGuothi7z1ne/yZzTMlHKYjkdaWIrDHLx4/5/Y/vxi+7SjA C0Y72m+k54ysFoJ5W8mXLzDwxWVre70Gz1oWyRdf7iIs+rCNOEw1m5gDG86bKnMRNCW0 dJPzLwkQnb4Xo2NgrRoCXS9vGOkXm1qOKototZekHmh7XrYTfq5TdW7/vOeSnqUr8WbN HgQIy4tasBqj4hLLt7VuJ28N3AShkbL5CBmkpNkAdpZue1AZRrox3c0h2AhfUyT9yPLH NxFJHS04oSg4wcrfAemjxl5sUTod8b2Fi17TFdAjn+z8JjaKDo/hMz4inFdbjYc67xSi 9OSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wWmKOaGrL4CkXTbn+/gnRNrWxLM3MTWpbfZSE/ojIP0=; b=8Pc8u3sAsxOmOtCEDRqhhUNSj1DS9qMXikpFy5CmdHjavgJ1D2TnmWkIEoWdixl9bj yk+agPqJiMdjijutaxeyXBt3fCMt4yNnX7mjQ0SaAW62oyzIdX2IEfszrdEOetGIuzDX 8H+P/ApKPnHSLICSDmvRlNTbv2UCIIjWcyO75ZWpSPu2Nq2Un/nSXBpcIpoBoiZLGWkc UuLIZNsVnlQo9MDfR1tdNsR+6LY883PMARHpuNdhMSMxsDH0W9mrpk23Ffw/32XBxuzv 9L8G+AG7DLQMEa8Da0UZU03/39rQlXoDGNlRRkT027xAGpAFTrLIsuJGyc+MLmq1JHb4 JuMg== X-Gm-Message-State: AOAM531LmnOGdSUBMDGWDmyCog4we0fkaRI8MYebOhvBuyVCCqPXRN+9 RsNKYaPWZFkGzFUgJ9XZN496kChgOQ== X-Received: by 2002:a17:90b:3c47:b0:1cb:8121:dcc8 with SMTP id pm7-20020a17090b3c4700b001cb8121dcc8mr4715374pjb.35.1650463550963; Wed, 20 Apr 2022 07:05:50 -0700 (PDT) Received: from piliu.users.ipa.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id br10-20020a056a00440a00b0050a777cd10csm10959178pfb.91.2022.04.20.07.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 07:05:50 -0700 (PDT) From: Pingfan Liu To: linux-kernel@vger.kernel.org Cc: Pingfan Liu , Miguel Ojeda , Thomas Gleixner , Nathan Chancellor , Nick Desaulniers , Tom Rix , Marc Zyngier , Florian Fainelli , Bartosz Golaszewski , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , llvm@lists.linux.dev Subject: [PATCH 3/9] irq/manage: remove some unreferenced code Date: Wed, 20 Apr 2022 22:05:15 +0800 Message-Id: <20220420140521.45361-4-kernelfans@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220420140521.45361-1-kernelfans@gmail.com> References: <20220420140521.45361-1-kernelfans@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Neither remove_percpu_irq() nor for_each_irq_nr() has any users, so they can be removed. Signed-off-by: Pingfan Liu Cc: Miguel Ojeda Cc: Thomas Gleixner Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Tom Rix Cc: Marc Zyngier Cc: Florian Fainelli Cc: Bartosz Golaszewski Cc: "Cédric Le Goater" Cc: llvm@lists.linux.dev To: linux-kernel@vger.kernel.org --- .clang-format | 1 - include/linux/irq.h | 1 - include/linux/irqnr.h | 3 --- kernel/irq/manage.c | 15 --------------- 4 files changed, 20 deletions(-) diff --git a/.clang-format b/.clang-format index fa959436bcfd..fb161bc8ca1a 100644 --- a/.clang-format +++ b/.clang-format @@ -198,7 +198,6 @@ ForEachMacros: - 'for_each_if' - 'for_each_iommu' - 'for_each_ip_tunnel_rcu' - - 'for_each_irq_nr' - 'for_each_link_codecs' - 'for_each_link_cpus' - 'for_each_link_platforms' diff --git a/include/linux/irq.h b/include/linux/irq.h index f92788ccdba2..ec50007decfc 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -603,7 +603,6 @@ enum { struct irqaction; extern int setup_percpu_irq(unsigned int irq, struct irqaction *new); -extern void remove_percpu_irq(unsigned int irq, struct irqaction *act); #ifdef CONFIG_DEPRECATED_IRQ_CPU_ONOFFLINE extern void irq_cpu_online(void); diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index 3496baa0b07f..082fe0856e87 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h @@ -28,7 +28,4 @@ unsigned int irq_get_next_irq(unsigned int offset); for (irq = irq_get_next_irq(0); irq < nr_irqs; \ irq = irq_get_next_irq(irq + 1)) -#define for_each_irq_nr(irq) \ - for (irq = 0; irq < nr_irqs; irq++) - #endif diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index c03f71d5ec10..b7c86be68b58 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -2466,21 +2466,6 @@ static struct irqaction *__free_percpu_irq(unsigned int irq, void __percpu *dev_ return NULL; } -/** - * remove_percpu_irq - free a per-cpu interrupt - * @irq: Interrupt line to free - * @act: irqaction for the interrupt - * - * Used to remove interrupts statically setup by the early boot process. - */ -void remove_percpu_irq(unsigned int irq, struct irqaction *act) -{ - struct irq_desc *desc = irq_to_desc(irq); - - if (desc && irq_settings_is_per_cpu_devid(desc)) - __free_percpu_irq(irq, act->percpu_dev_id); -} - /** * free_percpu_irq - free an interrupt allocated with request_percpu_irq * @irq: Interrupt line to free -- 2.31.1