Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp219742ybv; Tue, 18 Feb 2020 21:39:54 -0800 (PST) X-Google-Smtp-Source: APXvYqyJyL8pms1RlTWMPWo8LIqOMCwjWeNA1aPXff3aQCkF7hzTtHuwjq8//TiLMAoFY3Sz6KrL X-Received: by 2002:a9d:7590:: with SMTP id s16mr17410170otk.89.1582090794812; Tue, 18 Feb 2020 21:39:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582090794; cv=none; d=google.com; s=arc-20160816; b=OzCiowvs0ijV2IZ/9TjqubpOYyZDZjPtDCRUPe4wMXmaxTtBcoKbKcrWH3YwSpm4c0 ORxufRYWPt8lD51rTtfW5lYAZ943Q24kcSorIa2KGpYuvXmneE9PO6siPR5/ZdZqIBCk kPKU4Vw5b4o3QeiWXjUnoCA0mD90rWeKxnx1mWKKymNzRI99VEZJyq2zQAinQQKqJPTs dW1Mt7eoIaal1MDOFKdM6hHnaxAdQOeSMRm0yPZWdkU+lCDhPGllGtPL+45hbebxG6k/ iXbYcUI/6Sw4JCf6NXmkBXIVZ7OloSDxpa/CncqoMP0pcWChFoJlIlVBzcloJ0mzb4V7 RTeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=d6qeSHn0R8eb7oUSh15TXKxMRyNgkmSfzopxI3yp3FM=; b=eZMjjYXJNfbENNgqmgsepxSNVLr2O7Wl+oVSMs1PBKKYQ44IMYAl5cm6ln6V4DRT78 Pl25y9An6DzOb4GZOAEAkczQ4eRurXEmFwm0tvCHU4DpfyA0sUA35BTa3V5T8gemGm2W WvUSwqNSeKddIO+nkVjXFF+QgUD6JU0uzWTQDJRJXsDz794wl+Z/628F6BbOdQEGNNMv jY1BvazMpdWY+64V1NiELoZaWASOHQBf/IuRrktOJZh7s9Dq0fnYSlOo1YIc671v4OrV 1H278wGujZmZoP/9KECHx8BXHfohqqQnWXWKBLVbG66DQ1iPkIF0f53uH0CnlwoYJBn8 v9gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RcJvnBF7; 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 n20si8398244oig.53.2020.02.18.21.39.42; Tue, 18 Feb 2020 21:39:54 -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=RcJvnBF7; 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 S1726197AbgBSFjd (ORCPT + 99 others); Wed, 19 Feb 2020 00:39:33 -0500 Received: from mail-yb1-f193.google.com ([209.85.219.193]:42078 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbgBSFjd (ORCPT ); Wed, 19 Feb 2020 00:39:33 -0500 Received: by mail-yb1-f193.google.com with SMTP id z125so11802163ybf.9 for ; Tue, 18 Feb 2020 21:39:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d6qeSHn0R8eb7oUSh15TXKxMRyNgkmSfzopxI3yp3FM=; b=RcJvnBF7TNNpu0kEihSEJQdZW95fpfOgZ8O3iNQbqQAgROzILUpdP+uVsm/rcl1j+J pjHjdUQD8jTt8MxZmqU2s6sl3TKCO/vW71rwrEK/UNzllPgXKlnfv5KaYhTHQQZhpq0q JzCLLmRVQWZMfwLNHqdwVTUvsX+P25oawWZv8lgqmJqQxFnKmdRsV7u5bPjM+hGEOwQW jbjIL2+JuT+a7/TcxjKhX4/fI4aVB7FYyLDvxHe0mCM5rGF8gzWRiVHauRngciMbMnGR 5cuP6muvicfgeDgvGntE9eVb9lOsAigqLa/NwsuMIcUXZjY07CHLO43xs3HWFA8ufjwd gpMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d6qeSHn0R8eb7oUSh15TXKxMRyNgkmSfzopxI3yp3FM=; b=XJiU1Rkr+N3WQ/uwAmW2T1gX0YQVCANzWViOiciBOwA1IVwdjOcRo1CMLXB4Q6sNuB 5S1CTm0/hf5irsss/FfL0Uxgj5PJoZj4+xFaKBYcz+oZTqyV0a46q53uWK2RUd1dWQO8 QxDkUptyj6f/u5Q7t3iqNqGJK6bac3YkeZn3XXA3+qkCe3TEf71Z0WZpcnDo4Qro/E9O ETNmHsFO9ZvrrtxcVOiqm3SlhpvJqO43/6yQnSWiAyEbwMM72C+hwd42PIvXATdTVbKp njtPjRPHev2fVAT7ICm+wWPtuu4+2jW0ICUJSqECnUUg7Ilj397XAgY700TL257mHr3b XMDw== X-Gm-Message-State: APjAAAVYST8QjuQvv48ADXwUnpo1MWCSqXFCNXbkc2mNCkhTOqpNq/k2 1WDFWnI8dMcTAq4iBC2JM5gd2+it+2EhYX9iSu0D2xWw X-Received: by 2002:a25:42ca:: with SMTP id p193mr20880605yba.147.1582090771031; Tue, 18 Feb 2020 21:39:31 -0800 (PST) MIME-Version: 1.0 References: <20200218172821.18378-1-wambui.karugax@gmail.com> <20200218172821.18378-6-wambui.karugax@gmail.com> In-Reply-To: <20200218172821.18378-6-wambui.karugax@gmail.com> From: Ben Skeggs Date: Wed, 19 Feb 2020 15:39:20 +1000 Message-ID: Subject: Re: [Nouveau] [PATCH] drm/nouveau: remove checks for return value of debugfs functions To: Wambui Karuga Cc: Ben Skeggs , Dave Airlie , Daniel Vetter , ML nouveau , LKML , ML dri-devel , Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Feb 2020 at 03:28, Wambui Karuga wrote: > > As there is no need to check for the return value of debugfs_create_file > and drm_debugfs_create_files, remove unnecessary checks and error > handling in nouveau_drm_debugfs_init. Thanks! > > Signed-off-by: Wambui Karuga > --- > drivers/gpu/drm/nouveau/nouveau_debugfs.c | 20 ++++++++------------ > 1 file changed, 8 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c > index 7dfbbbc1beea..15a3d40edf02 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c > +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c > @@ -222,22 +222,18 @@ nouveau_drm_debugfs_init(struct drm_minor *minor) > { > struct nouveau_drm *drm = nouveau_drm(minor->dev); > struct dentry *dentry; > - int i, ret; > + int i; > > for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) { > - dentry = debugfs_create_file(nouveau_debugfs_files[i].name, > - S_IRUGO | S_IWUSR, > - minor->debugfs_root, minor->dev, > - nouveau_debugfs_files[i].fops); > - if (!dentry) > - return -ENOMEM; > + debugfs_create_file(nouveau_debugfs_files[i].name, > + S_IRUGO | S_IWUSR, > + minor->debugfs_root, minor->dev, > + nouveau_debugfs_files[i].fops); > } > > - ret = drm_debugfs_create_files(nouveau_debugfs_list, > - NOUVEAU_DEBUGFS_ENTRIES, > - minor->debugfs_root, minor); > - if (ret) > - return ret; > + drm_debugfs_create_files(nouveau_debugfs_list, > + NOUVEAU_DEBUGFS_ENTRIES, > + minor->debugfs_root, minor); > > /* Set the size of the vbios since we know it, and it's confusing to > * userspace if it wants to seek() but the file has a length of 0 > -- > 2.25.0 > > _______________________________________________ > Nouveau mailing list > Nouveau@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau