Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp235177rwj; Fri, 23 Dec 2022 00:10:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXtsldygAZ5iFCW0u0OgvCAPR7HQGVxGbXOqMPDJQR1zdc8IP1nwstmW1mEs+dXDK3JWipF7 X-Received: by 2002:aa7:938d:0:b0:580:b57:f7a1 with SMTP id t13-20020aa7938d000000b005800b57f7a1mr10191176pfe.18.1671783014339; Fri, 23 Dec 2022 00:10:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1671783014; cv=pass; d=google.com; s=arc-20160816; b=Qx+qH+fgSvgw32+FCziPsiBmVR12+gdMwSrEgvaDR91fNuZBrVTuuvTtptiUEnhaVc QW1FURO1OyP78nvgISf+Xsi8Q/Bp/WqVAg4EVH0j5rpyTnTF2iwqfth7C40ixNqS3OzZ h0LIJbMQNH/UgNfnvOfjHqDsfNbX9kjuraYrtakVVz7aGcRIhfq+2bbCGFo08Dfmtn63 ePJBWTfWLxxhNywqDIcAGgZ1fGt6hfKTqr7onORBCzpm1Z5f27GXtwxHx0XmvfFJ+aPk hCSLfk+1EltH2Q94UgXnkBjD9fQLuNLAQXhcDa+u385Ow0Lt9O/mDIYPWUe1Y5UnxOOx gVnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Stm5rAG3zMGtzU8bMW7AJWf55Hek/7VWKjcT7I2sve0=; b=ukyoHsGPLdVUuFEeB8q23AQoqdO5qsAFitgzj7mC0zKOxxPw9v+EoElkTAzrbYs4Hr 9qaIeJyaK6PVSchCnn9WVnfq+2VsGNZFUHzxzYtMQy+hmf6aJ7/R6ZuFQqrE4pteiM4T mQgYLA71Aj3BEqcZf9XsZX3XDGbR9q4a8gkYN75DwvNZjHb0bxZd8Pp9u/I83Q45bCHf fMm45VGxEOi2R/hF922pDJxVcv3ub6cmFNEALSkYACTJHc52lWsIE/uLVhs0aNWNw1z2 gw3JhCI3BbmaNPBhIFtLd6gC0k7Li06Vb3/75Wo/mKtZ0A+ByCBofmPR8akgklYpskBu 5KRg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=KeUcA4Ii; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t15-20020a056a0021cf00b005634d0b379dsi3004464pfj.115.2022.12.23.00.10.05; Fri, 23 Dec 2022 00:10:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=KeUcA4Ii; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235633AbiLWHqS (ORCPT + 67 others); Fri, 23 Dec 2022 02:46:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbiLWHqQ (ORCPT ); Fri, 23 Dec 2022 02:46:16 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2063.outbound.protection.outlook.com [40.107.243.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A525B25EA8; Thu, 22 Dec 2022 23:46:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SISJ5hA/PrdCi6BoN0Zw1mAws66aOvCqYez2+GDsiZk+L8qtvNYeodcnYYMmXlyZxJA0emjZGygmrAKaYMNR6cNrMNSLThWoVOO9EXqvzwpiElFzTTQ4OXuts0opj8KJXgoWRX7+YngWO+Fh0Gwd1MpfEsOVji1UN8R5xgTFtue7QrQFt/muH5/iW+dm+/wocKLnSsD/1Vksx8j9U88Z3YGWXND3wjVOPCpUMin5oH0zJHHz1vpUt2YAXxiv0H1e2ShH5hgXpBEmTIzw6HJcoHs2r7SOd+dombQjYnL5EWss5oE0tSiUpphcW+TQn1k5uOs4LxVFOX8rwvbqDZXzOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Stm5rAG3zMGtzU8bMW7AJWf55Hek/7VWKjcT7I2sve0=; b=IHR9PO5Cjv+GljO6qEZc9dBNpVxIyEUuGsS4LIsL1/DJNhM8XikFr9kBFzNLyTsoBQybl2+JkKYb9m6b7sCxNWJahzqZaD55R7toq0b59nnI86+MYeY26FO+Ikr3Xgg8s1BZE4p92FYK24cI6wYVdI37Faad2Vx02jC4Rs+I0tCwUTB1b/U9i4qCD7YDtZhGG7f6stqBoTji9UOON2GQAjTuwgJTvuGV/lXWewrFPWOuFPhVz6CZzRHatXshnXGd9CIs7G+HIuN0xZbfe96ona65HGOylli3PrrXf+iTfXyRdPX/h/n7qm/AR5WAo44U75kAOzyqscEXUaRcbHchvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Stm5rAG3zMGtzU8bMW7AJWf55Hek/7VWKjcT7I2sve0=; b=KeUcA4IiyRcjglZxIwVU4gcZTq0u8CDzD39GLDX/Uz2/0u0ApZMarSORPRVq4EwlDdnZafZopUcMTnugzu+HfKrZfNCizeFyFma8rOnbJS4Vgz1rTrZPi1Q0Aj1CM/hkBfHqjpWeBinjfEryhY33DB0/F2tBoNC4l52RqeIFcWY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB2504.namprd12.prod.outlook.com (2603:10b6:4:b5::19) by BN9PR12MB5147.namprd12.prod.outlook.com (2603:10b6:408:118::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.13; Fri, 23 Dec 2022 07:46:12 +0000 Received: from DM5PR12MB2504.namprd12.prod.outlook.com ([fe80::2443:424:1c7c:17cc]) by DM5PR12MB2504.namprd12.prod.outlook.com ([fe80::2443:424:1c7c:17cc%6]) with mapi id 15.20.5857.023; Fri, 23 Dec 2022 07:46:12 +0000 Date: Fri, 23 Dec 2022 15:45:49 +0800 From: Huang Rui To: "Yuan, Perry" Cc: "rafael.j.wysocki@intel.com" , "Limonciello, Mario" , "viresh.kumar@linaro.org" , "Sharma, Deepak" , "Fontenot, Nathan" , "Deucher, Alexander" , "Huang, Shimmer" , "Du, Xiaojian" , "Meng, Li (Jassmine)" , "Karny, Wyes" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v8 12/13] cpufreq: amd-pstate: convert sprintf with sysfs_emit() Message-ID: References: <20221219064042.661122-1-perry.yuan@amd.com> <20221219064042.661122-13-perry.yuan@amd.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221219064042.661122-13-perry.yuan@amd.com> X-ClientProxiedBy: SGAP274CA0005.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::17) To DM5PR12MB2504.namprd12.prod.outlook.com (2603:10b6:4:b5::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR12MB2504:EE_|BN9PR12MB5147:EE_ X-MS-Office365-Filtering-Correlation-Id: 255b48ff-99ee-49c9-ff1e-08dae4b9c34d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vhYiat4/l0ea7uQsHAzp+950iECwbPx3Ui4dY9HXZPLD4yMU/nHc81xVAx8Vpoyk2mP5kKInt2942IjgXPC2yY7U+N/pEi3iu/zdGc5f5KgywRCZ/zSG2cUVSE+C7eQG2p9Tiq8vhPtzQUbDuKJedvDBxcIGZh+eUY6czF83vZxbRx33Z/zxGQVITXnuxiNKY8nacC754l6IARwiROnKG8c8pmTiIr+t/kHq1KyAkE9+PI+jO1ldAbEnJP1g2d313jHHO0AQasD676zmJXmTyzs86IF0ZgaHkZV6iRG2fO/CQ77ad0h8sgicW8J3twIK4XtCohffrGFxUd5NdDW0zLKRgH/Zu/0DG7YE5cKCjr87jL2OXytr5LnD8WM7+6dOAJrS5L/ShAT8s9ytiSLsBh7VW01mTR83794CW+O2JSMSxsL31Yj4VliS/6KTFuh2N8RZUVTYozBG2XzT9NkgR18nd2i0QK1Av7N2B7mhXUjUwwFuZQTQWrFInOE9/YrE2oFvdSPQtpxH0JqNRWSVBhgCvwUZuBjGEC8Yr9FQ5qvomDO2tyNFb6bzOCSHLDebnnzw7KdlD2zXJvF+GUr8Zv5p6DvE3QyR1U6efnVmXCHMotmbQ13Me+yBh3suv2x/B2peI+Dkedoeh/9HAlji/A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB2504.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(136003)(39860400002)(376002)(366004)(346002)(451199015)(38100700002)(8936002)(6862004)(66946007)(66476007)(66556008)(5660300002)(4326008)(8676002)(41300700001)(83380400001)(478600001)(6486002)(54906003)(36756003)(37006003)(6636002)(316002)(2906002)(186003)(6512007)(26005)(86362001)(6506007)(2616005)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hiPRUNfB/XA0bRA7MSj+lT57CRiWNP648wtUp5USdUuHQrBRMNc1XpRvAS5v?= =?us-ascii?Q?rD5z6fbDsI4sGvGsI+Klay9u6Z/VetdvPCMxC4DwqLkUphOrX1ehVtarCDVs?= =?us-ascii?Q?Jsv6HBTd5RBryVMmbZaI0NY8ksDUml0uc+yIUIPPJ9vTWEEPR6SmKM2twJbp?= =?us-ascii?Q?NJjDNd4szwckhbN85c5akm4byEec6l/vyaqBBBOjs+zQVx2bAglRLmVxZ7qL?= =?us-ascii?Q?9YFb2uH3yu6yUujtWXuLRMmLEqGyroKCDX0VmZuPH0mgTcNROdZRjeVDnOHz?= =?us-ascii?Q?iY5TOwE4mAO6Ln77rf4+NgYY3DwkI9UUUFbLa+xAgBSqCqxrcZnqHTvf8dBY?= =?us-ascii?Q?S1jsCVcD9eEdThrKxg4eOA19uO0TVONiZu1BHYG0oCUHN8pTrHuR/1zO60dz?= =?us-ascii?Q?VQ+SvEzHvaIPM8MxEY4Z0a0MIl3c9enFabr1bZmsL1eCKsGlepwnwQPdUI3h?= =?us-ascii?Q?Ykml3VKaBviEdchxtkU4pbR6cq50hvBLnc74JBx35tR7RJhJ6PdbrNv60o/w?= =?us-ascii?Q?0HWx/tF3Qsof7YRVpxArRA5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ascii?Q?OebByBCitzim7YPiwBi2TpwOXsOXW7VZG/vFu9XiqRdvzEYysGj1n2HZo+48?= =?us-ascii?Q?NB7RKQedfAL7iqaS5FldYQ6N0T/5KTR/o4edEzRT8Uj47rdzVGrx8L0BVY27?= =?us-ascii?Q?AhQlW2GbqC20QiS3dyLyxorptPW1i6GlX1qWVeZP?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 255b48ff-99ee-49c9-ff1e-08dae4b9c34d X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB2504.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2022 07:46:12.4504 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xA9F16A8NqOCX39nQrLqmG6jJFipUINhhmU0R4eRpDliti26YZ7o2vpZXbqMEI8USUMEQVgHFJwVW7BQymvAUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5147 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 19, 2022 at 02:40:41PM +0800, Yuan, Perry wrote: > replace the sprintf with a more generic sysfs_emit function > > No potential function impact > > Signed-off-by: Perry Yuan Acked-by: Huang Rui > --- > drivers/cpufreq/amd-pstate.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c > index e8996e937e63..d8b182614c18 100644 > --- a/drivers/cpufreq/amd-pstate.c > +++ b/drivers/cpufreq/amd-pstate.c > @@ -709,7 +709,7 @@ static ssize_t show_amd_pstate_max_freq(struct cpufreq_policy *policy, > if (max_freq < 0) > return max_freq; > > - return sprintf(&buf[0], "%u\n", max_freq); > + return sysfs_emit(buf, "%u\n", max_freq); > } > > static ssize_t show_amd_pstate_lowest_nonlinear_freq(struct cpufreq_policy *policy, > @@ -722,7 +722,7 @@ static ssize_t show_amd_pstate_lowest_nonlinear_freq(struct cpufreq_policy *poli > if (freq < 0) > return freq; > > - return sprintf(&buf[0], "%u\n", freq); > + return sysfs_emit(buf, "%u\n", freq); > } > > /* > @@ -737,7 +737,7 @@ static ssize_t show_amd_pstate_highest_perf(struct cpufreq_policy *policy, > > perf = READ_ONCE(cpudata->highest_perf); > > - return sprintf(&buf[0], "%u\n", perf); > + return sysfs_emit(buf, "%u\n", perf); > } > > static ssize_t show_energy_performance_available_preferences( > -- > 2.34.1 >