Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp735403ybh; Wed, 11 Mar 2020 09:45:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvm6hWUObNZqNLVWoDfdiObqra624aE74uYJqyi4SZlYVVfVjyvGL4oesFehiwzl9T9Cz9R X-Received: by 2002:a9d:138:: with SMTP id 53mr3090187otu.67.1583945118526; Wed, 11 Mar 2020 09:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583945118; cv=none; d=google.com; s=arc-20160816; b=lz9e3lcAUQ7Lftja+UebE41+wPzaOthTvsA43wQlNLCEyynfXSdgQkbeWCoeS8cn46 vyulidGQyKICr7bF9+y+KsQiEektebYv07kuEDsTGjzjFrvB+7LYXaKqnyOANA0IsqSr NkgUtt3C5xRSfrSRUB5mBgUhXbj+akk/WctmRMolBVVpvRFSkNBxsGWhVOX1eXb3lrPr go4+Al4v7e2Fr+sYUM0YzOEoaaM6Z6PfmthwiUj2jWyE43c03wh+VfPPrWeBkmu1KGCA sSxaHsa6WZKVx6E7AbaSJrSQ3HUJf9p4T7ZNBC/QAS847FhunRJd1SsJMKSPAoMRkXy/ EjJg== 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=6c0c18Xvp7eBjWWhXecfm+hRWYB4MUIXlQD2tP1XNOQ=; b=xWn9QxdvonRcniH8vgdHQ3BdjxKl5ToKxLTHUf7G16AJHIyLFnq7J8EIcUcrqeyyhw Erz3+zrG2Fv1MOoh/vkTSbD51Abf32Zuk5+VXMzfOMEttTLIXFbt4OlEXm00SgxDli4k Ir2RdjVqarsSU483KS21wkf+y+7gwG7YSRG8pL4I8h8GV+r9Lc0nVzFzDyO0/xvDqpvl 7xk9LjCz1WEgGF2dXHpn0smuBfH4IR1W4ndFkIakKyE5Z8yeVNHZkG7gqG10ld310Rp/ 0n4dBp2Hg8S9yN+PrAw3EFYc5+hTIvoVpN76sAupWSHpnc7K3N1HnaQlhQ2q60VnuRXm 0w1w== 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 r3si1508458otc.58.2020.03.11.09.45.06; Wed, 11 Mar 2020 09:45:18 -0700 (PDT) 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 S1730206AbgCKQof (ORCPT + 99 others); Wed, 11 Mar 2020 12:44:35 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:47167 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730031AbgCKQof (ORCPT ); Wed, 11 Mar 2020 12:44:35 -0400 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 1jC4T9-0003M8-IN; Wed, 11 Mar 2020 17:44:31 +0100 Message-ID: <1b7e79c25704c7fc78b09bb99f6920e62ffed7c6.camel@pengutronix.de> Subject: Re: [PATCH v2 07/17] drm/etnaviv: remove check for return value of drm_debugfs_create_files() From: Lucas Stach To: Wambui Karuga , airlied@linux.ie, daniel@ffwll.ch, Russell King , Christian Gmeiner Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, etnaviv@lists.freedesktop.org Date: Wed, 11 Mar 2020 17:44:29 +0100 In-Reply-To: <20200310133121.27913-8-wambui.karugax@gmail.com> References: <20200310133121.27913-1-wambui.karugax@gmail.com> <20200310133121.27913-8-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-03-10 at 16:31 +0300, Wambui Karuga wrote: > Since commit 987d65d01356 (drm: debugfs: make > drm_debugfs_create_files() never fail), drm_debugfs_create_files() never > fails and only returns 0. Therefore, remove the unnecessary check of its > return value and error handling in etnaviv_debugfs_init() and have the > function return 0 directly. > > v2: have etnaviv_debugfs_init() return 0 instead of void to ensure > individual compilation and avoid build breakage. > > References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html > Signed-off-by: Wambui Karuga Acked-by: Lucas Stach > --- > 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 >