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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 3B3CFC433B4 for ; Fri, 14 May 2021 20:50:29 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB1A7611AD for ; Fri, 14 May 2021 20:50:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB1A7611AD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Fhgdv3DWsz3bsk for ; Sat, 15 May 2021 06:50:27 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=PHV33fSY; dkim=fail reason="signature verification failed" header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=QjyicU/H; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linutronix.de (client-ip=193.142.43.55; helo=galois.linutronix.de; envelope-from=tglx@linutronix.de; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=PHV33fSY; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=QjyicU/H; dkim-atps=neutral Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FhgdF4PQFz2ysr for ; Sat, 15 May 2021 06:49:53 +1000 (AEST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621025391; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0OfxbJpL6ySFoewyn+Wi0PjikcNe45umLr0dU+iYOMM=; b=PHV33fSYQtlLQ68BbtnBgsPZte4+sX0h8MOxzFqhvXLsSCDn9y58YilXkC8iJIKiukcTBk kQXxYfPT3yxxQS3162Pq8IbMFXkQ4cYhxo/I5x9WYeZCcrOFVkLWWnqnVOaR/xh7MeR0gO oisZwXaQq6Y0hzQGVISXFigLscEotGzC90K/mcoD+OSbzqeAuRq8EqMRWpVOwuQ0LD7z1p 5dSJeZfST0uPEGoArf10/e1yGJ+w6ff4CTmDik90UwPcCwFhOe0dr7O2/PASH5MrQVu6iS XsKQUWlv9HGfkbIAztuoKWVmlP8OZkcmb8tv5qxbumG7Su/SYqVwv7mz6v9v3w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621025391; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0OfxbJpL6ySFoewyn+Wi0PjikcNe45umLr0dU+iYOMM=; b=QjyicU/HMet9BxQuxfkSGWDYwCCnz48Zs/wCqGOfVzAaMskS/vww7DsKb8ykqCx1zf0XxA s5lTTx7HdoRJfJCw== To: =?utf-8?Q?C=C3=A9dric?= Le Goater , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 31/31] genirq: Improve "hwirq" output in /proc and /sys/ In-Reply-To: <20210430080407.4030767-32-clg@kaod.org> References: <20210430080407.4030767-1-clg@kaod.org> <20210430080407.4030767-32-clg@kaod.org> Date: Fri, 14 May 2021 22:49:50 +0200 Message-ID: <87mtsx2g7l.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?Q?C=C3=A9dric?= Le Goater Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Apr 30 2021 at 10:04, C=C3=A9dric Le Goater wrote: > The HW IRQ numbers generated by the PCI MSI layer can be quite large > on a pSeries machine when running under the IBM Hypervisor and they > appear as negative. Use '%u' to show them correctly. > > Cc: Thomas Gleixner > Signed-off-by: C=C3=A9dric Le Goater > --- > kernel/irq/irqdesc.c | 2 +- > kernel/irq/proc.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c > index cc1a09406c6e..85054eb2ae51 100644 > --- a/kernel/irq/irqdesc.c > +++ b/kernel/irq/irqdesc.c > @@ -188,7 +188,7 @@ static ssize_t hwirq_show(struct kobject *kobj, >=20=20 > raw_spin_lock_irq(&desc->lock); > if (desc->irq_data.domain) > - ret =3D sprintf(buf, "%d\n", (int)desc->irq_data.hwirq); > + ret =3D sprintf(buf, "%u\n", (int)desc->irq_data.hwirq); Which makes the (int) cast pointless, right? > raw_spin_unlock_irq(&desc->lock); >=20=20 > return ret; > diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c > index 98138788cb04..e2392f05da04 100644 > --- a/kernel/irq/proc.c > +++ b/kernel/irq/proc.c > @@ -513,7 +513,7 @@ int show_interrupts(struct seq_file *p, void *v) > seq_printf(p, " %8s", "None"); > } > if (desc->irq_data.domain) > - seq_printf(p, " %*d", prec, (int) desc->irq_data.hwirq); > + seq_printf(p, " %*u", prec, (int)desc->irq_data.hwirq); ditto. Thanks, tglx