Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp265137pxb; Thu, 25 Feb 2021 01:44:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMr9nAIQ8xp+Ei9tnq0dyGSytXsApEuTRbSrS+NRp8dRRfUQJmNTBhayoUo3clenWMNaih X-Received: by 2002:a17:906:73c2:: with SMTP id n2mr1871678ejl.224.1614246246796; Thu, 25 Feb 2021 01:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614246246; cv=none; d=google.com; s=arc-20160816; b=QtlHbl2RaRNZ6jKsIJn3HnEVpSr7QQNbpbeQNV1xh/vGTVEL/4EIBc9qgvWOMQpWhy wDvH/8issWonWOBfUIqgEeeIgAuDEMq5NuXWYqb4P87sEkW6TlI71z0lLlm1yOVnHsbB agUKxKqrQdlgq+xIlMLyu00fOidNSMuYaVLdNxrzD/GuM6bEzQ/k1EGbZc5b+OlUTiga WvImyZNK7UKfEaAsH2feq2am80URg4fJIzNbU5JK62hr4rvXxFR5J0q58LgfNbC+jYLQ l3G41w435far0ASVvZ0i4IxW0zcKakp+yjzIceE31RQ1ekl0XMoevSWuhvKD+cC1/r/C l8Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=Dg+Xt7VcxKodip/fHmsFobstHgP91ZtRssjreJbiYY8=; b=CfTMEEJDd+WaZTE3PkGPuH2ORttgOuHFzTmsR5q+HOFKLXaYRluwms4O1o0l/icnip wdZZ7JXPw7LKOoq50YnkxVmgdd0VQYFWu5Gcy4EtOAD7M+ss8saupiT1L29ZIX5utcwQ ufypOmAf4eNM5MofARS+93gQDM0ghdyakP/Dyj8hbkOKFQzXlwdWHHM3jg/mUdltw+YP MGqb/8GokYZhORpVCEkSsDHm1z9iiSt+EDDdzlyc0j9t3aWJh7QzBxBaDjdvwlhnfw9h IpHP6FjoKCAkNVzZum9p9yefcVTndp94AbIoVi+kPPFXaesxdrkIRgz/P5l7CealEoTG vbMA== 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 n21si2951432ejb.90.2021.02.25.01.43.44; Thu, 25 Feb 2021 01:44:06 -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 S235174AbhBYHvq (ORCPT + 99 others); Thu, 25 Feb 2021 02:51:46 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:13001 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235048AbhBYHvo (ORCPT ); Thu, 25 Feb 2021 02:51:44 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DmQ0b2dqbzjSKx; Thu, 25 Feb 2021 15:49:19 +0800 (CST) Received: from huawei.com (10.69.192.56) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Thu, 25 Feb 2021 15:50:48 +0800 From: Luo Jiaxing To: , , CC: , , Subject: [PATCH v1] drm/nouveau/kms: delete an useless function call in nouveau_framebuffer_new() Date: Thu, 25 Feb 2021 15:51:42 +0800 Message-ID: <1614239502-47072-1-git-send-email-luojiaxing@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org nouveau_framebuffer_new() call drm_format_info_plane_width() to get a width of plane, but width is not used then, so it's a useless function call here. Signed-off-by: Luo Jiaxing --- 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 17831ee..7d3b1f8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -306,7 +306,7 @@ nouveau_framebuffer_new(struct drm_device *dev, 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 @@ nouveau_framebuffer_new(struct drm_device *dev, 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); -- 2.7.4