Message ID | 20230614013011.750598-1-suijingfeng@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp937972vqr; Tue, 13 Jun 2023 18:44:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xHLCS/wktYR2mCiT4xLnacVrjs0918LVv6f3EEvAExt4wusZGzQDF+3buISkkWAGYUrQq X-Received: by 2002:a17:903:489:b0:1b3:c578:c3e9 with SMTP id jj9-20020a170903048900b001b3c578c3e9mr6473748plb.62.1686707082862; Tue, 13 Jun 2023 18:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686707082; cv=none; d=google.com; s=arc-20160816; b=RLBQ3Fq+NWRKdHFveaUGr1nDfxBkhYgWaZEUiiiaChm7dHNXmktRPVeRVyI8WdpmkX ErhMJND9DfzL5Xu4n+wldnbwA2Huwd+DfaKKy+b6mRQ4YaXXcBaNUTaG0t3G74zkGyFd qzQjXlO8LR06AEUkontkU6NhGD4410fgZ8IP9YJo4TN98U54kiKM/YV0sHEvSTUGgroz CPkaXtK86ADmjniwo1McaivQftFHOpHC2O1Df/1QUBIbiZ7dnc0jkNfDWkhtx3hWnmcN m3edskJ8foCIRmOe2Kdfq8A9pTuM8ioXJM5Ng3xPI0fV8/eBTvt2T5X+OcZ/x/kI/i+z dCvA== 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=fsTFD6S1OMkKrVOl5Vnc+WJmjxBiWD0koHuCWtaJNlE=; b=L5pgP5rQM0aGkqAMLIQPtG27hBcHK/358iYuXJHfrxoyXoHcx8YMyzxQWc2wWO6TmA FqEMinSIjyPUSnMEPbWScXGMl0qzwI+VTp6+HmWRboZMZPhkMwDUWIb/DvSen3+aL+74 k1nLivjlvJlgusZxiURUjAl+xXe8jjf8yRM8vauYyQ3wdPz3heRzvHXmqOtjNOrLwk+5 4yVR4sWGIg3SR1wl8+EmEMDJv04AwvnU8Vo8R1TybjIjlo7Z2wiGesSnl7D8CuVdU6/C yjnR6EL4vhQyOZV6tWIeTttDfUa88xfj0et8TI/hTTx/wXyuukg7l394AzjiUlodhmiq 8/qA== 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 x11-20020a170902820b00b001b3d822f131si3689118pln.239.2023.06.13.18.44.30; Tue, 13 Jun 2023 18:44:42 -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 S241226AbjFNBa2 (ORCPT <rfc822;jesperjuhl76@gmail.com> + 99 others); Tue, 13 Jun 2023 21:30:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232782AbjFNBaZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 13 Jun 2023 21:30:25 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E7AC1BFD for <linux-kernel@vger.kernel.org>; Tue, 13 Jun 2023 18:30:14 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8Cx_eokGIlkrOUEAA--.10670S3; Wed, 14 Jun 2023 09:30:12 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxC8ojGIlkCvwZAA--.65253S2; Wed, 14 Jun 2023 09:30:11 +0800 (CST) From: Sui Jingfeng <suijingfeng@loongson.cn> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/fbdev-generic: Remove a redundant assignment clause Date: Wed, 14 Jun 2023 09:30:11 +0800 Message-Id: <20230614013011.750598-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8BxC8ojGIlkCvwZAA--.65253S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj93XoWrtFWfCr1ftr4rAF48Zr4UZFc_yoW8JrWrpa ySgrW5KryDta15Ga18A3ZrA343Wa9xJry0kr18C3s0vw4jy34S9F95ZF1kXF45Jw1xXF4a qrnI9FWkCrn2krbCm3ZEXasCq-sJn29KB7ZKAUJUUUU7529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU90b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v2 6F4UJVW0owAaw2AFwI0_Jrv_JF1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0c Ia020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JF0_ Jw1lYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwI xGrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AKxVWU XVWUAwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67 kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY 6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0x vEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVj vjDU0xZFpf9x07jFE__UUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768640566233441842?= X-GMAIL-MSGID: =?utf-8?q?1768640566233441842?= |
Series |
drm/fbdev-generic: Remove a redundant assignment clause
|
|
Commit Message
Sui Jingfeng
June 14, 2023, 1:30 a.m. UTC
The assignment "dst = map;" in the drm_fbdev_generic_damage_blit() function
is redundant because it has already been copied when the call to
drm_client_buffer_vmap() is finished. Therefore, this patch saves a useless
copy. No functional change.
Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
---
drivers/gpu/drm/drm_fbdev_generic.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Comments
Hi Am 14.06.23 um 03:30 schrieb Sui Jingfeng: > The assignment "dst = map;" in the drm_fbdev_generic_damage_blit() function > is redundant because it has already been copied when the call to > drm_client_buffer_vmap() is finished. Therefore, this patch saves a useless > copy. No functional change. Isn't that what we discussed here? https://lore.kernel.org/dri-devel/20230325074636.136833-1-15330273260@189.cn/ Best regards Thomas > > Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> > --- > 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 98ae703848a0..aa6924e3a58c 100644 > --- a/drivers/gpu/drm/drm_fbdev_generic.c > +++ b/drivers/gpu/drm/drm_fbdev_generic.c > @@ -182,7 +182,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; > > /* > @@ -202,8 +202,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); > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Hi, On 2023/6/14 13:29, Thomas Zimmermann wrote: > Hi > > Am 14.06.23 um 03:30 schrieb Sui Jingfeng: >> The assignment "dst = map;" in the drm_fbdev_generic_damage_blit() >> function >> is redundant because it has already been copied when the call to >> drm_client_buffer_vmap() is finished. Therefore, this patch saves a >> useless >> copy. No functional change. > > Isn't that what we discussed here? > Yeah, Lucas say he would like to take a deeper look in later time. Then, two and half a mouths passed, it seem that no one send fix patch. I thinks this is an exercise for me, I resend this patch again. Any idea? > https://lore.kernel.org/dri-devel/20230325074636.136833-1-15330273260@189.cn/ > > > Best regards > Thomas > >> >> Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> >> --- >> 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 98ae703848a0..aa6924e3a58c 100644 >> --- a/drivers/gpu/drm/drm_fbdev_generic.c >> +++ b/drivers/gpu/drm/drm_fbdev_generic.c >> @@ -182,7 +182,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; >> /* >> @@ -202,8 +202,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); >
diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c index 98ae703848a0..aa6924e3a58c 100644 --- a/drivers/gpu/drm/drm_fbdev_generic.c +++ b/drivers/gpu/drm/drm_fbdev_generic.c @@ -182,7 +182,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; /* @@ -202,8 +202,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);