From patchwork Thu Mar 30 08:49:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng <15330273260@189.cn> X-Patchwork-Id: 76967 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp975646vqo; Thu, 30 Mar 2023 01:51:16 -0700 (PDT) X-Google-Smtp-Source: AKy350b+siC2T6Sa1JjLpJQH2oznDo/a+r75Gjmj6yq0iVKJbydvmfYynm/WiNtLJGDqkXmrhGmY X-Received: by 2002:a17:906:ad86:b0:932:29a7:56ee with SMTP id la6-20020a170906ad8600b0093229a756eemr4784777ejb.12.1680166276218; Thu, 30 Mar 2023 01:51:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680166276; cv=none; d=google.com; s=arc-20160816; b=HE8dqMNPEFe5d90xr29KkX/qP2cLdL7bqMvmM5v3AT9gJYr9HxtECwYadeNwcLUUZO OL6LMj4ScBTclBZ0zuN3S61nfPNUxE4WGl8YRA+KMcwjBxJX8vAJS35eJdld0ZtZrWuj eP+/HO5ZMuhQ0qhnYB+Zi9U2CkDIIdxDrfbUidML2ExylXK2wpmX/sfcDFjnMb5tmu+m MIZJRg8j8s+Yqt6QdU5sYM8Iy1f5/rtpmvcDNAbf9LQO+HZl3LVEuC2LxUT9PSuvXCEl CaOzPQ8fquAq3Zp4trl7QUiGklabEYqyDPg0Ftxa7+jcEIEV32nF3GXBbO02dJdxWrQ8 olhw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from:sender :hmm_source_type:hmm_attache_num:hmm_source_ip; bh=1lkBKtNr07ZHzg3oNrpWLSfhaZ21qJxrXbxD7TY+2k4=; b=mK4lBEi5BuX0sb/R/feRzZv0MFJI+FoZSeEz8bPhBuMynCl8BlGOOokT1gMwd1edJT 2pNo7eiw/iSkpvjI04c6DNhDsKGiTbat0iZTKclvejCr0harV0EuLrAMhsq+4yvBUC0S IyKM2dGwCCLkAXzL9y9jT2BSrIeQtCyaQ23iDQ2zarwO0d512D5RnDMfuYxlEhcTamvE CUJhZmNTvsaJFuYX0mp4NVzpxnRK8aIesGpzT1ft3roOM6fYWY4lLChot5W27dp3sLAC LWYSZa0+F9xegYtqPtGT5/YuHH5pua8Dv8k31fbnD03c6devqGFumSRGh7wYg0I1xuVi M+TA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt38-20020a1709072da600b0093e842cedb4si17220128ejc.195.2023.03.30.01.50.52; Thu, 30 Mar 2023 01:51:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229852AbjC3Itb (ORCPT + 99 others); Thu, 30 Mar 2023 04:49:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjC3It1 (ORCPT ); Thu, 30 Mar 2023 04:49:27 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C5EE61A5; Thu, 30 Mar 2023 01:49:24 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.41:44746.1405145320 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-114.242.206.180 (unknown [10.64.8.41]) by 189.cn (HERMES) with SMTP id A48DB100207; Thu, 30 Mar 2023 16:49:22 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-7b48884fd-ljp89 with ESMTP id 2a8c5f62236a4e4db151dd2bf1489911 for maarten.lankhorst@linux.intel.com; Thu, 30 Mar 2023 16:49:23 CST X-Transaction-ID: 2a8c5f62236a4e4db151dd2bf1489911 X-Real-From: 15330273260@189.cn X-Receive-IP: 114.242.206.180 X-MEDUSA-Status: 0 Sender: 15330273260@189.cn From: Sui Jingfeng <15330273260@189.cn> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , suijingfeng , Sumit Semwal , Christian Koenig Cc: nathan@kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, loongson-kernel@lists.loongnix.cn Subject: [PATCH 3/3] drm/fbdev-generic: optimize out a redundant assignment clause Date: Thu, 30 Mar 2023 16:49:11 +0800 Message-Id: <20230330084911.1565071-3-15330273260@189.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230330084911.1565071-1-15330273260@189.cn> References: <20230330084911.1565071-1-15330273260@189.cn> MIME-Version: 1.0 X-Spam-Status: No, score=0.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,FROM_LOCAL_DIGITS,FROM_LOCAL_HEX,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761782033252955217?= X-GMAIL-MSGID: =?utf-8?q?1761782033252955217?= From: Sui Jingfeng The assignment already done in drm_client_buffer_vmap(), this patch save a copy. No functional change. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/drm_fbdev_generic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c index 8e5148bf40bb..be4522268927 100644 --- a/drivers/gpu/drm/drm_fbdev_generic.c +++ b/drivers/gpu/drm/drm_fbdev_generic.c @@ -183,7 +183,7 @@ static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper, struct drm_clip_rect *clip) { struct drm_client_buffer *buffer = fb_helper->buffer; - struct iosys_map map, dst; + struct iosys_map map; int ret; /* @@ -203,8 +203,7 @@ static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper, if (ret) goto out; - dst = map; - drm_fbdev_generic_damage_blit_real(fb_helper, clip, &dst); + drm_fbdev_generic_damage_blit_real(fb_helper, clip, &map); drm_client_buffer_vunmap(buffer);