Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6089146ybv; Tue, 18 Feb 2020 09:38:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxamsE7Bp71QIalpsZcMxnrNI0ogweoe1ZCWwZUPQZOgMoGRhWxbfXytS0iKDX+W3nTgyBo X-Received: by 2002:a05:6830:1db3:: with SMTP id z19mr16855056oti.292.1582047537197; Tue, 18 Feb 2020 09:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582047537; cv=none; d=google.com; s=arc-20160816; b=laYoxpotx5pdfeBKnyBUSe8Ixmjfp9XwPPMWR4M5mBiPXByQvi5XuyoWwbBwRfo0cY giwLcQEkmnElBB4Axtc4XeqZ4fwBKUVWCFTRNlH/TslvJPpAFFtcQJwo4Wcw94Pabfvp 1xZ38wQG465Cq1RmKOwjWDDu8/bjo4GdlshUzsmgynzluXNIBX6C25yHHegL4G9IY4+R fExtNRqqakFKcAoKJd7k66CcRLGP5SiLVQGD0ZnitiDTvXPXQiYafCjQScMH9XEAHsOn Y0SvVurSV9issr+iYVBtGKYBqVo53TLZooDnVo67bzS1paHgr5L2HgTj8/0M7LuA2+vd O0lw== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=soB5H9URKP8f0bIUmPoPOi8wx9U/KpHBpXtAnSAT5kc=; b=nBMCuKsYq1SA+hy0nvhMEB5F1g9qU94ARIJeicpLaQCx7mluwSO0ZTPoHDV1T9iLqd Manhbi6JTXg9EBYmkB5vOyjumIakR1B6uRiVgNlU7wXRpzh/wZAL26iGdaTrbIQTyevT XMXz0D90rPUks0ZBtF154B7GVC80rxOd5oF1Jy118emYHHF716DUIQEHK/s8isRhtGAT pTfgOFyVAj3n7AOfLeLpVKODYDAZzCXj8iA4Sw6oGXgeoVhegiQ1w1nxuRrt9ao4tsqr YsYcUyM/SbmtIBCkA0DspNqSOBxi8pa1ezkwi+SeoG85biElz/zzgNjzvzIun2XObHNn wZSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si2120223otq.250.2020.02.18.09.38.44; Tue, 18 Feb 2020 09:38:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726645AbgBRRiL (ORCPT + 99 others); Tue, 18 Feb 2020 12:38:11 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:53077 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbgBRRiL (ORCPT ); Tue, 18 Feb 2020 12:38:11 -0500 Received: from kresse.hi.pengutronix.de ([2001:67c:670:100:1d::2a]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1j46ov-00013U-MI; Tue, 18 Feb 2020 18:38:05 +0100 Message-ID: <71275b167f41ca424216c2bda0459bf305a1162c.camel@pengutronix.de> Subject: Re: [PATCH] drm/etnaviv: remove check for return value of drm_debugfs function From: Lucas Stach To: Wambui Karuga , linux+etnaviv@armlinux.org.uk, christian.gmeiner@gmail.com, airlied@linux.ie, daniel@ffwll.ch Cc: etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Date: Tue, 18 Feb 2020 18:38:04 +0100 In-Reply-To: <20200218172821.18378-4-wambui.karugax@gmail.com> References: <20200218172821.18378-1-wambui.karugax@gmail.com> <20200218172821.18378-4-wambui.karugax@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::2a X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Di, 2020-02-18 at 20:28 +0300, Wambui Karuga wrote: > As there is no need to check the return value if > drm_debugfs_create_files, And here is where the commit message skips a very important information: Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail) this function never returns anything other than 0, so there is no point in checking. This information should be in the commit message, so the reviewer doesn't need to look up this fact in the git history. Regards, Lucas > remove the check and error handling in > etnaviv_debugfs_init and have the function return 0 directly. > > Signed-off-by: Wambui Karuga > --- > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 16 ++++------------ > 1 file changed, 4 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c > b/drivers/gpu/drm/etnaviv/etnaviv_drv.c > index 6b43c1c94e8f..a65d30a48a9d 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c > @@ -233,19 +233,11 @@ static struct drm_info_list > etnaviv_debugfs_list[] = { > > static int etnaviv_debugfs_init(struct drm_minor *minor) > { > - struct drm_device *dev = minor->dev; > - int ret; > - > - ret = drm_debugfs_create_files(etnaviv_debugfs_list, > - ARRAY_SIZE(etnaviv_debugfs_list), > - minor->debugfs_root, minor); > + drm_debugfs_create_files(etnaviv_debugfs_list, > + ARRAY_SIZE(etnaviv_debugfs_list), > + minor->debugfs_root, minor); > > - if (ret) { > - dev_err(dev->dev, "could not install > etnaviv_debugfs_list\n"); > - return ret; > - } > - > - return ret; > + return 0; > } > #endif >