Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28032599rwd; Tue, 4 Jul 2023 11:38:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlGq7ftz1qwSvL6cR9yTSYU7Urqcw9SNc+mMv/9/bBNzofkLt6AHw3zFUqlYR4v75qRg39F/ X-Received: by 2002:a17:903:1104:b0:1b5:64a4:be8b with SMTP id n4-20020a170903110400b001b564a4be8bmr17743916plh.35.1688495917271; Tue, 04 Jul 2023 11:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688495917; cv=none; d=google.com; s=arc-20160816; b=DZcNSuQjXFWmo0QTxI2MtxxHjNyOkkg8CUqSYbm4rL6a09G9MdTFZpVR3jsnUOa5Xn AePJ+q2+wVBPEJq5SB+FFW+k14BoqYmpmp16bLzy1DgTOpskooo6hQdYnVWVIH8s9EJx GciR8yvCxm5zM6gYYVNU/oKNT+djk0qmOqWef9m2JAzHeXgvXVAnwwLge/nGg2bTokx4 tKOFe6q+LQ7x20fgyubgxM5V81VzeVVs9Shz094523RptzsaJp+t55hl05laairCX5lp 45CQsYcLpGgOh9rFPgM0nLXgNnvH59LXhIvXNuUBLkB2wPyWZAThh+EuE3XzQ3fRRyUr wfjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:from:subject:user-agent :mime-version:date:message-id; bh=UPfCf+Xpas5QabSgZM6Omy3WgSzZjoWpvheCS9lM00g=; fh=LsPe522ps2nQQYeuNO/BKmIVRchBZRYQ9fh21KBNlYc=; b=FLhkopunxR0Wv2Xo7blpjPk9FomHVi7IPVN6AGWj3Ta8ffW4geTp7j158UVWIBuXNr KR9oHNEfFtYR3Xi6iX7EqHdI04Oq35ZQALzBqVaFppbU9P3nrOu+VFnsgSGaaMt/Poze NAhyeBMZnIwR+bMgVt2jch9bTfPt45lCnEhUA9o4w3GK4PLMHCbYAyM3vAhYm0hohBYE 5dll4HZMcGbf57o6UCVNXcGu4a+K1BhW11qn+Wk/W8oykpmZSVTLwS8t1OBpzY1LqBmX hLUAIt6v7l8t3lGDUyvwjA10ozoJv9zYtSAToqMOcVAg0ma5nP1JYwWSjaun5VTG1m1c BnCA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f31-20020a17090a702200b00257482b1795si23283552pjk.166.2023.07.04.11.38.22; Tue, 04 Jul 2023 11:38:37 -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 S231250AbjGDSOP (ORCPT + 99 others); Tue, 4 Jul 2023 14:14:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbjGDSOO (ORCPT ); Tue, 4 Jul 2023 14:14:14 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7619C10CA for ; Tue, 4 Jul 2023 11:14:12 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8DxRvFzYaRkORoAAA--.691S3; Wed, 05 Jul 2023 02:14:11 +0800 (CST) Received: from [0.0.0.0] (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxniNyYaRknXUbAA--.43573S3; Wed, 05 Jul 2023 02:14:10 +0800 (CST) Message-ID: <4ac98180-3fdc-24e4-1d46-0ed567da5448@loongson.cn> Date: Wed, 5 Jul 2023 02:14:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: drm/drm_gem.c: Remove surplus else after return From: Sui Jingfeng To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20230622101857.2298773-1-suijingfeng@loongson.cn> Content-Language: en-US In-Reply-To: <20230622101857.2298773-1-suijingfeng@loongson.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8BxniNyYaRknXUbAA--.43573S3 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj9xXoWrtw4fWw1fAr4rXry8AF1rZrc_yoWfKFcEk3 Wjq3s7WrWUur9xZFsrA342vryFvFWkCFWruwn0g34xZw4DAr1UX34xG34qgF13J3W8GF98 uws3ZFZxtwn7uosvyTuYvTs0mTUanT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUbTAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV WUJVW8JwA2z4x0Y4vEx4A2jsIE14v26r1j6r4UM28EF7xvwVC2z280aVCY1x0267AKxVWU JVW8JwAaw2AFwI0_Jrv_JF1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa02 0Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jrv_JF1l Yx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCYjI 0SjxkI62AI1cAE67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4U MxCIbckI1I0E14v26r1Y6r17MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI 0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE 14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20x vaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWU JVW8JbIYCTnIWIevJa73UjIFyTuYvjxU2G-eUUUUU X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi,  Thomas On 2023/6/22 18:18, Sui Jingfeng wrote: > else is not generally useful after return > > Signed-off-by: Sui Jingfeng > Reviewed-by: Thomas Zimmermann > --- > drivers/gpu/drm/drm_gem.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c > index 1a5a2cd0d4ec..c18686f434d4 100644 > --- a/drivers/gpu/drm/drm_gem.c > +++ b/drivers/gpu/drm/drm_gem.c > @@ -1150,8 +1150,8 @@ int drm_gem_pin(struct drm_gem_object *obj) > { > if (obj->funcs->pin) > return obj->funcs->pin(obj); > - else > - return 0; > + > + return 0; > } > > void drm_gem_unpin(struct drm_gem_object *obj) I have merge this patch with the dim tool, by using the following command,  ./dim push-branch drm-misc-next Is this looks fine? I'm so worry about the dim tool now. I want to make sure if I do the things correctly.