Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp321632pxb; Thu, 25 Feb 2021 03:34:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7eNBQzvFH/wg+Jwtn6CXaZIObZvCIq1caC86c5w86WeYSmzpfKKgzal/fabz5oKNurBZk X-Received: by 2002:a17:906:fa04:: with SMTP id lo4mr2264414ejb.44.1614252893075; Thu, 25 Feb 2021 03:34:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614252893; cv=none; d=google.com; s=arc-20160816; b=I3haoug2MQSVuc20SookVKPpW5qgWM31pjJ8SKjA15gesWaV8k1ZV8SFajD56GtcUu URmWpqf934qXU0dP1qQn+KEDkebik7yimTTwzMCxG102s8QmhD35Yde9RTKCPllY11au IsI/GQv91wy30vstJa0rDfgazUQFc+7qDeoXXDOPg49UUkXiCPu2f/a3pW7I77w/Kdzh EJ/Lycgm5mBefTtQ7hlk2mOkDD7Zth5iGCkH3Zl7plV1KMWDLF80upzGAaXziX9l9Fco wLviC/Um8FedTKWE8mUg9RSLIJTfzLDDKY4sDeD2fpirXy2ZDA+Al6Y4dWCUWVN9kl9U 88+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=xP7M9IxuMXd1AUoBS1GxKyETtP/FKJwECv8PZDtW6uU=; b=Htc/vMWl39VkY4fufnHOmENSwShXueQ7yUEYbKqaHTPU4uE8gWwUu/8euFaHUDA1jF 1zj4pyybCqgv1bv1nxOkRlR/lwlaQEvCLE/6bbswid2u3FDKziiFQJJdHAlC2yE6p6RO qbM0w8D4EIqoAXgyFZtXZIcJZsqAE4PrwVKq2jwgFRHeCAdG387vBP8VHRA34cLaW1YL Az4S2/Zyk0adPzZ1cL4qtxwGrF/FXxRNDLa2ll8ovBqgstBuOaVEjYtSotxNZxZv1loe h5HgJmI6zg3tm5wxf7sLOUPBa3sOmjZPFHtVtw/qkL6scWSxIbGEPkC1cVlyypTfLojc SyUw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si2865733edv.223.2021.02.25.03.34.29; Thu, 25 Feb 2021 03:34:53 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233556AbhBYH1Y (ORCPT + 99 others); Thu, 25 Feb 2021 02:27:24 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12206 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233498AbhBYH1S (ORCPT ); Thu, 25 Feb 2021 02:27:18 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DmPRl0XdtzlPlk; Thu, 25 Feb 2021 15:24:19 +0800 (CST) Received: from huawei.com (10.69.192.56) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Thu, 25 Feb 2021 15:26:12 +0800 From: Luo Jiaxing To: , , CC: , , Subject: [PATCH v1 1/2] drm/nouveau/kms/nv50-: Remove several set but not used variables "ret" in disp.c Date: Thu, 25 Feb 2021 15:27:06 +0800 Message-ID: <1614238026-43279-1-git-send-email-luojiaxing@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes the following warning when using W=1 to build kernel: drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_cleanup’: drivers/gpu/drm/nouveau/dispnv50/disp.c:1389:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 1389 | int ret; | ^~~ drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_prepare’: drivers/gpu/drm/nouveau/dispnv50/disp.c:1413:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 1413 | int ret; | ^~~ Signed-off-by: Luo Jiaxing --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index 196612a..828f48d 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -1386,12 +1386,11 @@ nv50_mstm_cleanup(struct nv50_mstm *mstm) { struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); struct drm_encoder *encoder; - int ret; NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); - ret = drm_dp_check_act_status(&mstm->mgr); + drm_dp_check_act_status(&mstm->mgr); - ret = drm_dp_update_payload_part2(&mstm->mgr); + drm_dp_update_payload_part2(&mstm->mgr); drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) { @@ -1410,10 +1409,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm) { struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); struct drm_encoder *encoder; - int ret; NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); - ret = drm_dp_update_payload_part1(&mstm->mgr); + drm_dp_update_payload_part1(&mstm->mgr); drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) { -- 2.7.4