From patchwork Wed Apr 7 09:43:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 416674 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp306590jai; Wed, 7 Apr 2021 02:44:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH5cwUz96NOeACyyq/Iomq+hmSuHiJ7Aqhvi6bqT70kfKtZusxGysPspstHmewBJMwhSI6 X-Received: by 2002:a17:90a:8815:: with SMTP id s21mr2417566pjn.200.1617788653381; Wed, 07 Apr 2021 02:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617788653; cv=none; d=google.com; s=arc-20160816; b=lw2IOFOEni6tR0L6eE7etgJiX1ySEClYTWFn32LfP+bj3WCUgSOORqMQT7sRuLAMNp txcL7pzKwSxylO1nFFzSbjCodq867KPcmin+vK19titaJKtObmMiEl+0Q7N447uy/qvf HLW/mJ84UFhIpt/UQdl3aybZloQjEHDvSom0KrbqpFZJ9xd4Ip/qSH4hoxJytueM/Aa3 iCRkELeEizBZ/F8GfqVe3NhQVXXgqk9OPOFrDPTPzzeQVTtDxi7j5q1edqoGFbCf+cIw /euWbTsC/poT0TTN9hrCdGS3F9uDEc7P+orFCIjnx+5Ofrcxbs2zDbEgPW8qJJHtHg7D p/xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=p7AwfW03DysExsREE5+ZzUpYKPBJdqNpWwzWd/Lhxbg=; b=MIomisnCMZhzDyQyabhhrQASwlx45YtENWCAfZzB77UjtIyVoyhW3qWX8QtBvlZF2z NJbBWm2f+RAEKBOVjbFuc8TJgz6LbOVxP3dQNgtH1tZ3eAD/XLljkNxC//Rsgh1btMa1 gp/7Z5nEjCJYm2O9LofITek3krFKFpCoWutz5FvMy/HL8MQre9lmsdcS2mExmE6Dwxkz GO+BO/uGQeEcpX5k7QrfY8ZESBHoiWdIkirEwQUVjGg/pAhSm+UlsMlcGhCT8kh6Ht68 /OT1PoSfhOgR+bkegdI8kR+fK13bn4cP6HxOoa9p00NP9+ZTkDVQwLedN2NIeZVf01dG 6/Cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id d2si14182273pll.397.2021.04.07.02.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 02:44:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1763B6E8EA; Wed, 7 Apr 2021 09:44:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by gabe.freedesktop.org (Postfix) with ESMTPS id 25B876E8EA; Wed, 7 Apr 2021 09:44:08 +0000 (UTC) Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FFfXw0Zz8zpVwS; Wed, 7 Apr 2021 17:41:20 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.179.202) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Wed, 7 Apr 2021 17:43:56 +0800 From: Zhen Lei To: Ben Skeggs , David Airlie , "Daniel Vetter" , dri-devel , nouveau , linux-kernel Subject: [PATCH 1/1] drm/nouveau/kms: remove unused local variable 'width' Date: Wed, 7 Apr 2021 17:43:44 +0800 Message-ID: <20210407094344.2924-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.179.202] X-CFilter-Loop: Reflected X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: James Jones , Zhen Lei Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning: drivers/gpu/drm/nouveau/nouveau_display.c: In function ‘nouveau_framebuffer_new’: drivers/gpu/drm/nouveau/nouveau_display.c:309:15: warning: variable ‘width’ set but not used [-Wunused-but-set-variable] Fixes: 4f5746c863db ("drm/nouveau/kms: Check framebuffer size against bo") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_display.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 17831ee897ea46d..7d3b1f8de300784 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -306,7 +306,7 @@ struct nouveau_bo *nvbo = nouveau_gem_object(gem); struct drm_framebuffer *fb; const struct drm_format_info *info; - unsigned int width, height, i; + unsigned int height, i; uint32_t tile_mode; uint8_t kind; int ret; @@ -346,9 +346,6 @@ info = drm_get_format_info(dev, mode_cmd); for (i = 0; i < info->num_planes; i++) { - width = drm_format_info_plane_width(info, - mode_cmd->width, - i); height = drm_format_info_plane_height(info, mode_cmd->height, i);