Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp383425pxk; Thu, 17 Sep 2020 05:51:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkFWJX/hTuDBvwf7ZdQp11sdD7eV382OGLZ+Eirj/eV1abTuA3ThJwT97RE9V4+yfwGXZL X-Received: by 2002:a05:6402:10c6:: with SMTP id p6mr32920161edu.76.1600347098514; Thu, 17 Sep 2020 05:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600347098; cv=none; d=google.com; s=arc-20160816; b=Z5sKotmCFWCxxIDqk/9jaqlx4KKLFHu2FRspvBTNYV3JqIo0WLdVV95rtjGVyMvr5A thDXlgD6E+6JZwmd7CPhoK8qt6FEUZn6fMgZTgSvu8/YwqoLyH3lPedNvf+R0UMibWcI GQoSzHFV1wp+4q+EoS1FfOFXJzMrYK3KwXa1K/J4r9UDOpLT1QocyugqYDXzvqXArWFx ucfZ+BHwqrrL2pEnobf4x3XUoihLwgnWe4CiQj17IYoMdwpLzTKQP0Q6RkHcbctuMR5C GwBkJHYaemqeXoNuuRLOYSSaRyvqZhcZ0n0KyVJVdaN74C/dHu5VqDlrzLn9TQWtR2vJ 2gIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tnyYtN7DHpxfTtv9t8yS6d1FiG4i9pwlgRlvKtOFu80=; b=MPlsfTwaC/PkbsIQDz/sXNerqobmiQRLPlZHIziXkBtfptVuGTHcq/oaWOefa+FwB2 2Q63v2L9EyCLF4DL2aw9Ky8+oy/jaF1LJK6++ampspo4Ki4f+jvWNXZ9fIrn9P5S875Y ZL8ClOQrXdC9bm+uLzG1DWWX7kbMCFCgMsCDZ0l9MVfl7TpmDHdUgVtTn89y3itWcqvL dOKQqbUPAyUn3TLTYnqBX6mwtt6Qz16x8Y3krjYh8/BVv+07nT5yc8M4QZSu71h5kFiG FuS0957VJW01IFZmtvZhFkVKkkutEI3gfUXIrzrv+QsFAr3eSypkNi4ASWO36ka5ZDzr rGuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=18+JUFcl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si14286963edn.39.2020.09.17.05.51.15; Thu, 17 Sep 2020 05:51:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=18+JUFcl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727009AbgIQMuC (ORCPT + 99 others); Thu, 17 Sep 2020 08:50:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:54976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726959AbgIQMpn (ORCPT ); Thu, 17 Sep 2020 08:45:43 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 324E72087D; Thu, 17 Sep 2020 12:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600346728; bh=yLl/pMSyF/PtsAZYxQBjwirWi3CZMLMrbkZYBbZEXIs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=18+JUFclrWM6M198v1BOohp3QPPF9Vw4hmsECSXYFb0pvE43sYYUP39+ABSJ6Z4VN L3nclMUYyjWWoC9DC3NhjYQvvBMEDb2RN8eSnyx8YkPmuAvofNJ0SF8fg37nStTdZY 51dm4fDtVV4XT1P7WOMYbDrn4re6yI13vazrjNgw= Date: Thu, 17 Sep 2020 14:46:00 +0200 From: Greg Kroah-Hartman To: Laurent Pinchart Cc: linux-media@vger.kernel.org, Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: Re: [PATCH 7/7] media: usb: uvc: no need to check return value of debugfs_create functions Message-ID: <20200917124600.GA3598432@kroah.com> References: <20200818133608.462514-1-gregkh@linuxfoundation.org> <20200818133608.462514-7-gregkh@linuxfoundation.org> <20200818234719.GD2360@pendragon.ideasonboard.com> <20200917122550.GA5053@pendragon.ideasonboard.com> <20200917123426.GA3595353@kroah.com> <20200917123757.GC3969@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917123757.GC3969@pendragon.ideasonboard.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2020 at 03:37:57PM +0300, Laurent Pinchart wrote: > Hi Greg, > > On Thu, Sep 17, 2020 at 02:34:26PM +0200, Greg Kroah-Hartman wrote: > > On Thu, Sep 17, 2020 at 03:25:50PM +0300, Laurent Pinchart wrote: > > > On Wed, Aug 19, 2020 at 02:47:19AM +0300, Laurent Pinchart wrote: > > > > On Tue, Aug 18, 2020 at 03:36:08PM +0200, 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. > > > > > > > > Is there no value in warning the user that something went wrong ? Silent > > > > failures are harder to debug. > > > > > > Could yous share your opinion about this ? > > > > For debugfs, this isn't an issue, what can a user do with something like > > "debugfs isn't working? What does that mean???" > > > > And if we _really_ want warnings like this, it should go into the > > debugfs core, not require this to be done for every debugfs user, right? > > > > debugfs is just there for kernel developers to help debug things, it's > > not a dependancy on any userspace functionality, so if it works or not > > should not be an issue for any user. > > > > Unless that user is a kernel developer of course :) > > Exactly my point :-) > > I'm fine moving the error message to the debugfs core itself instead of > duplicating it in drivers. Maybe it's already there though, I haven't > checked. Not printing any message isn't a great idea in my opinion, it > makes debugging more difficult. I can't count the number of times where > I've had to add printk's and recompile the kernel to debug issues that > really should have generated at least a dev_dbg(). There are a lot of error messages that debugfs will print out if it can not create a file: inode.c 329 pr_err("Unable to pin filesystem for file '%s'\n", name); inode.c 348 pr_err("Directory '%s' with parent '%s' already present!\n", inode.c 351 pr_err("File '%s' in directory '%s' already present!\n", inode.c 402 pr_err("out of free dentries, can not create file '%s'\n", inode.c 563 pr_err("out of free dentries, can not create directory '%s'\n", inode.c 610 pr_err("out of free dentries, can not create automount '%s'\n", inode.c 668 pr_err("out of free dentries, can not create symlink '%s'\n", So I think you are safe here. If we are missing any, I'll gladly add them. Also given that you've never noticed this being a real error, means it's probably not an issue :) thanks, greg k-h