Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp485439lqb; Wed, 29 May 2024 01:20:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUTxCW6EahFJ3wf+iIz40RPahs+TLlAMHFXyE0dobVfUK6DCu+djDt45Pm3+XRdthKNzU9zzUnYCRLqf7K4UHDwjj7/4f0l00T0NuLXng== X-Google-Smtp-Source: AGHT+IH/SC6Zp5mFkoqyBUBRN91h0b8bTnCnHO9+972sed7vVKOPHtIpvKom/hXLrTj+9I44Lm1u X-Received: by 2002:a05:6214:5681:b0:6ad:7694:2d1a with SMTP id 6a1803df08f44-6ad76942e56mr114937996d6.1.1716970809274; Wed, 29 May 2024 01:20:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716970809; cv=pass; d=google.com; s=arc-20160816; b=KnYBa+pXV56x5rm07IYt5025q/43Sn6Lq2ieiAT3eVZ+Nwtq3cud+0vU2dzwT0jFrG kL/mhjsnJc8T7poDC5d20dX/eFm3Y81bJz0+rdE7g2ifU1Q0hNgHntkhZT9DSwAjud0x RB1PNsUHmmNYRkXWIYq4OeLLWd7qOeqrbUL1rhxTDIrcIQqpGusZ+zsRHIVC+y7T9yMw N0oqaNktEXlVcgE1val5a2O6A1//WEhvM2B97xuynJZPcqOKmw7I4vVVAGiNxdPSBTzE cFHgFEleBtvRwI5NjmIR8gNDtmh0IY3SQtNXPhU+0l5EygwwyFGQXj6hlRwUx8W1gqyW QvLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=cdrjeB8beYO9Wxg/8OYQKTmAoUwzpnO3hiZ79lAM5DQ=; fh=E762zwGjlneN3nVefwferRmxrYPVMeB4RPy755j6/pg=; b=Q/SRC34ZRCqR084kgaXRp7Q9Pjpc2yf27BcJbFMbI/iBcI4xZ2ybyZZLX0VcJOJSfL PjOHr8+PR/z3YzZ8fuP/cpUTq/THzegsoeFRP9sVk4qhh0ITpQ07NWYOS4N2wQ3uidhN hHL4qZorPnzMnyQiZxaCLaFp0Al3pN8/Gvi3+aUZ0pY5McN2hDPaF9qiDX41R8llX9RS TMB2pQJcorvuE4XYTKtgzF6402lC1AGiwFZvTutseUlMM8vwQPXR2u6MfArmw3K1WJJs PE071YwEp6XeNjOoaTY8bFRSQ740DqkARXvu/b2L26gxwzK/xzZ1s6Ot6DIFT52/dIrd rE1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZKhHXVPz; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-193703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac06f51089si118023916d6.74.2024.05.29.01.20.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 01:20:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZKhHXVPz; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-193703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E01AD1C25812 for ; Wed, 29 May 2024 08:19:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CA6A1836EE; Wed, 29 May 2024 08:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZKhHXVPz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="p1hC7uKZ" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FD731836CE for ; Wed, 29 May 2024 08:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716970228; cv=none; b=mLGlmZBOmi9QPs7jgkdqbZzuLT79CaB/IpM5DqBNA97M16zdlQ9lx27gmG1xOHEdjODAITVHyMHlKoiFKYXHRnc/KMxFfIasiy9FmA2zBVM1QrOSz6nru6SoYJO4rh48CZ4tSxl0pj6Ygv7dpGX6etDBzkg/11Ynz6giIY/OiWA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716970228; c=relaxed/simple; bh=ORwKTPj0UPvqpGh8tbpEI6Lrq77JupDAdqOdWps9Ctc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=mQonhf11rsN1UxQTAPn271AyIhAU9FJmZPHtGXesxbJ3ALK67A68HoR4FKIE//fmEClzbPiL5RWpNGoOlwrPGWCLjhufVQINIpIqA49jTQbFxBAMdAa7bjz1HQwSpOg1cAMCNJR5VqXCElC/yf2Adyxv4sYS+aZhtddaVeI3UTY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZKhHXVPz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=p1hC7uKZ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1716970225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cdrjeB8beYO9Wxg/8OYQKTmAoUwzpnO3hiZ79lAM5DQ=; b=ZKhHXVPzZG+UUfR54X+wnYa/b1rs5IXquutJvjwduFQecP7NfexftkGtIEw4qInTnAXSuV Xq1EfWyLi1dUmLGWitjvb2sBDF56jH1dJkAhQmix2tPZ10Btd5++2uWN5BNanaOmW36BQZ +7nAvd4tBwaEbUP60DQGuR/5QThnZcmxwi8YR5LCTAwbmNjjYUCHkeu6Kb+n4phmvOo/m9 4ayaYI+yrsb/GGSIwAxbViO9hgu7Fwbje9KGTUXZirbz/RhD4o1uX8wLuidNUmpnzIitr5 eiAyqH18ZBEqUwgQCFb9DVLf3on3myEkKPlOIm0WbOKu/tHSj2S0vNjuRVrAfQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716970225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cdrjeB8beYO9Wxg/8OYQKTmAoUwzpnO3hiZ79lAM5DQ=; b=p1hC7uKZtz9ziXLmLwZU1uwgeqFCvGJJ68rVPy/htD7MQd5WP73/G0wY0O+1+qIf2VtD3b 8wL2rqD2SdtsZVBw== To: Jinjie Ruan , linux-kernel@vger.kernel.org Cc: ruanjinjie@huawei.com Subject: Re: [PATCH] genirq/debugfs: Print irqdomain flags as human-readable strings In-Reply-To: <20240528090917.3624463-1-ruanjinjie@huawei.com> References: <20240528090917.3624463-1-ruanjinjie@huawei.com> Date: Wed, 29 May 2024 10:10:25 +0200 Message-ID: <875xux9gy6.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, May 28 2024 at 09:09, Jinjie Ruan wrote: > This patch improves the readability of irqdomain debugging information in git grep 'This patch' Documentation/process/ > debugfs by printing the flags field of domain files as human-readable > strings instead of a raw bitmask, which aligned with the existing style > used for irqchip flags in the irq debug files. > > +struct irq_bit_descr { > + unsigned int mask; > + char *name; > +}; > + > +#define BIT_MASK_DESCR(m) { .mask = m, .name = #m } > + > +static inline void irq_debug_show_bits(struct seq_file *m, int ind, > + unsigned int state, > + const struct irq_bit_descr *sd, int size) > +{ > + int i; > + > + for (i = 0; i < size; i++, sd++) { > + if (state & sd->mask) > + seq_printf(m, "%*s%s\n", ind + 12, "", sd->name); > + } > +} There is no point to inline this. Just keep it in debugfs.c and remove the static. Thanks, tglx