Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp232415pxb; Fri, 15 Jan 2021 01:40:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBi/Y9vTEcU+UcCNiLofDgwnRSDPrxRDns47dwcXgrw9bGw2ACrLNd+n3WOpY/4NTx/r6D X-Received: by 2002:a05:6402:895:: with SMTP id e21mr8975184edy.284.1610703625024; Fri, 15 Jan 2021 01:40:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610703625; cv=none; d=google.com; s=arc-20160816; b=aDo/GHLOb8ERlq0htvwVyixP/9zgFMb/1ZA0v0615BFi6yJLlj5YxgEsqOMYEdmECi VR0g3olhO7+chq62GdZqoGzE3XlNeH/DW2cTSPyDRghn/VUEKEl7+ani5v0dWT24QaZd V2pIOiND3WKl6kU6GfO6YewGu8Z6iChed+m/GIh/ykuEYAqZ1eaHRXm0I4Wdjw97plf8 8zMwe0RuqZaRQ+hqnxkeXYlPzskMsSm+pUmohPDNkA+VEV4uVu49rZvhjz72J0KAKAfb UGvr1IXrghifxuEYE8evRNXxXAid2eUOKByVZx/bHVfGvmZAiyXHQgzJp2G3e7r0u8ys 1eIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=fccGezC4BPQlbqjl1wwdPwd/PjKKJ34h9ZHLY8IdPtg=; b=UsFdXA51x68Xn014lILFDMQW7dL4vhUT0sEDJPzDbg0CpGSEQ+i24Bh5vixVCTCRbi aU+pr8f7rcp+w4KFjLY73oAkbkXciVMKV/DZKRkACIL8/ec2tWw4Laz4QuuH2z597Xa9 Dh1ML61qQXbKgCDcEF7MNprVoFX3h1rndWuAnw9yH3kWs3Yvf/0CTR4xxquhoo+puunI Veu5lL9izoXDc1Od7DR9Hd49wNBA07slj9mKmJUKSO/yufocn6h7QDBpoe9xmX3HEPXM WdDbZ4101IOzW5rC5hHO7vvDhUyV+tlfgKU3l66rIKhWJxKDHkaxUKRfR663+/NYlWNr hx2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c23si3698842edv.521.2021.01.15.01.40.00; Fri, 15 Jan 2021 01:40:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbhAOJi2 (ORCPT + 99 others); Fri, 15 Jan 2021 04:38:28 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:35492 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725910AbhAOJi1 (ORCPT ); Fri, 15 Jan 2021 04:38:27 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212]) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l0LYH-0007Sv-Je; Fri, 15 Jan 2021 09:37:53 +0000 Subject: Re: [PATCH][next] drm/amdgpu: Add missing BOOTUP_DEFAULT to profile_name[] To: Dan Carpenter Cc: Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , David Airlie , Daniel Vetter , Xiaojian Du , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210111114638.16530-1-colin.king@canonical.com> <20210112100706.GF5083@kadam> From: Colin Ian King Message-ID: <51efd2a7-f2cf-dc28-4b86-5e89d13564ca@canonical.com> Date: Fri, 15 Jan 2021 09:37:53 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210112100706.GF5083@kadam> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/01/2021 10:07, Dan Carpenter wrote: > On Mon, Jan 11, 2021 at 11:46:38AM +0000, Colin King wrote: >> From: Colin Ian King >> >> A recent change added a new BOOTUP_DEFAULT power profile mode >> to the PP_SMC_POWER_PROFILE enum but omitted updating the >> corresponding profile_name array. Fix this by adding in the >> missing BOOTUP_DEFAULT to profile_name[]. >> > > Still not enough to prevent the array overflow. It needs POWERSAVE as > well. Thanks for checking, but there is a 1-to-1 relation ship now: enum PP_SMC_POWER_PROFILE { PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT = 0x0, PP_SMC_POWER_PROFILE_FULLSCREEN3D = 0x1, PP_SMC_POWER_PROFILE_POWERSAVING = 0x2, PP_SMC_POWER_PROFILE_VIDEO = 0x3, PP_SMC_POWER_PROFILE_VR = 0x4, PP_SMC_POWER_PROFILE_COMPUTE = 0x5, PP_SMC_POWER_PROFILE_CUSTOM = 0x6, PP_SMC_POWER_PROFILE_COUNT, }; vs static const char *profile_name[] = { "BOOTUP_DEFAULT", "3D_FULL_SCREEN", "POWER_SAVING", "VIDEO", "VR", "COMPUTE", "CUSTOM"}; unless I'm missing something because I've not had enough coffee. Colin > > regards, > dan carpenter >