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 530E1C433B4 for ; Thu, 20 May 2021 12:57:42 +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 A360C61004 for ; Thu, 20 May 2021 12:57:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A360C61004 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 4Fm8sc30rrz3bt9 for ; Thu, 20 May 2021 22:57:40 +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=alir19LI; dkim=fail reason="signature verification failed" header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=DL1evq+j; 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=alir19LI; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=DL1evq+j; 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 4Fm8s74y64z2yjK for ; Thu, 20 May 2021 22:57:15 +1000 (AEST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621515430; 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=jUamPXx65pH1aIvGNwlHBxESop2vxwhREte/s9pPY68=; b=alir19LI/CdKq1z4lqWyLjPY6ziLkz4WCUgtwXLdy85WQEV/v87P2dq1F72FbncovUXhKy hGPGbeflZJ0TzKNNkKpI+zNBGU7UCdLR2yW3Fe6lnDx5zw5j53t9nUPsL0I6fHMOpKBULv uQZFl2ZDcZkEc++pAwKRQuFcliF5G+qOQXfxLY75wGKlysbgRJ935QGwLROv5i06bgQ3ty ZNzeuZ2DqpDgXBUKWhcwHHTTLPIviAozwKAOfEYzTixEX0ku8KwzSX3yBfdvaurty9Qgd4 699cq01D23sb2jP8ejWzxEw9otk1tNw5QdWCYdcnR2cSFg126VduL9XSBsY1dQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621515430; 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=jUamPXx65pH1aIvGNwlHBxESop2vxwhREte/s9pPY68=; b=DL1evq+jK12vEToQZ9SDQqrrOm3r6kpwJZjI8t4D47d0yAWp3EQps31avf1HZXvx0+ttmc S6Abu7NtSmu9liDg== 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: <14b71a4b-fac6-a1c0-1707-436c86b9b6ec@kaod.org> References: <20210430080407.4030767-1-clg@kaod.org> <20210430080407.4030767-32-clg@kaod.org> <87mtsx2g7l.ffs@nanos.tec.linutronix.de> <14b71a4b-fac6-a1c0-1707-436c86b9b6ec@kaod.org> Date: Thu, 20 May 2021 14:57:10 +0200 Message-ID: <87r1i1bm1l.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: , Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, May 20 2021 at 14:27, C=C3=A9dric Le Goater wrote: > On 5/14/21 10:49 PM, Thomas Gleixner wrote: >> 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); >>=20 >> Which makes the (int) cast pointless, right? > > Well, hwirq is a long. And that makes '%u' plus an int casted argument any more correct? Aside of that hwirq is an unsigned long type and not long. > Would you prefer a "%lu" for both ? That's the obvious right thing to do, isn't it? Thanks, tglx