Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7783821rwd; Tue, 20 Jun 2023 06:16:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4aQymcy2SV8/aTx6aFvo0KRGmI86a54nZad/DJMrjM6Zg3Q/rJujrR6VfPvwhz0KpmqQdU X-Received: by 2002:a05:6830:1d4:b0:6b1:6859:b8fe with SMTP id r20-20020a05683001d400b006b16859b8femr11419021ota.0.1687266982892; Tue, 20 Jun 2023 06:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687266982; cv=none; d=google.com; s=arc-20160816; b=TWp8z0tDxDKIgfb8HMByMoe3AIlHAP/6nxf8qMFo+wsitrMuKBfuQptEsBdDTLGO9c BTBSWvuW2rT2R1xdvX/amg3/7k22UtWlgY41w/R4hs7dlx/t86gNEWRXa83s4JMNQ6r5 a46DP/5E3ldqp99HgAtdGUXJBtWF9BjTDFEIgCek0OAxAJgR7X59Eig/yJvoHyqAW7xl s/7uDtpZXLIYmU2ViIYy50pZI4iHQ9ojqsH0Q1290TO5KWwb4RmyFmOeAS+vGREjC0+N 1MYzxtQ5O7YkgWRUfkcMQIV7TW0HeM2UWRXPpH3rMlmv4dRmOJ4+o7maDSIXloR4xtf7 sp5Q== 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:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=WP5vpynYgNMXy8TaoMzt2xjr96MBAbBOAmB71QFroMo=; b=sRXJGL7z3RpSza5LrrUNX9zqHSikBUpg4240rdRVCqM4Tr1r/uA8Ap5ySjsYUBkqy8 jGAP/nxv1vIeoAmW0I3J3alMeyuXwxIWmwwB7QEpat+n4V9UqDbgcu+BNbvrPpqD/juX DKNd0fevrVvQ9WouU4MFk4Mv1vtFembcgAIGwz7V3cinO6Yp4kQ9kQR86SFrpvEHP5JV H2K6G4ty4E+0XJsqwAuMYdKYxsJkAHR8jPPOZnGNm74H3gr3OOBvUJNgMCqhlJVu5lpK w6EKkwcQ2GF8ODZhCfo8LFSvsDTpTDb6DRqIhwEvmg/aMqcQBd5aj+KH76WLLqRSg7Hx y2vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="j/mm2xay"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020a637311000000b0054fa5f25cfasi418825pgc.568.2023.06.20.06.16.08; Tue, 20 Jun 2023 06:16:22 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b="j/mm2xay"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232324AbjFTNBx (ORCPT + 99 others); Tue, 20 Jun 2023 09:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232757AbjFTNBY (ORCPT ); Tue, 20 Jun 2023 09:01:24 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 577311710 for ; Tue, 20 Jun 2023 06:01:05 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4f769c37d26so6149198e87.1 for ; Tue, 20 Jun 2023 06:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687266062; x=1689858062; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WP5vpynYgNMXy8TaoMzt2xjr96MBAbBOAmB71QFroMo=; b=j/mm2xaykap2KR0u/lkGswya0XJZf7Cwz+3donGqSzF3lZjQxbSkCPJCkKFd+5Oazh 0C1zt8jSSrfzfT44oKzfGxQN/HsNnc6VvSVVB4MV/CdYjvoMR+hkKVPvBunJYUyjcqEZ IlGYQOBxX6kQMbNve5XwkqqmwZJ6ETkNDDUtyGQ/f9l02nGpwkjGza0Gzn0o4Z1SiMgv mNDYJWg6PO8cOd25V/dQxqMxIfIKGLUSSAn3gsc09vdhWx2QV7405O51IR/B3YHu0SgA 6oEB6g0f56xWsZyyTq7QN2/yoyNH8fnczeoGZuKvQvL6CMGzvPnjLejpnnUEzM6TpVrX ueRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687266062; x=1689858062; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WP5vpynYgNMXy8TaoMzt2xjr96MBAbBOAmB71QFroMo=; b=SWK4ZbrFB94IvXzSzjLS5UxiFEYK/efPmufldQQkW/2rZFU2Sebj2NhNKy1COYfM+5 0J5LsvKvKGIoybV52fERFooB8v6ttp7LSmR92/d7JzBTHs8SH7n0qU3gLMOKLYlRfvZs Pj2OPoQbAl2+nyuWjgTKb/Pr+hcNV2zsWVAuCfqIVDrXJ7njT/UC0bC4LD1gI9UPVjLm W2qAGe6DaMhr5U3cvgA9KqL2CUm4q3H47TwtLEQhRy+1+VcC6DfBA5jWuAQLPyplnKdD wPLNJFvq27IpLx2AjA0pCCvuo5nBWKVMkSAsmH3zrMo60Fbio3O6+Grskzh2xcu7bQ45 N4pg== X-Gm-Message-State: AC+VfDyDu1u037J2H4P+bJCh/nqGMQm6c9ku9qS7ocNph5wHzg+DQ/9+ Zjzxo/EdexUFp6KfQANmKO0= X-Received: by 2002:ac2:5b1e:0:b0:4f8:5d15:99e5 with SMTP id v30-20020ac25b1e000000b004f85d1599e5mr5660162lfn.32.1687266061915; Tue, 20 Jun 2023 06:01:01 -0700 (PDT) Received: from [192.168.50.244] (83.8.116.77.ipv4.supernova.orange.pl. [83.8.116.77]) by smtp.gmail.com with ESMTPSA id ep8-20020a056512484800b004f26f437ad8sm358976lfb.53.2023.06.20.06.01.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jun 2023 06:01:01 -0700 (PDT) Message-ID: <52d0771d-b184-8154-6a1a-3f7bc223ac3a@gmail.com> Date: Tue, 20 Jun 2023 15:01:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH] gpu: drm: Optimize the unused variable ret To: Li Dong , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , "open list:DRM PANEL DRIVERS" , open list Cc: opensource.kernel@vivo.com References: <20230619113154.1980-1-lidong@vivo.com> Content-Language: en-US From: Artur Weber In-Reply-To: <20230619113154.1980-1-lidong@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On 19/06/2023 13:31, Li Dong wrote: > Use zero as the return value instead of the unused variable ret > > Signed-off-by: Li Dong > --- > drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c > index 102e1fc7ee38..fec0d014fd0e 100644 > --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c > +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c > @@ -66,7 +66,6 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx) > static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock) > { > struct mipi_dsi_device *dsi = ctx->dsi; > - int ret = 0; > > if (lock) { > mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5); > @@ -80,7 +79,7 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock) > mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5); > } > > - return ret; > + return 0; > } > > static int s6d7aa0_on(struct s6d7aa0 *ctx) Commit "drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock"[1] already does this. Best regards Artur [1] https://cgit.freedesktop.org/drm/drm-misc/commit/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c?id=c5dacfe2e6c1251276e29b4cdac771f504593523