Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6108479ybv; Tue, 18 Feb 2020 10:04:07 -0800 (PST) X-Google-Smtp-Source: APXvYqy56n+NaAsw7aSpTZ0rlQKbOm/dyoSws+lvFt0oxx5q/gS47VQckdVyHxOcgP67r2TTBnb9 X-Received: by 2002:aca:530e:: with SMTP id h14mr1983561oib.105.1582049047083; Tue, 18 Feb 2020 10:04:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582049047; cv=none; d=google.com; s=arc-20160816; b=CpMIQVeH7vvAKP4bwHHfWCScUkAmhpxhSDbtmnA2lkmY0bCc7BtthSJXxleK1MSJuC YIw95EFv1qnPfs04fEXYTWdcfj8SDS87JMJsO7i7BZtI+3MyM1wPv3ajXnpiy0pxMfUn 8W7D8Cd8z6uHFTX4LIJbcZfEqRBPXy6HAbK1ebjwhqWPjXZaH07dsT3Dzz72FEqc/I/w bdXxPdez/LEM9PhuhFep4TnLCLt74BSIIIF7sSNNzf+ahykRpMl+CMGX8yDsmbKgh5FC E1IDmSMxXMy4xfHL9yXlKs2LGV3T99nVAoK5STop22DV7t6jmZR8OXuSltFYvmXNkO0/ nHyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature; bh=V/tjhq7oBEyOycP7UZixOMOtUlTvd2hXQJK9Eop241Y=; b=nLQmI1fuOpjKiIl7yj61m/D9o1JoHCJB+A+/KJpE4UvTAEC0aN4DmUt4r1L4NmR9U5 0i7APnm+gp0VHEF2+8gt1SOdMCyyCSgABGyespohWrFFrJBgL6BTbLN5zylVJ3shnd94 kqK/W98gDQMsi8vgsNpqEe9GDwp0VzRYPLtmWoI3Jp4GDy6znD7S0gQ9wmyBfAblUW8t I1yPe2OE9EYP/kI1KARnpEViHg3y9ehHzQsW0bRFPf0zxMwlYSlDQCzHwecC8WEATnah eJuSVgDum4SX5YcIPoi3C2pcR9dpwysSbzYpmGQAx0z58Vny+wcE+WXWeEaZB19IS8Wf 2/KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DDyhwFE4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x11si2005144otp.285.2020.02.18.10.03.53; Tue, 18 Feb 2020 10:04:07 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DDyhwFE4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbgBRSDM (ORCPT + 99 others); Tue, 18 Feb 2020 13:03:12 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42015 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726403AbgBRSDM (ORCPT ); Tue, 18 Feb 2020 13:03:12 -0500 Received: by mail-wr1-f67.google.com with SMTP id k11so25059850wrd.9 for ; Tue, 18 Feb 2020 10:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=V/tjhq7oBEyOycP7UZixOMOtUlTvd2hXQJK9Eop241Y=; b=DDyhwFE4de9F78yd1ZPlzxTgEeAp+R7qKvINaKsqzab98Bhiw1IzW4Hfout+GyH9wq VZEEok99wm14lIHZhVAgOZH3rllXIPqsBBMCW7QWxNu52fR/JbtbSv7nHTjI3AaVf4Hi D5kPt135GHHHZ8IYDfwPDA0i5vcVCGzV8X0505FxninFfNbdeiyAkOLhpPT0t70ivMvu O2KZCH7OQ2dOk2Ksb9DRkb8eoi0rjSp4EybIAi1INXt/r0fT91iKohal+LAqa2l87UA6 gBZQLnMEcG+EA92Fcrqk2u+o0jEXSRK6NAKRw96ej9lVzlQnm1qnlgqwhkxLvGZlZinK qzUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=V/tjhq7oBEyOycP7UZixOMOtUlTvd2hXQJK9Eop241Y=; b=HQSbT98msDDrdTNnUVn2yTltlvxVgFpiQ9ZqSAboYATVT0vjyETKue6B85Bd2GN/qN i0uMR/Rv2o7q6PDY9hJLbxMYsj1H/djeCRUipvEtpiOLQpyrux0H3uzXE0yk/MhjYuao 4kkbSXM++q1N0txGl7gVSUR3R5hdZDOStnwyLoanfD4beEZ31QvWsNE+dV8nEvbGcRjH lfJ71nP0QIYcDdUpif5Xo08kLsuP65tZIjOWEC3cltafFMxPKiDWsO1RLSWl4uo3u0dD xGVwICq7EvFiSzH0PJcxXRzomDJ/9ZF6uoQOPn7lkmlpjY2w+wFIjLLh5WTumBQTZC20 py3w== X-Gm-Message-State: APjAAAVUW9EDZ4iQ0wQS7aeb1rDu9ynCluuwsKZURrqZnl2EKoS/wCG8 epBCCDA/FPFbDf/ep4I0b7E= X-Received: by 2002:a5d:61d1:: with SMTP id q17mr31130089wrv.156.1582048989986; Tue, 18 Feb 2020 10:03:09 -0800 (PST) Received: from wambui.local ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id o2sm4309335wmh.46.2020.02.18.10.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 10:03:08 -0800 (PST) From: Wambui Karuga X-Google-Original-From: Wambui Karuga Date: Tue, 18 Feb 2020 21:02:56 +0300 (EAT) To: Lucas Stach cc: Wambui Karuga , linux+etnaviv@armlinux.org.uk, christian.gmeiner@gmail.com, airlied@linux.ie, daniel@ffwll.ch, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Subject: Re: [PATCH] drm/etnaviv: remove check for return value of drm_debugfs function In-Reply-To: <71275b167f41ca424216c2bda0459bf305a1162c.camel@pengutronix.de> Message-ID: References: <20200218172821.18378-1-wambui.karugax@gmail.com> <20200218172821.18378-4-wambui.karugax@gmail.com> <71275b167f41ca424216c2bda0459bf305a1162c.camel@pengutronix.de> User-Agent: Alpine 2.21.99999 (LNX 375 2019-10-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Feb 2020, Lucas Stach wrote: > 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. > Okay, I can add that to the commit message and resend. Thanks. > 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 >> > >