From patchwork Fri Sep 13 03:02:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WangYuli X-Patchwork-Id: 13802951 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36EE6EEE27A for ; Fri, 13 Sep 2024 03:05:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=WNGy1wEPwhi+Ca+iINnI3FeppI75fLddQ0rCWbDjPJQ=; b=QaFPGwML2z1VbI 63UTPsfrnWOLZdOPFSefz2gKj9R0ERfwPC8fy8vXvaVgtqCV7sBRQshFFElGSLM4QQtG0kVrH81Q7 AFqbffITv1kZFAUGRvxxOoAGuG7k2/GXp2EBmG/W6g/f4q+vvEQ8bpqzgc0g/D+eXPMsKlvwgWG52 qPprPQ7bJymcSXCCimcSU333pyId/RSsZgf0XLfIxTx6s4L8iNdsSgIvnMnOKKy3aB4aES2tUr33f hSIt6mIPuEnHlE39c5Et8kboUgPufIQLyilwBwilF6BpfhO4cipzRqixZIaFTzLvlhelDYL2zOouz InqABoh4wUvxxPonMKKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sowc7-0000000En66-1Vf8; Fri, 13 Sep 2024 03:04:51 +0000 Received: from smtpbgbr2.qq.com ([54.207.22.56]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sowc2-0000000En3r-35N3 for linux-riscv@lists.infradead.org; Fri, 13 Sep 2024 03:04:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uniontech.com; s=onoh2408; t=1726196645; bh=SgCHUiz82lndKjTeNsmeInw+/PdasPiFZ+8EYbiHHVQ=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=bx1n1ZvMhvQcduy9VH9BkvyO8nzQqMO1Dk2ZKALbohCHHK5U2kSK/TF661HWUY3BD l36IkOiCV858nv1EZAF8QlDBOjXIFE34PKIAACtvnTyh3dmT27ifdRJrKPp9J+npyj CuPvxwrM5Kp1nn4JXFlm/bhBWfZU+tBjGBch/stc= X-QQ-mid: bizesmtp90t1726196628t7iilhir X-QQ-Originating-IP: GUdL1hsPtY1aBNPswyI4MhLRNR6/U4az5PKkdHFgePc= Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 13 Sep 2024 11:03:46 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 1 X-BIZMAIL-ID: 1739587823698748596 From: WangYuli To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, samuel.holland@sifive.com, conor.dooley@microchip.com, charlie@rivosinc.com, macro@orcam.me.uk Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, atish.patra@wdc.com, anup@brainfault.org, guanwentao@uniontech.com, zhanjun@uniontech.com, WangYuli Subject: [PATCH v2] riscv: Use '%u' to format the output of 'cpu' Date: Fri, 13 Sep 2024 11:02:52 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240912_200447_627448_686F6721 X-CRM114-Status: GOOD ( 10.17 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 'cpu' is an unsigned integer, so its conversion specifier should be %u, not %d. Suggested-by: Wentao Guan Suggested-by: Maciej W. Rozycki Link: https://lore.kernel.org/all/alpine.DEB.2.21.2409122309090.40372@angie.orcam.me.uk/ Signed-off-by: WangYuli Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins --- arch/riscv/kernel/cpu-hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/cpu-hotplug.c b/arch/riscv/kernel/cpu-hotplug.c index 28b58fc5ad19..a1e38ecfc8be 100644 --- a/arch/riscv/kernel/cpu-hotplug.c +++ b/arch/riscv/kernel/cpu-hotplug.c @@ -58,7 +58,7 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu) if (cpu_ops->cpu_is_stopped) ret = cpu_ops->cpu_is_stopped(cpu); if (ret) - pr_warn("CPU%d may not have stopped: %d\n", cpu, ret); + pr_warn("CPU%u may not have stopped: %d\n", cpu, ret); } /*