From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB831C352A4 for ; Mon, 10 Feb 2020 08:26:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C270208C4 for ; Mon, 10 Feb 2020 08:26:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rkfXRvAX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C270208C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 007776E92B; Mon, 10 Feb 2020 08:26:04 +0000 (UTC) Received: from mail-yb1-xb42.google.com (mail-yb1-xb42.google.com [IPv6:2607:f8b0:4864:20::b42]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDE626E92B; Mon, 10 Feb 2020 08:26:03 +0000 (UTC) Received: by mail-yb1-xb42.google.com with SMTP id s35so3215235ybi.0; Mon, 10 Feb 2020 00:26:03 -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=43XyHfKAaNPwgYgkkYK63R6QsAZuOrXyeXcn4MIztAs=; b=rkfXRvAX1M5NcUKiOYmsWZO4yhj9fqUsR0uU/qr0n6Di7YYF7UzDp52ewieCrrqWaC o9ccXtoJUiQzlvlRZ+l5GLB1xhJJvulgv+rQeQjdpPVlv8ArY8dKYuqMYL2l7HF42/Mj CHRLyqiHcmFSCYN4SNVGUKrgUTQMe0ltKi+P4fqUjkFWjRS+uMpqTKxK6TW1GrYfNvEP q3FIy2BTi4BCGrzk7RflswBuTQvCWGDTm4tPNQE/0+ep/+LyP9CANT+ziHY2BYj50y5Y x93RFgB7nNci/1uxepf558zRQ+XqWepxyOjQx3xP9wAZDt0vwTEa8lV658XBCVejIB4a uJ9g== 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=43XyHfKAaNPwgYgkkYK63R6QsAZuOrXyeXcn4MIztAs=; b=X7AYBfVDNyuNxDEuAtqXSb9UEyR1EDSgqe8/skCTDcWW6Mm2m1RPuEhztktXGi2Jqp uctdDAd85pjIVt5eYKedtCTUPyzKWH9TChNo7NeNEgfwMePS6s3RnxB5MD4wRSouWo/z ad33iIsp4RhxcX+ART0yADguJ2vFoiDWHB26nxXxF31vOs7NMDWnGHU9EOQcZkIlEWFd b6mF7YeqrOv4kEJ61spEI4s/OnG72MBN2sUeohkwNJ9FL6KcUHcyI0jOz0By8YQyWF8Y tO0dx7P9MQTbSNoFtimT51243y1MuURSm5sMLPTHFf+y1FcyGRDMbYWP1zTB9D6mstE/ V7Mg== X-Gm-Message-State: APjAAAVVdZVi8aI1/3s/uR6Jt6o8opA5+PHpUq9mrCMElHrmW8R6NCC6 nRRjRaUtCJtpOxYujuzwZAngm6pil0HYgnOtpdE= X-Google-Smtp-Source: APXvYqzNFMeGOWls9djYYg/ae72pshGhzqMBjXzbXcBItVFMrqLENYfkReOiF2tOlz/wfX/QzoYuCCnsi8m4eUNbkCc= X-Received: by 2002:a25:7395:: with SMTP id o143mr299899ybc.435.1581323162995; Mon, 10 Feb 2020 00:26:02 -0800 (PST) MIME-Version: 1.0 References: <20200209105525.GA1620170@kroah.com> In-Reply-To: <20200209105525.GA1620170@kroah.com> From: Ben Skeggs Date: Mon, 10 Feb 2020 18:25:52 +1000 Message-ID: Subject: Re: [Nouveau] [PATCH] nouveau: no need to check return value of debugfs_create functions To: Greg Kroah-Hartman X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , ML nouveau , Ben Skeggs , ML dri-devel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sun, 9 Feb 2020 at 22:56, Greg Kroah-Hartman wrote: > > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. Thanks! > > Cc: Ben Skeggs > Cc: David Airlie > Cc: Daniel Vetter > Cc: dri-devel@lists.freedesktop.org > Cc: nouveau@lists.freedesktop.org > Signed-off-by: Greg Kroah-Hartman > --- > drivers/gpu/drm/nouveau/nouveau_debugfs.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c > index 080e964d49aa..d1c82fc45a68 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c > +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c > @@ -224,14 +224,10 @@ nouveau_drm_debugfs_init(struct drm_minor *minor) > struct dentry *dentry; > 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; > - } > + for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) > + debugfs_create_file(nouveau_debugfs_files[i].name, > + S_IRUGO | S_IWUSR, minor->debugfs_root, > + minor->dev, nouveau_debugfs_files[i].fops); > > drm_debugfs_create_files(nouveau_debugfs_list, > NOUVEAU_DEBUGFS_ENTRIES, > -- > 2.25.0 > > _______________________________________________ > Nouveau mailing list > Nouveau@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel