Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2417048rdb; Tue, 14 Nov 2023 23:11:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGS+zattEx4vKqPSDZa+xCggBoTvS65VCIhT/KcVl5qXWPIRHESraixXD4RAy77RJPpo2qu X-Received: by 2002:a17:903:2289:b0:1cc:345b:c7e1 with SMTP id b9-20020a170903228900b001cc345bc7e1mr5117615plh.60.1700032293745; Tue, 14 Nov 2023 23:11:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700032293; cv=none; d=google.com; s=arc-20160816; b=0WYMvZ8m+8OuZkY0le6ZzyqkCK8rdelBqcOiP2esODwL1hVAmdqKvbNdFjbUmHh/Hf A0YsMF7a05irBjElXM5Njk+lFByymoxPD5jCL60ZvyNiW4Bw27G3cGWkncTKaw7cLaU2 scHs9AbT5ztgBNOdQ11OOqAX5iOwGWuz1mxOwaeNkMMoc+YilsIZmMdkhTaHdS8kHTrY kSzr4invSfYFTgKfCm2JUY8hR7FdDwo9yyGR+XQoLT/IPU2++QJZBAlNnUHMoOkpP9Is mlgVlb47Zfnmg9TYbzsKP+OLr70QrNAyIriDzJYGj689mDkyvzX66Yg9y4AfSfKxRFmp yJbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=H575puEVsJYF4U1zOq6s9L6KKSaUh/UOp8aKOMOE58k=; fh=vxw9CaDc4BKHl4XGJrs3yykjcCOSSHZD+jvW2yU1X94=; b=D6lxXL+fjk1jAQAHg3H7XzsQF4ECuug6JQQQJOASrwlRlcC7FXCAsXQhHvJwt34H6Y utWENAcXjatbat/F3dv2GkXOgk89LReQVtkOVX7lI8pfPQAgnCt0LTbJFVYfzFZ2DQDF 3igL2BXR1oTzS4OJOE4m70K/AktODXxUUd5XnMNF+kaitm3ou+83S2pHHTM/jPV8Yj8g VfYks/08QcCT2ALPm7efn/X68fIUg2pAhM8BK6WzFDL7/4oT0H18cbhPNALy7bSEaOo4 DhnYSPyHRB5yy52G9BiOb8lxe4F810TUQnKbFyzsuqEOXG7BeEivtYFKi4tlv2CtIQxe VPRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p2-20020a1709026b8200b001ce08dcbb84si8910579plk.614.2023.11.14.23.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 23:11:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5616C80323E0; Tue, 14 Nov 2023 23:11:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234603AbjKOHLW (ORCPT + 99 others); Wed, 15 Nov 2023 02:11:22 -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 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 14 Nov 2023 23:11:30 -0800 (PST) When the argument type is 'int',printf '%d' in format string.Problem found during code reading. Signed-off-by: zhujun2 --- 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); } close(fd); -- 2.17.1