From nobody Tue Dec 30 13:27:37 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A6CCC07548 for ; Wed, 15 Nov 2023 07:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234615AbjKOHLX (ORCPT ); Wed, 15 Nov 2023 02:11:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbjKOHLV (ORCPT ); Wed, 15 Nov 2023 02:11:21 -0500 Received: from cmccmta1.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 22094F1 for ; Tue, 14 Nov 2023 23:11:15 -0800 (PST) X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app01-12001 (RichMail) with SMTP id 2ee165546f0ec33-d7501; Wed, 15 Nov 2023 15:11:12 +0800 (CST) X-RM-TRANSID: 2ee165546f0ec33-d7501 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from ubuntu.localdomain (unknown[10.54.5.255]) by rmsmtp-syy-appsvr07-12007 (RichMail) with SMTP id 2ee765546f0ee0b-6d655; Wed, 15 Nov 2023 15:11:11 +0800 (CST) X-RM-TRANSID: 2ee765546f0ee0b-6d655 From: zhujun2 To: acme@kernel.org Cc: irogers@google.com, ast@kernel.org, namhyung@kernel.org, kuba@kernel.org, linux-kernel@vger.kernel.org, zhujun2@cmss.chinamobile.com Subject: [PATCH] toos:leds: Fix printf format string in uledmon.c Date: Tue, 14 Nov 2023 23:11:09 -0800 Message-Id: <20231115071109.11511-1-zhujun2@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When the argument type is 'int',printf '%d' in format string.Problem found during code reading. Signed-off-by: zhujun2 Reviewed-by: Ian Rogers --- tools/leds/uledmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/leds/uledmon.c b/tools/leds/uledmon.c index c15a39c1f271..62befe06eab5 100644 --- a/tools/leds/uledmon.c +++ b/tools/leds/uledmon.c @@ -55,7 +55,7 @@ int main(int argc, char const *argv[]) return 1; } clock_gettime(CLOCK_MONOTONIC, &ts); - printf("[%ld.%09ld] %u\n", ts.tv_sec, ts.tv_nsec, brightness); + printf("[%ld.%09ld] %d\n", ts.tv_sec, ts.tv_nsec, brightness); } =20 close(fd); --=20 2.17.1