From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ACB31E7C2E; Tue, 29 Sep 2026 20:10:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.207 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790712634; cv=none; b=H52WeHBQC29XlzY5grMbWjgs+Djv4VXb5ZR7UMNremCR0/DzwyvACnmHT/lwrgR9vCqBFyluTMwCB7ldOzAXnO4Pl0wOUUeEFkWHR1BddsLkd4Dq69i87ry1ZNFIl5cKBtWDWO3YFLbFtupjgsJhAAZpTy3iRM89i/0WK2/do04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790712634; c=relaxed/simple; bh=Sicuho4icjfTu0+nBtNXBidKVp2riLNXWxAlEonvAQE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=g9uJBUKzhweCC02Uz4jkzbXtkGL0VrB6Ar8CNje6DzF6j+U8DFPkREJGPOk9cZHDtZeSluPGU8nS0biyD5f39jE+fy7/DfeK2puOtK8uqCmHwbZ6VbsZlXV0hZUEc1zNHCMzSbGggvlHEprWoXggoHQW0KgiTXhF19A/w2Tdjp4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=Zva8Ziu6; arc=none smtp.client-ip=192.19.144.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Zva8Ziu6" Received: from mail-lvn-it-01.broadcom.com (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 02BDEC0000FD; Tue, 29 Sep 2026 13:10:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 02BDEC0000FD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1790712632; bh=Sicuho4icjfTu0+nBtNXBidKVp2riLNXWxAlEonvAQE=; h=From:To:Cc:Subject:Date:From; b=Zva8Ziu6JL4RGS7O1srs3z/2+O5Y8aHnzVhrDqg6KGmM4Mo4pO8IJPAIguBovgz8/ smVDeg3hRReKKnxB6gaJdM8dkZkLRcmubuj5+Ducvz1zbc2SJDuD65L9GB1VmGGTuv g2Eta2DMTEwEZ41kUik0nUVFGHy6zeuF8qJL3Ets= Received: from stbirv-lnx-1.igp.broadcom.net (stbirv-lnx-1.igp.broadcom.net [10.67.48.32]) (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 mail-lvn-it-01.broadcom.com (Postfix) with ESMTPSA id A4548A83; Tue, 29 Sep 2026 13:10:31 -0700 (PDT) From: Florian Fainelli To: stable@vger.kernel.org Cc: Florian Eckert , Daniel Lezcano , Florian Fainelli , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH stable 5.15] tools/thermal/tmon: Fix compilation warning for wrong format Date: Tue, 29 Sep 2026 13:10:22 -0700 Message-Id: <20260929201024.319015-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Florian Eckert commit 9da39ef332c417ce52732564c1c682a6e1209302 upstream The following warnings are shown during compilation: tui.c: In function 'show_cooling_device': tui.c:216:40: warning: format '%d' expects argument of type 'int', but argument 7 has type 'long unsigned int' [-Wformat=] 216 | "%02d %12.12s%6d %6d", | ~~^ | | | int | %6ld ..... 219 | ptdata.cdi[j].cur_state, | ~~~~~~~~~~~~~~~~~~~~~~~ | | | long unsigned int tui.c:216:44: warning: format '%d' expects argument of type 'int', but argument 8 has type 'long unsigned int' [-Wformat=] 216 | "%02d %12.12s%6d %6d", | ~~^ | | | int | %6ld ..... 220 | ptdata.cdi[j].max_state); | ~~~~~~~~~~~~~~~~~~~~~~~ | | | long unsigned int To fix this, the correct string format must be used for printing. Signed-off-by: Florian Eckert Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231204141335.2798194-1-fe@dev.tdt.de Signed-off-by: Florian Fainelli --- tools/thermal/tmon/tui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/thermal/tmon/tui.c b/tools/thermal/tmon/tui.c index 031b258667d8..7f5dd2b87f15 100644 --- a/tools/thermal/tmon/tui.c +++ b/tools/thermal/tmon/tui.c @@ -213,7 +213,7 @@ void show_cooling_device(void) * cooling device instances. skip unused idr. */ mvwprintw(cooling_device_window, j + 2, 1, - "%02d %12.12s%6d %6d", + "%02d %12.12s%6lu %6lu", ptdata.cdi[j].instance, ptdata.cdi[j].type, ptdata.cdi[j].cur_state, -- 2.34.1