Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp222271ybz; Tue, 21 Apr 2020 19:16:19 -0700 (PDT) X-Google-Smtp-Source: APiQypI/IIZ4EBYVFj8dDNCmbVYyJUMcNbNmbRgubkJ+AS4GhaXrulE5m0BMxLPo31FWMAoF0ue3 X-Received: by 2002:a50:a285:: with SMTP id 5mr20894450edm.360.1587521778928; Tue, 21 Apr 2020 19:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587521778; cv=none; d=google.com; s=arc-20160816; b=N75feZ0aW8iFIm8zxFzldyf80fXdiiWUdpW2TMrsLzFFnBeYjC9aUUhwQhS0VS2ORt 89/mK6HzzuhQKbbeCoIv2+TG9wLXbv6TN6cCpQeRe1ti0/FkkTdDKHXmUwsvemhMdUPP EK6+wc6pnNOqtIyEuvFGhA3yytOUveJEWQlYBxKYvpNtXWWj3kDbHZfINSQyInmu34iW xVzXlMNfu6wIaar36QSgnFT1coUu+2kRMjTJmt+gQzE83WflUo0BDXSp8f+zt59dFtYA Bqx9sWEb2cFMK7oECe2az4XfUs5Lrjp2mKVahD2Umlsbh/PUGRgn6VhhVoJjcOxRws4n DWyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=qi9I59WfP3fHl29p8ighrYgBYywrU1coiWn+UjvGG2Q=; b=V+CWESkiDcEuRLlDCpTM5d+X8SDzMxuKophTm392B5x1JyMgLh7G+DpXjJvqqwzMaY c/KqaGdSpE73M0/1MTfALaG771q7Efyu2M76XT2qjh+Z5TxbnIjL9Tix66UcpUwCjRYT mkIYoztGG9BfiyMpnEfmEMiuJ+n699Ekk0ImlxDxmiKGW0WCsFM1Bb+thbxFyynmJlKO Vjl78DKZp/jqCoK/0bzjYav1wb3p0mefEtr/cdBDRK1VZLKKCk1YgSIa75d5NfBT7iCx GK+8+0ob0iGK5Bbzxb3GXUgkbnf4kuZR2P1xMegYyexcelp9Kqr1R25sA4nCbQemx1lw crZg== 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 y8si2721776edv.143.2020.04.21.19.15.56; Tue, 21 Apr 2020 19:16:18 -0700 (PDT) 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 S1726341AbgDVCMo (ORCPT + 99 others); Tue, 21 Apr 2020 22:12:44 -0400 Received: from m176115.mail.qiye.163.com ([59.111.176.115]:60984 "EHLO m176115.mail.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbgDVCMo (ORCPT ); Tue, 21 Apr 2020 22:12:44 -0400 Received: from ubuntu.localdomain (unknown [157.0.31.122]) by m176115.mail.qiye.163.com (Hmail) with ESMTPA id A6E676652E0; Wed, 22 Apr 2020 10:10:53 +0800 (CST) From: Bernard Zhao To: Liviu Dudau , Brian Starkey , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Bernard Zhao Subject: [PATCH] drm/arm: cleanup coding style in arm a bit Date: Tue, 21 Apr 2020 19:10:46 -0700 Message-Id: <20200422021046.4375-1-bernard@vivo.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZTlVOTEhCQkJDQ0pMT09IQ1lXWShZQU hPN1dZLVlBSVdZCQ4XHghZQVk1NCk2OjckKS43PlkG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PzY6Dhw4Dzg5SwIDFhQTCkwC TB9PC01VSlVKTkNMTklKT05IQ0JJVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlKTkxV S1VISlVKSUlZV1kIAVlBSkJPTTcG X-HM-Tid: 0a719fa6fef29373kuwsa6e676652e0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For the code logic, an alarm is thrown after failure, but the code continues to run and returns successfully, so to the caller the if check and return branch will never run. The change is to make the code a bit more readable. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/arm/hdlcd_crtc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c index af67fefed38d..32bda13250f5 100644 --- a/drivers/gpu/drm/arm/hdlcd_crtc.c +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c @@ -160,9 +160,7 @@ static void hdlcd_crtc_mode_set_nofb(struct drm_crtc *crtc) hdlcd_write(hdlcd, HDLCD_REG_H_SYNC, vm.hsync_len - 1); hdlcd_write(hdlcd, HDLCD_REG_POLARITIES, polarities); - err = hdlcd_set_pxl_fmt(crtc); - if (err) - return; + hdlcd_set_pxl_fmt(crtc); clk_set_rate(hdlcd->clk, m->crtc_clock * 1000); } -- 2.26.2