Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1738128pxm; Thu, 24 Feb 2022 08:28:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2VihLx+6+KqiNDUQVZJdZO4+riLj6+TfNv27j3F62lLYp5mtjFuWBbviBBWleX+NbKGlp X-Received: by 2002:a63:385d:0:b0:36c:479d:c0c with SMTP id h29-20020a63385d000000b0036c479d0c0cmr2858904pgn.444.1645720082476; Thu, 24 Feb 2022 08:28:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645720082; cv=none; d=google.com; s=arc-20160816; b=NihdvarXDVoVYau3gghM62zEYYG9swa0HNO3xfKsi9nTJPSqC7KaxQBDr1H2XcP6sZ ynoRUIaj9qOYvseV6WIbhAOVU7hQ3MD7u9tSxENAul3nENfI3IXMuauW+dj+FQ5tH0O7 HXamFaW+6YCRv5n5aG9xpCHfqz/2BoyI6L+PNTe5g7cU6BpyNrF76aZfLEHzbD2eHte/ /SqSUdKLMJog1U8qYcNYZ6hES7zBMXt5QMhg9/WgaNpeltDtEtzYwa9/7dBsZg8gC3qA 15A4owKfKGVOGSiIQRkLeZYrt0o4Paqjaw04GFb4Ldaeu1nE5Mz7sTLS8BDFlKvEife+ DVEw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=K4DYTYamw5W482/bqkvKLO28oQ2hPpAmTuktLI5/W5A=; b=DBpL5R6hq3EhSoPcLqxibBw3OZSUIToGoxxDG56GdniGy5ja+JhOi68L71ZTGlY3qu 9+zI4GUsspoDof/Y0W9kFLaHNRzUUbiA/mM6TBxT39YjrWBdXGNudwIpdyfm8mIPIh9t 1VyFxN6gHwOPQHepIbBV+M54POfijMgnO7l+Z069Xs4wfJ6SVWwVa8w59i26+6ZwOEnv zRzBUui9ZQC0Iskqf1X52MX+n4QTMwvz3Gch/b7fIpeOqSPUq+CTLsUEih7iDZc3muqg y0lUUlQj8pxtzZ29eLyJbOwd1+DRbR937ddqVXQ/u1nk2jcF+BUjtrB3XalUbZGnKTxK MTKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=M4RCB8gD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i6si2633007pli.498.2022.02.24.08.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:28:02 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=M4RCB8gD; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 40D61199D6F; Thu, 24 Feb 2022 08:16:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235581AbiBXOlZ (ORCPT + 99 others); Thu, 24 Feb 2022 09:41:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230187AbiBXOlW (ORCPT ); Thu, 24 Feb 2022 09:41:22 -0500 Received: from m12-17.163.com (m12-17.163.com [220.181.12.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 904DEBF502 for ; Thu, 24 Feb 2022 06:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=K4DYT Yamw5W482/bqkvKLO28oQ2hPpAmTuktLI5/W5A=; b=M4RCB8gDCtTt+hAXnECXj scU/STDoPL81wPXc13rQskNZ3nrqcjTM1tZ9Iajl56XXG7863iwrlw07SHSCXSkQ 25LrauqrFAikSGwhEt/kW18IkdjVzUKhj7Q/uqo3bIypXu0tOrgVQ/nAJOf5qu/W qJ9rHXvHzkwTB0d6BLc0pY= Received: from localhost (unknown [113.116.50.49]) by smtp13 (Coremail) with SMTP id EcCowADnJqDVmBdi9XD4Eg--.12459S2; Thu, 24 Feb 2022 22:40:22 +0800 (CST) From: wudaemon To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, wudaemon Subject: [PATCH] genirq: add log level to printk in print_irq_desc Date: Thu, 24 Feb 2022 14:40:18 +0000 Message-Id: <20220224144018.2271-1-wudaemon@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: EcCowADnJqDVmBdi9XD4Eg--.12459S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7WF48GF43Zw1DKrW8Cr45Wrg_yoW8Cw17pF y3Ja43JF48G3WUXayUA3Z5ury3Ca4UGrWUGFZ8CFWfWF1jgw4Fq3yay3yFgr4YqrWrZry3 XF45W3sFka1rArUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pR7l1kUUUUU= X-Originating-IP: [113.116.50.49] X-CM-SenderInfo: 5zxgtvxprqqiywtou0bp/1tbixhexbV3briP2tAAFsB 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,T_SCC_BODY_TEXT_LINE 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 add KERN_DEBUG level for debuging purpose, use checkpatch.pl check prompt: ERROR: Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects so add do - while loop to Macros Signed-off-by: wudaemon --- kernel/irq/debug.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/irq/debug.h b/kernel/irq/debug.h index 8ccb326d2977..ce0ec677bea0 100644 --- a/kernel/irq/debug.h +++ b/kernel/irq/debug.h @@ -3,8 +3,8 @@ * Debugging printout: */ -#define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f) -#define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f) +#define ___P(f) do {if (desc->status_use_accessors & f) printk(KERN_DEBUG "%14s set\n", #f); } while (0) +#define ___PS(f) do {if (desc->istate & f) printk(KERN_DEBUG "%14s set\n", #f); } while (0) /* FIXME */ #define ___PD(f) do { } while (0) @@ -15,15 +15,15 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc) if (!__ratelimit(&ratelimit)) return; - printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n", + printk(KERN_DEBUG "irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n", irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled); - printk("->handle_irq(): %p, %pS\n", + printk(KERN_DEBUG "->handle_irq(): %p, %pS\n", desc->handle_irq, desc->handle_irq); - printk("->irq_data.chip(): %p, %pS\n", + printk(KERN_DEBUG "->irq_data.chip(): %p, %pS\n", desc->irq_data.chip, desc->irq_data.chip); - printk("->action(): %p\n", desc->action); + printk(KERN_DEBUG "->action(): %p\n", desc->action); if (desc->action) { - printk("->action->handler(): %p, %pS\n", + printk(KERN_DEBUG "->action->handler(): %p, %pS\n", desc->action->handler, desc->action->handler); } -- 2.25.1