Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3500721pxu; Mon, 19 Oct 2020 13:48:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLf3r8s8fRNeSf9dQvshG70/nHx8zDLGSLOsW5KFgWvPqYKdqJNulFj5xo2VC+4svT3IDP X-Received: by 2002:a17:906:489b:: with SMTP id v27mr1775658ejq.315.1603140502312; Mon, 19 Oct 2020 13:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603140502; cv=none; d=google.com; s=arc-20160816; b=hAmmERLw3znWCjq1JlIQ4or4BKcBQM9fgzTGlPApBk8yP0sXLHKRgokZfTbiQO2j7p 7MaIsP3mnHm2i4L4YyFfrZRuNx/dK6OxyFtPbcOKABuAWFuECqHM8E2jq4wXvVqR9s4s R45eaGkcU5wcQpPMipxG+E3j1/QfNWAZL3003akta0tpX+uAjooTQTSDU+YyXKJQSF07 90SirTAf1cjVuwFhNU8nJd1G3XLKstIgfqXfaMyqILssCT3tMNFmipjzwU3e28FNP1hY lqgOnIfNX+MZGdV9LOsP6NRA1iexH6x5M3tJTDu33zn7jxquoAI1qp3LtXDLSU3eWWdb G96g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=I/5BulyTAgauDZjnhomedyXprntdWFKbbV1wL+j1Ol8=; b=NwEV55I9CnolNLGoILrDbgcKSAD1aOm9RW8QmdmIQ8VPxzwmsL1pEysu1+xW+/vty5 q1106tOkd/1ck98f5YZGFGgLDEepzkhvAQb3gmZYqho/aK7+wK4UcjkJUzdOAD+rkzIp vdKmiXiWBzj6rGao27sUGxtn0J697PE5LA7bJ+lE9/BdBpUClUEqZ2bKN+eIaTTVYPYh 4HZ99p+EqeQrNeUlWkF2Z+ZjrOs0pwM1V7c/nXfMO/5BUuXTtj6McU1f/eIo0qY1VELh 1zFX5QDG9gwlG2YORMj0U/IJ0pkBRfHSNO8e/2EQdxA4a8xzfRt9pgfLmRBUXAO/2XjY UIwQ== 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 c10si660380edj.155.2020.10.19.13.47.59; Mon, 19 Oct 2020 13:48:22 -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 S1727432AbgJSHVD (ORCPT + 99 others); Mon, 19 Oct 2020 03:21:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:40306 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727223AbgJSHVD (ORCPT ); Mon, 19 Oct 2020 03:21:03 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7E795AB0E; Mon, 19 Oct 2020 07:21:01 +0000 (UTC) Subject: Re: [PATCH] au1100fb: Remove NULL pointer check before clk_enable/disable To: Xu Wang , b.zolnierkie@samsung.com, jani.nikula@intel.com, daniel.vetter@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201014082137.23320-1-vulab@iscas.ac.cn> From: Thomas Zimmermann Message-ID: <6cf83ff0-eeae-5646-b068-34dbacf2d961@suse.de> Date: Mon, 19 Oct 2020 09:21:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: <20201014082137.23320-1-vulab@iscas.ac.cn> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On 14.10.20 10:21, Xu Wang wrote: > Because clk_enable, clk_disable, clk_prepare, and clk_unprepare already > checked NULL clock parameter, so the additional checks are unnecessary, > just remove them. > > Signed-off-by: Xu Wang Sam convinced me to merge this patch as-is with out the additional cleanup of the driver. So Reviewed-by: Thomas Zimmermann I'll merge it into drm-misc-next. I'd still like to encourage you to send a patch for the other clk_* calls in au1100fb. Best regard Thomas > --- > drivers/video/fbdev/au1100fb.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c > index 37a6512feda0..3659dfbb81c1 100644 > --- a/drivers/video/fbdev/au1100fb.c > +++ b/drivers/video/fbdev/au1100fb.c > @@ -560,8 +560,7 @@ int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state) > /* Blank the LCD */ > au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info); > > - if (fbdev->lcdclk) > - clk_disable(fbdev->lcdclk); > + clk_disable(fbdev->lcdclk); > > memcpy(&fbregs, fbdev->regs, sizeof(struct au1100fb_regs)); > > @@ -577,8 +576,7 @@ int au1100fb_drv_resume(struct platform_device *dev) > > memcpy(fbdev->regs, &fbregs, sizeof(struct au1100fb_regs)); > > - if (fbdev->lcdclk) > - clk_enable(fbdev->lcdclk); > + clk_enable(fbdev->lcdclk); > > /* Unblank the LCD */ > au1100fb_fb_blank(VESA_NO_BLANKING, &fbdev->info); > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer