Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3276472ybc; Mon, 18 Nov 2019 12:27:10 -0800 (PST) X-Google-Smtp-Source: APXvYqydOeWUk65V3DEgkiqVkqYluB/S7Fm/PSNPp2AwCv+O6ZJqwdRFRY7vp+QPIhbwpjTH/q3N X-Received: by 2002:a17:906:8697:: with SMTP id g23mr29689436ejx.177.1574108830314; Mon, 18 Nov 2019 12:27:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574108830; cv=none; d=google.com; s=arc-20160816; b=o60rVzt2NWOws5Bw/PiiBQaxvs5rGLWTNpCtunTrWR+pVJbje0ljES2pn+l6AUXNYR i7mUTcDr+TPimQAaAD1jL/Zyz3yZ6mUsB4ceCarZ8mpPviPnHFYmH01eSuzFXkVyofrB dF4O5goD64ytpzlBRJ8YP8YBIumHUUvE0WnlTOg2lsCcDoRGqUfw2p1PyrEGGQB3h7D0 nuOECtInLGa7mJfT8P1Cs9DLf9yu3BWvnwIlB55G7fOzhIvF1A4o99UEK1AsK31wR/wb wE33BH6y8wtxdYiHFdlVaTBDXMSQMh/08ectQY8DsTGvKJ6rntqfAw9Xn2CWgNiDtWO+ nHDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1TP0OA6qAUarvzHjPaXa1q3NuiVFGsPfLMvD1RhmmCY=; b=K6FwgwBd1p2q7adb+XHzqi/TmAtowFqpFvZv8bZjlDsMtLv2risP/lweTBdYm3ysfW Pwoll20K4a9mtOjb+ff6Wh5cZLJWRZVQ4fph7Qu2jO2prvHxt9MoQ7zNBPvs41G55bzS QrWR6O/kQnt7be63EYzFzMPTDr7MgfZdZQRex4sSXgYQQVXt3yUeK4wT2StwulbTNVoS qI3/HD1CdK6WoNTskzXc2FSkFvdcjpR7SKEfJ04vfAz6Pj8x2hJsvCF54wTmNhE1kUCL SWtfaqe5bJr7aNHt9v5+B/c88jY+ytsVmPomdXBdAnpOMBbJuzBFBnXVG6AJuYr9HuWb /gaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="AbkzR/Hk"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si12041348ejv.278.2019.11.18.12.26.46; Mon, 18 Nov 2019 12:27:10 -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=@gmail.com header.s=20161025 header.b="AbkzR/Hk"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727014AbfKRUY3 (ORCPT + 99 others); Mon, 18 Nov 2019 15:24:29 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37198 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726992AbfKRUY3 (ORCPT ); Mon, 18 Nov 2019 15:24:29 -0500 Received: by mail-wr1-f67.google.com with SMTP id t1so21092440wrv.4 for ; Mon, 18 Nov 2019 12:24:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1TP0OA6qAUarvzHjPaXa1q3NuiVFGsPfLMvD1RhmmCY=; b=AbkzR/HkTUrIdzHZR1Hn4Mw0IXd15Hbl8V3PLYisq2ODU1nwdZ9uSlzIdR1VbZ/LVG HgSmQcT3uDM15WcvVJ+/UPy8zZ8sqsKYQs1dPR8elnvEZ2/yawvQDqIplgLUwg5b+oGa H++5CFDB8Djm1Oc6rX/BFY8LBBI30stVNS2SlIqCR/i8IkVg/dVGsYkHSG0QLv0bapcx nTYMmGaRPh/IgaZV/xxDLCpY+UaOBCh+EXc3uH9vNLOIPhmREpWZ0SiXc7k5rZizpiqI nDekWyJeZWZzxhrZpPwBm7kCnvWIrZ+IZ3OX9xfuaAALOtAo7RwMA4Xam3lhhvu4AMrV TC9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1TP0OA6qAUarvzHjPaXa1q3NuiVFGsPfLMvD1RhmmCY=; b=iMG/D8R8axU29egG+0ToPAWzM5G9g10Dg00/Af8JIqgz5e2HLBeKXLLneVhelvSLCf nRbBaY4HJSxuxQdMewzFRUstRTg0IBdfI74MldDwiwx7QOoI23JmfSC58MbvHqyEvER3 dCnpNgL1AA1FBgExA6hZKJYuNM7f25MWuEdLNgHTVlXKAPVwAVl6OQXQ+Dr2wmqJmutD CyBVZpT1swKKzLsQ3d6qMm8GOQsx5JPdWVfKz3RT3fQ3K//T0/Zo0ldWu1N3uQ/qrzsS 0USUF6WsL5E7lWiPDlIJ8IO1LOonVpc0K5iqrgD5zamu3xmeO4m3kxSiXQ4VvLXTezV/ ywjA== X-Gm-Message-State: APjAAAXIfs8sqFDkP4mef37o8BSpar8913UKwDSXgThgMRPo/E1dUZe/ YQVbcTfwFgKAfjjcSsDnCI4rLeIHE4gVsPctY4g= X-Received: by 2002:adf:e444:: with SMTP id t4mr9612725wrm.50.1574108667374; Mon, 18 Nov 2019 12:24:27 -0800 (PST) MIME-Version: 1.0 References: <1573875799-83572-1-git-send-email-chenwandun@huawei.com> <1574064214-109525-1-git-send-email-chenwandun@huawei.com> In-Reply-To: From: Alex Deucher Date: Mon, 18 Nov 2019 15:24:13 -0500 Message-ID: Subject: Re: [PATCH v2] drm/amd/powerplay: return errno code to caller when error occur To: "Quan, Evan" Cc: Chen Wandun , "Deucher, Alexander" , "amd-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Mon, Nov 18, 2019 at 3:15 AM Quan, Evan wrote: > > 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 > > > > return errno code to caller when error occur, and meanwhile remove gcc '- > > Wunused-but-set-variable' warning. > > > > 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] > > > > Signed-off-by: Chen Wandun > > --- > > drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > 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 = phm_find_boot_level(&(data->dpm_table.sclk_table), > > data->vbios_boot_state.sclk_bootup_value, > > (uint32_t *)&(table->GraphicsBootLevel)); > > + if (result) > > + return result; > > > > result = phm_find_boot_level(&(data->dpm_table.mclk_table), > > data->vbios_boot_state.mclk_bootup_value, > > (uint32_t *)&(table->MemoryBootLevel)); > > > > + if (result) > > + return result; > > + > > table->BootVddc = data->vbios_boot_state.vddc_bootup_value * > > VOLTAGE_SCALE; > > table->BootVddci = data->vbios_boot_state.vddci_bootup_value * > > -- > > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx