Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1114932lqa; Sun, 28 Apr 2024 20:22:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0QG8OmzYBLmDuhXWGGUuwKP2Q9Lkg+HzoLhvqL6UGD6t0IqCeUEMY2j60L6kyHwHMuSOKrkSgOP5O7Gg9ovEx4/J4g3nd0+hIcbxueg== X-Google-Smtp-Source: AGHT+IHYxsuLkSOcd30QrZfEHCqp7z0Lpm9yOsBiIcgGc0CQj9h1N/fRjt1+LG/VXMuWLVKOVHNL X-Received: by 2002:a50:cd0e:0:b0:570:5b71:4859 with SMTP id z14-20020a50cd0e000000b005705b714859mr5047173edi.41.1714360922648; Sun, 28 Apr 2024 20:22:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714360922; cv=pass; d=google.com; s=arc-20160816; b=OdHEYqVf+/Ti+hzDbJwxeSRzFsPKYS3LCAzRfDt5CFoQpZ+w7htvjxoE1uVlLaSmMm 3Uj2rSxm2zJSLG6VzF8bdT8SRfN4i0VbMK5UqrAZqD3JxemOaUJbOgOb6gN5ypz3d8e6 aeauCesfjoOKaaCsA7brmOad77Y4LPkp/Lgxl0Ke6p2j/uQ+KeJx0CMyeur8V9FmflZ7 zBS3e0RfEZxDfXNa+mqWjAJ3Ejldwo/UxFnGkr8nBhpbGcnULyNF4vE5X1NEHFIbjgBt K7jXPk+CIg+dOFkWNBnxdxAiOs2QJ9cq4/TYubqWt6jpKXyaz9Af3GViljutrShn6wZd TtbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VCot42VsvRRrZ8rZvywQc/mH+41vwIP+jklLONki5ME=; fh=AvCh0lVZSXNKKhOvKZtEXgw0sNqTy6IpuNOqerOoW3w=; b=Luh/DDPoyToHG9mfgpgIJZ1hla+Of+D0fCPSIDDaH4Im3OcTRi+o3+iv+OBOu/bE3W 7H3tuEWRat4CcE1SFBMOMq6oJfHzc/GCZKL8LCHnuJEfsA/0diPa9ZhCAW4N1mKpFQXw 20KwDWylrUk1tldLs3vDYWRKmucDysnRd8+t5EsuKAtedyPASIP0HbcOhi0iho+LRIhX U4dQohzCAJcVpPTVGcKKrpSXvzm6cOAanBFZqzCXJnRxAeORl/QgabC4MhrjuA1rNz2z BpbeGUVgLoZXQECs9xACr2nnFFFthpp8yqufey8raPQiSdnlrKDvChtIicRsBt4WYgrd xvJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IZGPlgXD; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-161697-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161697-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y23-20020a50e617000000b005726ea32a6esi2306592edm.79.2024.04.28.20.22.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 20:22:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161697-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IZGPlgXD; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-161697-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161697-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1D64E1F21BCA for ; Mon, 29 Apr 2024 03:22:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B98B18F6C; Mon, 29 Apr 2024 03:21:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IZGPlgXD" Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2B9E8479 for ; Mon, 29 Apr 2024 03:21:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714360912; cv=none; b=mhhXAesE+YdF8nrMH1vtj5KtEb9lYeN6EJ9cFnEycpP/iWezehZAJVMtMNGp00rrgmjJfwlWwUgX8SaFKlBkkrx7e596EkhNkCDqH6OC49FP+Rv8LNLhahq9al7wIdYt9UXqrbEPpVQ71WKiubcCNLSnaEItF02YrOivoFXKgjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714360912; c=relaxed/simple; bh=mzgFeMU8F+zgH9LxSpS30JFVQnrhwv+AnpzLTW+z/Hw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fxSMDT+syewCMgOr0Kpza9gvTWaLhXqG44HpV8/Bqjwt14qBxDeN5Ku9suExn7AwqsXXTGa/v/fPFnXcgtX55yfzbNpy45MDaS5JdiRU7vahELIU0tz6WwDnRSosZ0cAuWM9R73zX5lvbZ0D5iREPnpUud6VS16VMixwdULXvcg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=IZGPlgXD; arc=none smtp.client-ip=209.85.215.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-5f7a42bf0adso2728149a12.1 for ; Sun, 28 Apr 2024 20:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714360910; x=1714965710; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VCot42VsvRRrZ8rZvywQc/mH+41vwIP+jklLONki5ME=; b=IZGPlgXDZ7vHLiX5V+CUtNCEysf1xBoB42F9IZEvBGrigNQhD4VX9hTsDwWZxqPN5s Bmx9WGhohN1JLF9U4XQhHB+6l722JTRWUOR671PpndvCDc2dQvo2a7EPX/H2NItOzWvK rfbtVvfaY3UcnLwjgK6XDrUztulfNw3lJM/BHb6J+m2rzPnSsSmMdeMYzRP9fiM2RymZ cNbwlg+rrakJU1BL5DWAmig1TPTbMevX3cW3oY9poZG/mdNNneZWMGNt9YWH0n5Ku31C VPSRIALTkSpLpO86Mi96B9TffeheHj2QGs/oxhi1IyfOFx2O4wNJRzKNk7Iyi4pXUpg3 Pz4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714360910; x=1714965710; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VCot42VsvRRrZ8rZvywQc/mH+41vwIP+jklLONki5ME=; b=MwPubEd4LLdfrhyVt6NsE6kK25C1BX0ChzAKr5sD3NalP0lGHtQLrlFX/JlTvQcPqz wQRscc8ZYGD2L0DVvsrKhjoPvQC3CgZopzhn4fzgANbej6KCTFUw59mBnn9pMrRjKxlk wSRJib4vGFhoI9AmS0fmk+qYKLHo8VWpJr3eqUNGs3fWJDWZ/cMREqq3epUoJyEwx0Q8 PmZoEt1hieVRF4NOaKaV2eQRYdugTSnFEdek9jwIOLf4ts6WmUsqsU7xU5KGc2Xex/jR meru1L9e8RCPbGYXBr4QuVjQyq+4wWMJX/n3++FzJ11Ov89MxvDc3CMqhsJRBQq85fx6 4Ehw== X-Forwarded-Encrypted: i=1; AJvYcCVKD2yA7g5y+wGZJNFJXkDeqiitcKqm/bcmvbrzUcjZSMGLyhKVfjNPwnsS4GBI4On2QqRJ2OJPxDq+Y2Q5vaejcxBA0LdvBsuV4KjR X-Gm-Message-State: AOJu0YwN68dClHoFb7u8ZFs3N1HNRz1Y2ean+nk1ubUf3K3ejz1g/QOj yW7V6ikpYDbBsN/OC79j4q3uEwOvAuzyySirDnfpsn4TuthGX9ebUzxPDT4DTdg= X-Received: by 2002:a05:6a21:4995:b0:1a7:64dd:ebe8 with SMTP id ax21-20020a056a21499500b001a764ddebe8mr9462455pzc.49.1714360909789; Sun, 28 Apr 2024 20:21:49 -0700 (PDT) Received: from localhost ([122.172.87.52]) by smtp.gmail.com with ESMTPSA id kx17-20020a17090b229100b002b05e390c59sm4861563pjb.27.2024.04.28.20.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 20:21:48 -0700 (PDT) Date: Mon, 29 Apr 2024 08:51:46 +0530 From: Viresh Kumar To: Joshua Yeong Cc: rafael@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: cpufreq: Fix printing large cpu and cpufreq number Message-ID: <20240429032146.2d3t7bai7k6cotqt@vireshk-i7> References: <20240425110017.75238-1-joshua.yeong@starfivetech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240425110017.75238-1-joshua.yeong@starfivetech.com> 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_policy *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 += sprintf(&buf[count], "%d ", pos->frequency); > + count += sprintf(&buf[count], "%u ", pos->frequency); > } > count += sprintf(&buf[count], "\n"); Acked-by: Viresh Kumar -- viresh