Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2544140ybc; Mon, 18 Nov 2019 00:19:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyQQuLBa5WLerFyJoyiblCXCOqbbA1Tan1k5PpoJ7Y5CveZoiFjmXhdtFGsYwzIyYOPKQyn X-Received: by 2002:a17:906:2e5a:: with SMTP id r26mr25079547eji.283.1574065157754; Mon, 18 Nov 2019 00:19:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1574065157; cv=pass; d=google.com; s=arc-20160816; b=EdwWHGBBZSuKib6TMBPDvSsMtMKfz/3OGeBWQgP8923nIc2uZIAV7qAv4K6ONiixcJ nLqhh0GRLe7CeX5yE0A0A+hcEkHFQ81tE5xEg/PKI8eENqH8ZQ1s8BbFmkcBIzR95p1r poJSxuHjzxJStH7Xs/3S4lomV4qM9nnGPd8+zJhK7f/VrWi23gkfvKdx5/r52eaNJYs2 5pUY2o0Be6nxktAcYcWqeGQUOUF2voRJBsHqiWFF/kP0Btdz48cniNkuwOPmk3raIQxE ZTQuuF1Ntj8W0pRYvfLi3qSC+XipGIpyxl4/Wue970GeZhhUV/uvsBWfr3+yJwGV1st1 JiTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from:dkim-signature; bh=co0kwY1itMIE46cZm8A+BywABH6YDQFWwfxCH87UxaQ=; b=xvmH4HIAwLp2YJKJcXZl8O5zendTo3UCADK2XP25Z44MFFOdsCejrOQica6OVhhmZy xziBsR5Tt5xNlJg0dMbTOTITQMgjWW4s5BQ46kwOE0hzfs9iJs623JOCJLtE0A3A0woi 0zL4RodTUw4vgSKs0AyQ3p2Krv6JR2Vj59aNGmBwWG3aSFIojFCPk1jCfbTtVR8M7JyA uSMDFHliBCwbO76lrHEToJJq6cw3iB9WDExpDD6UPjG4ZfKLKPfs9ISmqEDrJyfxMvww YKBPvijn+No8C8amlbUXlSEgaWeULl+zS9J6Q+5AjpKjDYa1tef3/BNgkvesvAGi5TEV lJOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=jrCTvTe+; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si10969298eju.113.2019.11.18.00.18.53; Mon, 18 Nov 2019 00:19:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=jrCTvTe+; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726884AbfKRIPl (ORCPT + 99 others); Mon, 18 Nov 2019 03:15:41 -0500 Received: from mail-eopbgr720064.outbound.protection.outlook.com ([40.107.72.64]:19799 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726371AbfKRIPl (ORCPT ); Mon, 18 Nov 2019 03:15:41 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZVn4yVq76ggkGxp8M+twEsohTiQMWGZSJ8BoRAtN60CDFlE8/Ty+xyQm7lsIKprnVwtleXyNTGcapfb/rx9+ZkzzwMzn6//K0POPqhQ32jsOf4/jRg3PRLkWYUNNJxGWq+9LfrSJxf+JQpVHQoSKGYmToPs58H46lrNz5TR7RE0A4z6VSuXgbO2/WCqu80QTQFZquZ8tH10qz8hgBsK/px88v25RTNgmXFoKfPmIitlanja5jLb6PwQqADuYnPQMeJe/27At+V0BcWwkFvmkDXPltXCkE/0TaEOu5f/a7OkBXKb+4QJK3/XuyX1f33jBoZfakekrsN/UQ0irFCxFkg== 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-SenderADCheck; bh=co0kwY1itMIE46cZm8A+BywABH6YDQFWwfxCH87UxaQ=; b=L3bDAHbkhKlr8AC1LY9rVpS6pXNeVvCY7tGAtu3uy+zFM7soY/JxASXt8zbKsclY84q1xywqhsbgkJBu6JGe+/SqZnqGgxeZ6uIBjox22g+U1UahwkvHGwcTjhSCVNfJEjstr61ctaQwlSVyC7+118QM3exQ32pL4uHnrTt0J5jBk1Feoy5opjcCANkr8FUxuPjzzEUW2s2KqgRna+KhCOikFkgNSSum8ohX3ex5LcUhOnHVOdbuJVK0u5h1bkhD4n6qBHSXBCPqFtXQ+KI8J/v4uwYgWI82zjcR+L1kxZ3GWnCM9AnAUW4dKgfXgJaVnwB5eKiVjFE+qLHj0VL/oQ== 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=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=co0kwY1itMIE46cZm8A+BywABH6YDQFWwfxCH87UxaQ=; b=jrCTvTe+p0nVGNZg60KikmBHz3VuxQ4W6RpyUL1D97bHyr9TzaIjZWKaz/mfzKS9H30hE9esqLoZ8qGQv8QgrS/3Ikis8LywZGfECOoXdRrJjxUf603VatWcD3wYQbLgh7paa3TC0uRXSIX7oDerqxEDqD2HMiuU0fAYiwVLl+E= Received: from MN2PR12MB3344.namprd12.prod.outlook.com (20.178.241.74) by MN2PR12MB4206.namprd12.prod.outlook.com (52.135.49.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.28; Mon, 18 Nov 2019 08:15:38 +0000 Received: from MN2PR12MB3344.namprd12.prod.outlook.com ([fe80::5895:bbd8:c1d6:1587]) by MN2PR12MB3344.namprd12.prod.outlook.com ([fe80::5895:bbd8:c1d6:1587%7]) with mapi id 15.20.2451.029; Mon, 18 Nov 2019 08:15:38 +0000 From: "Quan, Evan" To: Chen Wandun , "Deucher, Alexander" , "amd-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" Subject: RE: [PATCH v2] drm/amd/powerplay: return errno code to caller when error occur Thread-Topic: [PATCH v2] drm/amd/powerplay: return errno code to caller when error occur Thread-Index: AQHVneW4BAJGGH03hUSa3MUMgxEJ0KeQlNEg Date: Mon, 18 Nov 2019 08:15:38 +0000 Message-ID: References: <1573875799-83572-1-git-send-email-chenwandun@huawei.com> <1574064214-109525-1-git-send-email-chenwandun@huawei.com> In-Reply-To: <1574064214-109525-1-git-send-email-chenwandun@huawei.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Evan.Quan@amd.com; x-originating-ip: [180.167.199.189] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: fc4c40a6-8c35-4659-930c-08d76bff7edf x-ms-traffictypediagnostic: MN2PR12MB4206:|MN2PR12MB4206: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2000; x-forefront-prvs: 0225B0D5BC x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(346002)(376002)(366004)(396003)(136003)(13464003)(199004)(189003)(6506007)(256004)(14444005)(478600001)(99286004)(7696005)(74316002)(9686003)(6246003)(53546011)(7736002)(26005)(305945005)(110136005)(2201001)(14454004)(76176011)(102836004)(66946007)(66446008)(64756008)(66556008)(66476007)(2501003)(8676002)(81166006)(446003)(66066001)(11346002)(86362001)(81156014)(33656002)(52536014)(6436002)(76116006)(229853002)(316002)(486006)(5660300002)(8936002)(186003)(71200400001)(6116002)(55016002)(3846002)(71190400001)(25786009)(2906002)(476003);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB4206;H:MN2PR12MB3344.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PvBNAerKPvADkz0jJsMfNla91bLyDhfJLRlh87bI12VkHK2EU9sSmlZmrlV2NYgIDnuwBrT7tGsz/1dhk+WdeTJzlCR+CQF4KyBp1KWhNlRvjVuMA/Xu5nTUy/ZpHwpW5A21fzL1A3VBsHQlvBYW5SVjdEJScubweRKbcxJSkc5UbKbp8oYAtSbzwssvl2D43nRRwPym69HmHqBc4KJ3qfEqZKEc9VKYD90G6wcods8FmarXc18P808X2dAiVR/JI5+5Yl++0nv9IEY/ca4HH5cjpVlCW35Y+RrNwfq+cRLltUlSm9D6nOlaorI28LsiyAhdGkclf0FCv6XXOLH+qipKa4wcFwZueOPR+sYANwmLBY7elUnBqjsNHKXyjomX/MAgsuC2rj+zbznGcao4xlFbOoS8dBNgocJe4S6iG+vjFvUMJUbdug+tOGsIpjHR Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc4c40a6-8c35-4659-930c-08d76bff7edf X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Nov 2019 08:15:38.4509 (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: 94lW14cC3njVn1NMFiQbxgHFYiSrx1UqowZa+VG9ON1+FOVpz5bMWNHBFJe8jTo2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4206 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Evan Quan > -----Original Message----- > From: Chen Wandun > Sent: Monday, November 18, 2019 4:04 PM > To: Quan, Evan ; Deucher, Alexander > ; amd-gfx@lists.freedesktop.org; linux- > kernel@vger.kernel.org; dri-devel@lists.freedesktop.org > Cc: chenwandun@huawei.com > Subject: [PATCH v2] drm/amd/powerplay: return errno code to caller when > error occur >=20 > return errno code to caller when error occur, and meanwhile remove gcc '- > Wunused-but-set-variable' warning. >=20 > drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c: In > function vegam_populate_smc_boot_level: > drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1364: > 6: warning: variable result set but not used [-Wunused-but-set-variable] >=20 > Signed-off-by: Chen Wandun > --- > drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c > b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c > index 2068eb0..50896e9 100644 > --- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c > +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c > @@ -1371,11 +1371,16 @@ static int vegam_populate_smc_boot_level(struct > pp_hwmgr *hwmgr, > result =3D phm_find_boot_level(&(data->dpm_table.sclk_table), > data->vbios_boot_state.sclk_bootup_value, > (uint32_t *)&(table->GraphicsBootLevel)); > + if (result) > + return result; >=20 > result =3D phm_find_boot_level(&(data->dpm_table.mclk_table), > data->vbios_boot_state.mclk_bootup_value, > (uint32_t *)&(table->MemoryBootLevel)); >=20 > + if (result) > + return result; > + > table->BootVddc =3D data->vbios_boot_state.vddc_bootup_value * > VOLTAGE_SCALE; > table->BootVddci =3D data->vbios_boot_state.vddci_bootup_value * > -- > 2.7.4