Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp506133rwb; Wed, 18 Jan 2023 21:53:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXsN/eKbZh7U9ARMWwwbJ9MCqW+RlSoUkzDbbK9x+cKTz/c6P9SdWljjWQ5GnEXoIv89vC0t X-Received: by 2002:a17:906:2e83:b0:7ad:bc7e:3ffd with SMTP id o3-20020a1709062e8300b007adbc7e3ffdmr9335946eji.42.1674107584056; Wed, 18 Jan 2023 21:53:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674107584; cv=pass; d=google.com; s=arc-20160816; b=hyRP4YdKZwWoaTCslLTD9PRvYApV0Jih3IHhRqAqWlTWdTi/ynLE9k2KF7HtNuEVCj AlxZVvZf14vbn11qSwVgy9A0ZYdpwHp4wN4anrtLBSg4c6OCOU6FgPgOCYTxODlImXmt DvywkTar4PjLWEXxk/ZnOQnLphrTovlrLOOykywgcQbyEaKFJ2We1iJ+xLz/llxJsKWW gAk3cirH4iYpHJ8AdCoaSw2PTRMULcxqnaXON7JBm6CXgPIM4cHuAoHb2cCXweOAzqLT 7VfJoWr48V6Ay5bix0VDv6VKo5MMzYZ/SplPZo2W1MO6UJBw1OEWdrDdR6v75XnPUo0b zc8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=Jd4gbcPSh6XwLjo7lR3up/+6dVBpy6hUMR96TXVknWY=; b=IIIZn8IuiHkW+s1PlciPalZ8IvAAtC7r6m3EFh4NYn5MjrEX14Tlai6lY4CSF6b41r 9IAmSDA4W/3Z8g9hUkisGo2iYA/I/fwPBhQXfoMrwUHUNslr2IA7AqmLUWW52lio5EY9 tsCLB+dIiOVfKQRCqs4+UGygCzCK+levlw0rrofY90JvKuAFaSI/h4Kh6z3tTvISsKb6 bHdLWLilCDXzQnY7Yoj1TM08sgR4ZVZC/cONLB5CFL8BrtUoAN4xFwExwUCeLr6xhxN9 NgOZic/HABGJjCJ+rty6rwBUQfxgX2SKA7e6a4oVaE/AQsTE/NFyKUcwipPandjpkKtf S6Mw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=S9hzaa8W; 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 js21-20020a17090797d500b008697a71e4e9si16294787ejc.941.2023.01.18.21.52.53; Wed, 18 Jan 2023 21:53:04 -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=S9hzaa8W; 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 S229948AbjASFeA (ORCPT + 44 others); Thu, 19 Jan 2023 00:34:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbjASFdt (ORCPT ); Thu, 19 Jan 2023 00:33:49 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF995BD; Wed, 18 Jan 2023 21:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ApyicA4BHiRWB2BPAWB1HMhxnWdT/lk6JQTb4mVdqDUM/0jfYyeYSUbKHu28dV8yFEIekzzSS5YRYNZzWPcI0YdP5jlvonxX/6jeaPQU6/314XCfGil1gB7A9BiUZY6F6mq3j5eR+mdndd7KDSbQC52peLl9IEJt9oQl5APtWj8wpX5HWwuznLUQQb18ydqRWJ6r6djQBJRMZiuMiuYCVu2W2mm0uLRuqDF65pS8mUypuCVOAa5TRXmRuY1EFQrKwDSJtXQs/BNFlTMd7pNlgLkonjzI/4c1m72sEhlwcJe7lWxUEzcltozHsTKrPsFK6gZNHos0TY9spHBIQUgnKA== 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=Jd4gbcPSh6XwLjo7lR3up/+6dVBpy6hUMR96TXVknWY=; b=lniv8uhxySyDqtUGMcPEQ9LmAqXH+9S99zq1deir2FPN0gdQDLIQzuw18FkM0NE7P67hyPcEKWFkV9NGSiMrlHsgTikZcULiaW86JA2lG6gcUbGoCuX+aJ6x6sejWPUqR2zOVJtThnHsTwmjEqlnPAkToepl3lR2773SVDgk+FVlSlK7m+I5PmfielN2vLFzI14X8j4rdv7coAqfMhh1WUmI14cECArRczLKM7YvOyp0AwPJBRugAMCLblBagvKB8H7Gv2aw4OV00HX2eZhg1PzUTrsyAeg4LX7ikSRmMKsbAn1k1jQVcs+xVLYqYYcGppwV2LmSzg44BbmuDMerAg== 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=Jd4gbcPSh6XwLjo7lR3up/+6dVBpy6hUMR96TXVknWY=; b=S9hzaa8WYiUzywvKCl6haRuA7zQ57qGdHNIohbfxE4jWRcsb8m34OFnnjGMl5lya6TmIVShToqQQ4eSH1HhFzUJQt4oJZkHxG3x6JAuUQMkhCJwDBHqYyJvEylN+t7uHwA6JLbsxGl8CeBZR0HaN2kOjZO8nTYwpI8CrPr8/UT8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BY5PR12MB3876.namprd12.prod.outlook.com (2603:10b6:a03:1a7::26) by PH7PR12MB5758.namprd12.prod.outlook.com (2603:10b6:510:1d1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Thu, 19 Jan 2023 05:33:33 +0000 Received: from BY5PR12MB3876.namprd12.prod.outlook.com ([fe80::4ac9:c4f8:b0f:a863]) by BY5PR12MB3876.namprd12.prod.outlook.com ([fe80::4ac9:c4f8:b0f:a863%7]) with mapi id 15.20.5986.018; Thu, 19 Jan 2023 05:33:33 +0000 Message-ID: <4e2675b7-6d6f-7d24-1b78-400431723ecc@amd.com> Date: Thu, 19 Jan 2023 11:03:20 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v11 10/11] cpufreq: amd-pstate: convert sprintf with sysfs_emit() Content-Language: en-US To: Perry Yuan Cc: Deepak.Sharma@amd.com, Nathan.Fontenot@amd.com, Alexander.Deucher@amd.com, Shimmer.Huang@amd.com, Xiaojian.Du@amd.com, Li.Meng@amd.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael.j.wysocki@intel.com, Mario.Limonciello@amd.com, viresh.kumar@linaro.org, ray.huang@amd.com References: <20230118075210.447418-1-perry.yuan@amd.com> <20230118075210.447418-11-perry.yuan@amd.com> From: Wyes Karny In-Reply-To: <20230118075210.447418-11-perry.yuan@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN2PR01CA0101.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:27::16) To BY5PR12MB3876.namprd12.prod.outlook.com (2603:10b6:a03:1a7::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB3876:EE_|PH7PR12MB5758:EE_ X-MS-Office365-Filtering-Correlation-Id: 872dbe6d-1edb-4c0a-0aa5-08daf9deb45f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1Nk9YG8Rj1EieXQEv83nlqRQZT5nnCla5/RSzEYOdC0Et7FeGDoE1PD1zBpQ+oGD/lm7pAM4Gl/3pd6hE6zpO0OdxusRbKz11qhdrLvYCvcdmgNk6Bv0fXJqdFg2RDosnU3NF3AS4bUHidtNRV5ELtQWVrx90oq7lUwnpvQc/1qtwCC29QQaiaBDT4jXVienJfAdsi2fph6IoPreFgS51cT2JY5+fTcTyoL4w21IMroL5hsqf1ld9WPv0mZG30DqAIgNbpdJrwvotPNmSKAmsRxeWPCAIcZ65ydu9SkoYUlt74febCzvcvmaZGwmzgk4ZBQ5CwbWPgbH444z7s+aXRs0bbLbH3dXFg/7lg/6K5695bJBzhu+xs46MLJnA/1u1dm31qwp3o5bzDMKOaokhaDNGyitIaf26Hwb57Vcunk4V1wvuRNyY4DNqlw8IBNvbL7wM83MRT9OyVWa8UBXtCxCEIFpZDgW0SXcCsoqWtSyeeVUjGZNmW7820xSVLjKXECzhImTE9f/D/kXCcsNDizuVjezR/hWY6t3a8pNAX82YfKOIbfPAi+dyFs4kvBtohZ+ci90Qk6D55naQnCEFqfvUqIUlUyz8OXma7EJW0wyFo2hE9fPiUFaeQuYsL8QuimSvpAMpcQTzD8e8dN5BPhpu6vXnY3NzBPD5Bxb2KGu8aaVZ5oV004OEAwPO9B0+Rw/iEIC0j5qg/8iWd5Zv/oWdb2BVG8ler59m586BsM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB3876.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(39860400002)(346002)(376002)(136003)(396003)(451199015)(31686004)(36756003)(86362001)(44832011)(66476007)(2906002)(66946007)(66556008)(8936002)(5660300002)(6862004)(31696002)(38100700002)(316002)(6666004)(37006003)(6636002)(53546011)(6486002)(6506007)(478600001)(8676002)(4326008)(41300700001)(186003)(83380400001)(26005)(6512007)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UDRuVkZTenZxcmFVYTYwRlU2Q3dkUDZ1K2RmaFUydzFnSmozSHdHbnRRdU1Y?= =?utf-8?B?R2krQ1hLSmEvRzRjdFFrSk1qREN3SUdISGxlNFVsTnhBdlpzd0c0RFB5dHI4?= =?utf-8?B?RkpzU0wzSXRnWXdGS3lZUnVqSXZibmZhV2lSUlBhbUhqUzR0RTNRTS9iOWpE?= =?utf-8?B?L2VOc3o1MjhJanIzTWxKL0t1cnU1VUtIckV6VC9ycHQ1a3NmOFNiaW5HNmd4?= =?utf-8?B?dW5PMkQ4RGZxQkxUdnRnYkVwQW1YdW53K3hSMlF1eGZnaEZTaEE1aEVCWXlo?= =?utf-8?B?RE5ma3dQdFBNUHFueHExV2wycW1tYkRTQ1JLWWpXT2JZVUlDMitCbWZwa1VG?= =?utf-8?B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com X-MS-Exchange-CrossTenant-Network-Message-Id: 872dbe6d-1edb-4c0a-0aa5-08daf9deb45f X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB3876.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 05:33:33.4279 (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: O7164yYqXg7QvAY9JmAoklS/5yV8LAiOpr7Ti7rt8Wx7bhj4vlbhe10rbbLmr7hiska5uErBI5TPcV4VaDWamw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5758 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 1/18/2023 1:22 PM, Perry Yuan wrote: > replace the sprintf with a more generic sysfs_emit function > > No intended potential function impact > > Acked-by: Huang Rui > Tested-by: Wyes Karny > Reviewed-by: Mario Limonciello > Signed-off-by: Perry Yuan Reviewed-by: Wyes Karny > --- > 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 2e5e594dc41e..c307d67a76ae 100644 > --- a/drivers/cpufreq/amd-pstate.c > +++ b/drivers/cpufreq/amd-pstate.c > @@ -694,7 +694,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, > @@ -707,7 +707,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); > } > > /* > @@ -722,7 +722,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( -- Thanks & Regards, Wyes