Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1066246rwl; Thu, 5 Jan 2023 08:14:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXsjmVUtoWmD7yIO2iI6Xa3tgClUMk2DPMuEnSIdeOYIqK4eSGQ9QyOm7BWiUjiBV4gjrLhV X-Received: by 2002:a05:6402:d5c:b0:46b:444b:ec40 with SMTP id ec28-20020a0564020d5c00b0046b444bec40mr42149895edb.15.1672935282127; Thu, 05 Jan 2023 08:14:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672935282; cv=pass; d=google.com; s=arc-20160816; b=UGluhWJP0aRkae5LYtLIIgfx/NU4H7rgA4XiPcawZEamvzfJf84R0ggcbiYCFuXrn5 27U3DkozhuG33PokfMK6ALzSYvS1Cb6ZYkLW3paPgxfAbhXtLvKGSQEvXWQ8RkM7WUMh JOmKaQJx65AeGVsFw4L11fA2p0gkR8lg9uRkdlGZQGunjjfuAWdamp5hXOJuUNUtlHXT sKcJwVdO6tQXqKP7UEP0Ag09GVoIZvPBV6CdWpNERBgm3r8y5vHKNCZBwW2EeDxmcVs3 XCI9OyY1wuuuPUs7BY17fN3ORpmEmRcZHIr8wfvqbLS2wDgKNrQ/fJTcyalWb0N2ag/+ UEcA== 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=/KrvlfgFRbiBZnZNVBR4TV983B7OdZZM7IQ+32PNCpA=; b=ZYNBODkCQl329Li0e7CKYUx3VY6Ecv04KDsWvgKcD3mSgouM74N+2hDbk3KTsX1LLB bseFT2dhXdQSRkdlMB4fPFTvfXRvI1VIGjWwUZx7l/JMop+wfoF5Qk4CrAHmrkrEhV7j iJZuPlqNImobFDOdaNUAgWhE58RO36W/mZdPyFbOtSn1iq5yiYjkYeADOUTCjrsA6aeN 35QXtT04T0vThGq7zvDO15f6C1y82C6NX+VB7eLjZwtf/Wd60RdEUG/75wqRjZsd3YJq yDY9PsQEce/J+b0qfZLLGFFbYus3LXgY10B/kYm4c71dLHxtTu4R7evH+txmWH//3TJ/ h41A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gHecbSP9; 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 g13-20020a056402090d00b0046dbdeddd3asi35836642edz.507.2023.01.05.08.14.29; Thu, 05 Jan 2023 08:14:42 -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=gHecbSP9; 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 S234230AbjAEQDu (ORCPT + 55 others); Thu, 5 Jan 2023 11:03:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbjAEQDs (ORCPT ); Thu, 5 Jan 2023 11:03:48 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2067.outbound.protection.outlook.com [40.107.94.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A6CB1AA15; Thu, 5 Jan 2023 08:03:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ROAseuMe4YCoWbPIDpX8sP45nvgYXNttKf9AC4Jn9dfaWvEjSLN0Pj1H0360CWkMRXFcCIHhbwtGcL/xWi+onBJaqyqWAt5cf7vqcjm4HOhboDzRUJnu3TVojB8ZLUk3lMjhekZqzNnuctF/MzAXclQ9aM+2WSfGA13EbvQCzmW2oH+kVTDYfioEdCPRS5964TjqySKpGJdZSMRI5qBM72Ie2k/21jOaCpwve/v27YZ8xhVpawqNb5FhscuPNaEELCJtmyaS9pUf/jmph6dGjPMmAiD9mXuy6dl4h79Vmwagin8m4hO5CR4k9rgnEgpUfmA/XC468QUrXEgTvJqozg== 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=/KrvlfgFRbiBZnZNVBR4TV983B7OdZZM7IQ+32PNCpA=; b=LJaWQIUh5oCxa5r/BX1SwR9S4wwAgMf6v6Tpa9qWhBCVGGqAB5OqzYdANvgPJc3dLmYifHMvIs2zCKGqty7SKEBV0a/XssNOTJhheLQF9gjyybm1U4kp6ZTom015930qv0A/lIriVJA32Zwb/ZImSRwdWIgBcUY7xz6vvm6qMTsbDmeZfdVO+smmFNx5vn8Zvdw9qKNH8RZExgT15KIybZqgyy5mf4PkErenMD0Q9BJQIhG56gp+TvI72QxkSmXERHOMis02EzeIYxhahYFrkJd/6dQPkpsvuE2WYv6ku0+9W605NkXzIR4645exdMVDDW2qnEjJeajmQAeWHhsmsQ== 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=/KrvlfgFRbiBZnZNVBR4TV983B7OdZZM7IQ+32PNCpA=; b=gHecbSP9PllK2i3JTFqSpDeZj/R9walMO+jkzmTujjdZWG3jaxvsvAd2iza/+c7lp4ragXs1Tf8vgpfYXPtAA6XYx37FHMBHu5w1adsIpkLcUwQR5boevUg1fPxNoHes3LOURqbCIDWDNvaB9r1mdSJ0jKVL6trOyB5SBkqzkJc= 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 DM4PR12MB7549.namprd12.prod.outlook.com (2603:10b6:8:10f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Thu, 5 Jan 2023 16:03:45 +0000 Received: from BY5PR12MB3876.namprd12.prod.outlook.com ([fe80::45ef:724b:4b64:b98]) by BY5PR12MB3876.namprd12.prod.outlook.com ([fe80::45ef:724b:4b64:b98%3]) with mapi id 15.20.5944.019; Thu, 5 Jan 2023 16:03:45 +0000 Message-ID: <9afd6384-fb1a-933f-7873-eaeec38cc65c@amd.com> Date: Thu, 5 Jan 2023 21:33:30 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v9 09/13] cpufreq: amd-pstate: add driver working mode switch support Content-Language: en-US To: Perry Yuan , rafael.j.wysocki@intel.com, Mario.Limonciello@amd.com, ray.huang@amd.com, viresh.kumar@linaro.org 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 References: <20221225163442.2205660-1-perry.yuan@amd.com> <20221225163442.2205660-10-perry.yuan@amd.com> From: Wyes Karny In-Reply-To: <20221225163442.2205660-10-perry.yuan@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN2PR01CA0229.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:eb::11) To BY5PR12MB3876.namprd12.prod.outlook.com (2603:10b6:a03:1a7::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB3876:EE_|DM4PR12MB7549:EE_ X-MS-Office365-Filtering-Correlation-Id: a39a8a03-e118-4f9e-00b4-08daef366bed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tQElmYx4FsZC4d+gfNtdudf9LRNLNZ5SHbkD7R77lp6+36pRubAA/W3R67grDCdpiCRyB7vwpbIgqFg/yyce9EQP4l27PjV7VULnlM5GdD7DCKSwfSByRAUcEVSU9xMy2WYQs6N83mWW9b5RK50TA/nMoWWjFxB0fKQhkIucJdsJvNCurQmP0ozlQfsr53aYE9D/KgmrthFM4iosE0bmnvgrVf1Y9N17ObwfYFtjc0C1jn2Pb+85vV3R3JjWWRuaDUPkTQrDthqyP/5sr70n1xvU5XcMslfXyilet0Dm+EZgO3APD9jL64zIlLU5Iz44n77LePBNHbr6zZvx9TuW5stGROMQYFo//AsXAWPj79RQYZfNmdiUTu4j35FQHCLGlzwgUxWwCYw/7KU7VqjqqZ2RRxzzTLKGskAjDu1OCs30ZYZVjL9jJfgpJwX+GrzyT8Ha1SOXnpk8euo3lkhAJU1TmSLiv31DfXgslwgVK8LrQjsLeBnqsR2CLdZkd1d12ziEuxiDvSM4m92fCYWDBndXVAFbNELuJBsFDzhD0dz7ugbBqJHCkU2AImpxRK0sziReU3RZK1T/BrzpJBqtuyE6V0gtyvmf0W7HtIbv7Wi6r9jcWRByK55pn6HsV8gbyEFWoPmLuQzfbCTgs98KhGLk1Nsch2AnKU1kalAr15m+SvEEezA9/lbBoKmdW9ZvPAWZZlC18ChUhtSGvF8AWA== 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)(346002)(39860400002)(366004)(136003)(376002)(396003)(451199015)(2616005)(83380400001)(31696002)(86362001)(38100700002)(4744005)(36756003)(44832011)(2906002)(41300700001)(5660300002)(4326008)(66946007)(8676002)(66556008)(66476007)(8936002)(316002)(478600001)(26005)(53546011)(186003)(6486002)(6512007)(31686004)(6506007)(6666004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RW9FenJUcytkTWtNNTlkL0tRUnBvQzVMSVFyRW5WcS9pbjJ3T2tTN3lhQ0NR?= =?utf-8?B?b0g3aUl0U1o5ajhVcHgrNmdnQitwVUJiSW1EWWlqWHNxWGtUTkRmWmpTdHpZ?= =?utf-8?B?YTIxSkk0QlhwdERNc1ZPYzVnM2ErZXQyYWNaU3l3bmxiK2dZUFFTb1VLaVpa?= =?utf-8?B?MDlHTFRuUTR4aVBLdDVsQ3ZuZmJBbThoWTRFc2N6cFpkRkdKY2FDZTJQamVj?= =?utf-8?B?d3FZNFhKRzRzckF2SHFCemVDZzhqQ0RMM0FHN0N0OUthOFAzRkxNY3VEVjB5?= =?utf-8?B?YlFxUTZrcGh3NzVxeExhSzc0d3ltMXRXQzVTcEdCVm1XaE5hVlBiWFVYVG1U?= =?utf-8?B?MVAyUFpvalJJaU1Kc1BKL3A4L1l5V2p2bldTNk84UUJsd2p2amNXUH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a03-e118-4f9e-00b4-08daef366bed X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB3876.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2023 16:03:45.1187 (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: 2370xOi4IMtRMSa1fkeOzNgW1E0z3sEhbe6XRuPnBxEQXxexHA/Zol9pY02ITCfLDt3zNhaL1LS1arwWUOAw3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7549 X-Spam-Status: No, score=-5.0 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 Hi Perry, On 12/25/2022 10:04 PM, Perry Yuan wrote: -------------------------------->8-------------------------------- > + > +static int amd_pstate_update_status(const char *buf, size_t size) > +{ > + int ret; > + int mode_idx; > + > + if (size > 7 || size < 3) > + return -EINVAL; > + mode_idx = get_mode_idx_from_str(buf, size); if (size > 7 || size < 6) right? because possible strings are: "disable", "passive" and "active". -- Thanks & Regards, Wyes