From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D4E9C433FE for ; Sat, 12 Dec 2020 13:08:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E28422D04 for ; Sat, 12 Dec 2020 13:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439058AbgLLNIP (ORCPT ); Sat, 12 Dec 2020 08:08:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438928AbgLLNAK (ORCPT ); Sat, 12 Dec 2020 08:00:10 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6169DC0617A6; Sat, 12 Dec 2020 04:58:43 -0800 (PST) Date: Sat, 12 Dec 2020 12:58:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607777918; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y5FJG/5PUN8sK5nmW11wfeTrSKuFRZczmKyjpyWOOJE=; b=fMgdIJOq2WmaWvLsFvrOiCnNtECvDIRCHN5dUyUWyLanp5pPMozkXaRZXL6EdR+7SYSnWy KTVkBdM7s05DZbwzIjzBo/4zxtvbr08orJVYwhWbPL52DS0YWaLoYzkuf0sOqMh4IbCgvX DoD/uwNJSMy7p04h6OPrsWLv3/8x1rCzoWdK+l7gvYRYRIHPewnRzL8x8u/ojM0n6neDO/ n4EVWqsVzmCOiN3wCTnRk3dMsFvWMePSrnfQVTbD7NQ536gP6bLx4ImMOKSZVmbF7D53d1 gLnhGqSVicekL2ssZchh9x7h03+oddrD1JAzOATeq2jNc5XXPl57xaPNafbQSQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607777918; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y5FJG/5PUN8sK5nmW11wfeTrSKuFRZczmKyjpyWOOJE=; b=gwxYIiuXYP0hczZb7/Q2y0vTJvP2u/YBBOPNLcYRYijYvz5B3IQ1iGEsqXwt7v/b55uG+a Th9y7eitPv+oG7Aw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc Cc: Thomas Gleixner , Linus Walleij , Lee Jones , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20201210194044.157283633@linutronix.de> References: <20201210194044.157283633@linutronix.de> MIME-Version: 1.0 Message-ID: <160777791799.3364.16109636784825298493.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 4fa1cf7cde28ad4d7e4388cccfe682dded6a7aca Gitweb: https://git.kernel.org/tip/4fa1cf7cde28ad4d7e4388cccfe682dded6a7aca Author: Thomas Gleixner AuthorDate: Thu, 10 Dec 2020 20:25:52 +01:00 Committer: Thomas Gleixner CommitterDate: Sat, 12 Dec 2020 12:59:05 +01:00 mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc First of all drivers have absolutely no business to dig into the internals of an irq descriptor. That's core code and subject to change. All of this information is readily available to /proc/interrupts in a safe and race free way. Remove the inspection code which is a blatant violation of subsystem boundaries and racy against concurrent modifications of the interrupt descriptor. Print the irq line instead so the information can be looked up in a sane way in /proc/interrupts. Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Acked-by: Lee Jones Link: https://lore.kernel.org/r/20201210194044.157283633@linutronix.de --- drivers/mfd/ab8500-debugfs.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c index 6d1bf7c..a320393 100644 --- a/drivers/mfd/ab8500-debugfs.c +++ b/drivers/mfd/ab8500-debugfs.c @@ -1513,24 +1513,14 @@ static int ab8500_interrupts_show(struct seq_file *s, void *p) { int line; - seq_puts(s, "name: number: number of: wake:\n"); + seq_puts(s, "name: number: irq: number of: wake:\n"); for (line = 0; line < num_interrupt_lines; line++) { - struct irq_desc *desc = irq_to_desc(line + irq_first); - - seq_printf(s, "%3i: %6i %4i", + seq_printf(s, "%3i: %4i %6i %4i\n", line, + line + irq_first, num_interrupts[line], num_wake_interrupts[line]); - - if (desc && desc->name) - seq_printf(s, "-%-8s", desc->name); - if (desc && desc->action) { - struct irqaction *action = desc->action; - - seq_printf(s, " %s", action->name); - while ((action = action->next) != NULL) - seq_printf(s, ", %s", action->name); } seq_putc(s, '\n'); }