Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1934183lqa; Tue, 30 Apr 2024 03:58:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVj12DyNUPlg85KJcjdiMmMjxdABVNL6MVGllJecdpmTOmBsZRnsWro1O/oJ/cjtxSMNTBg4+Ysv/m/YgJc2CWboIMU/HhilQgM4h1I2w== X-Google-Smtp-Source: AGHT+IFdzHM8Rt7iERR2aTCgMx9xoQz8PlG5NgPrjUjvIUK16/wMsqzQQ4VTxz+mp5xi8IkvsE1F X-Received: by 2002:a05:6a21:2d86:b0:1af:51d1:eab6 with SMTP id ty6-20020a056a212d8600b001af51d1eab6mr5063876pzb.45.1714474679864; Tue, 30 Apr 2024 03:57:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714474679; cv=pass; d=google.com; s=arc-20160816; b=WuPZ+Ho5Tl+6hjlAjMPoJofDpmQzAA0B46ii+UHfOQH8o9VXya2lidm53mEXa/JZKv FMgEZI03DCwmgQrN+B3yPHKQ7I3rKhMt4RqUTHgK3oVJimj59N8EyasLJGuBPL3XSEx1 WE3tdSmRH/iasSU3TsMq2c2shf2E54WothXYARoqAspWG9JQLzwRMGCq+ISFdnr1K2ia ANDftTbfDd5qQMzzgqBjR7rAydOoVN+8dP72LBnXxBm0TpNlNwaQm2Yj1T47AlwrpbDL PCZ3zWlUSFl4MfWou0jmnva4VqCZPHXxqMHPzwRysnpM9yb31QR29czhk2rknl5HEQk7 3CBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=2o973AHgEsdToak5Fw1GHJs5K9UTli6gW+7OwKV4imQ=; fh=Lup+h/mg/BFA3xj22NkM2s65rEQFzyWOtkZdpNMLbwc=; b=h1sYR1ElhC72iFps69QMDyAqeid8iHtyGNzNKANH5/Vs1cYBrR97sNOcKiSaA3gwcu csouVO7nc67ujMNxDyB0OgBnsyX35NkBBc9mOlPtrtbMI97o/Oef0uY2uF9Tc16gCSFP XDWVyVz9iXSmNRP11lcKjVClyzRSR5p9Y4ETrhsY0Wk6kBncpS97DHxa4IXPRSjeVSXe j9WpRbXT6iZ/FFLUS4Jws/fx5SY+hl0gop5ev2T+XHIpfXhOt5vGOgyWudja5IhTx4Pw QSyDycWbfunNBHzbIzdghtGwcF4jbJOIMgqlOYj4zp98ubaSSCeKDZLqE//r1yVrc6Pr RCWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V3ASAVSY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163810-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163810-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d11-20020a63f24b000000b0060f194b746fsi6866834pgk.338.2024.04.30.03.57.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 03:57:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163810-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V3ASAVSY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163810-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163810-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3ED5D2848FE for ; Tue, 30 Apr 2024 10:57:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78DFF12D1F1; Tue, 30 Apr 2024 10:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="V3ASAVSY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9E2DF12CD9C; Tue, 30 Apr 2024 10:56:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714474610; cv=none; b=nPIMSNDoRkSFnEMSWejIq5/RqEEVHkvZgkW3+O954x+QoO8E/9B35ey0g8uuOxi+lLINgB/JvyHUnTbcFtYOhkTThLb0I4u1pH0b+vEAL37z6khz35o2lGrsuEnJPx0mDsN+6GjcC/cYvEYOhMbS3NZbP2OLo5AC3xMj+PzyK20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714474610; c=relaxed/simple; bh=XAH33yItVNqMlyo9RZ7ksSTi00wu8F/Jv+D4lOiPKCk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=jVTEWcl8OA/RzQSzjOhtWgS85gSb/Q4SpyjvvOKaUds8ZotsaRLLI1jlsJDiAdxrafmCYZQrt0oc0Jnudt99tG4PBIUr3xuc2NfgHD/BWJR6MRCVBNsQ237hTRlTqgqrlxRqCX82NIYD3xRfdGF0iZCiolVinKBdmSMOQD2wRCo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V3ASAVSY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7320AC4AF19; Tue, 30 Apr 2024 10:56:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714474610; bh=XAH33yItVNqMlyo9RZ7ksSTi00wu8F/Jv+D4lOiPKCk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=V3ASAVSYicyK5nfyCymotydUKFKGVuUJjCwjICmIY+VpspXrUkr/5M4Nxn1lXT72D 8Hlr+DGUxnKNFyWHtEThB6tserhhMxpde0HWSFPr32Mhm9FML7wYlFct8spGHdZ5FH QSXEhvOCY/6Fo/3Y1C1RT66tUWoOWq82Wde/siwNEgc7+diB2inyg1uXnaP6z1lhdb 5irBkrAOE1QnPuB6SGB8F4QihsTnLCyqccQxrtLX1vLrgeF8+3tsMUIfX7kmzPXCNN ZEKHa5v4gUCI1Qm7eKObSoYd70IJc52W9Cqi3giC5fUSymb5W/GhGBgwJJF5YLsbuV z2gBSfzbht1ig== Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5afbeaa1ea5so70597eaf.1; Tue, 30 Apr 2024 03:56:50 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXd0lWWXcWXjFjO1qlAT4AlGu/9AnHsltZLvEA4zY2yNu/VrNsb+NVqj5KByiHzXkxSSCnu0FfRXiFUkINXC9OsMm8Yg1ZPP7GKBmEG X-Gm-Message-State: AOJu0YxlFICr9evt9bWvXRP5XbXyVKmYP9e9pphW7okbUStMInNPswA/ /YfQ4+ItemFtEI9M0DtZEKCel4xuaV63NbVv9paONrznHaAgaS6mDTIAqwjgZ2s397GqCEx2EbW oSOloJ4+XvJ/Ypzc8+TmtByHekx0= X-Received: by 2002:a4a:ba07:0:b0:5aa:14ff:4128 with SMTP id b7-20020a4aba07000000b005aa14ff4128mr13779046oop.1.1714474609646; Tue, 30 Apr 2024 03:56:49 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240425110017.75238-1-joshua.yeong@starfivetech.com> <20240429032146.2d3t7bai7k6cotqt@vireshk-i7> In-Reply-To: <20240429032146.2d3t7bai7k6cotqt@vireshk-i7> From: "Rafael J. Wysocki" Date: Tue, 30 Apr 2024 12:56:38 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: cpufreq: Fix printing large cpu and cpufreq number To: Viresh Kumar , Joshua Yeong Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 29, 2024 at 5:21=E2=80=AFAM Viresh Kumar wrote: > > On 25-04-24, 19:00, Joshua Yeong wrote: > > Fix printing negative number when CPU frequency > > with large number. > > > > Signed-off-by: Joshua Yeong > > --- > > drivers/cpufreq/freq_table.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.= c > > index c17dc51a5a02..9b9568023f3c 100644 > > --- a/drivers/cpufreq/freq_table.c > > +++ b/drivers/cpufreq/freq_table.c > > @@ -194,7 +194,7 @@ int cpufreq_table_index_unsorted(struct cpufreq_pol= icy *policy, > > } > > if (optimal.driver_data > i) { > > if (suboptimal.driver_data > i) { > > - WARN(1, "Invalid frequency table: %d\n", policy->= cpu); > > + WARN(1, "Invalid frequency table: %u\n", policy->= cpu); > > return 0; > > } > > > > @@ -254,7 +254,7 @@ static ssize_t show_available_freqs(struct cpufreq_= policy *policy, char *buf, > > if (show_boost ^ (pos->flags & CPUFREQ_BOOST_FREQ)) > > continue; > > > > - count +=3D sprintf(&buf[count], "%d ", pos->frequency); > > + count +=3D sprintf(&buf[count], "%u ", pos->frequency); > > } > > count +=3D sprintf(&buf[count], "\n"); > > Acked-by: Viresh Kumar > > -- Applied as 6.10 material with edited subject and changelog, thanks!