Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp380446pxk; Thu, 17 Sep 2020 05:46:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjV7Wawf48aiT2gzzUQ6HlW/jmgLmppbmomi4PnIK7d2TxMeDngcZuLGDFsGrup6nq7z/0 X-Received: by 2002:a05:6402:17fc:: with SMTP id t28mr32775642edy.244.1600346767128; Thu, 17 Sep 2020 05:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600346767; cv=none; d=google.com; s=arc-20160816; b=ucdnSZlvokbyXWiOrzzW6Saw7Sxd6YLHEOZtxznT7Rocp4E92tHlFd50aGlXZY3NgB 5B85PVDsOo17YvDWdbci57bhiu1P7riBA11Mb0bsd1DdnTFT9qxV15Mq2v0mWoG0hFGl kgDn087jpkMkh2TzzdAfnyHSGLwJN1PKnQTIH/8Y0RT5CLdYGVBNXmj0cQapX1O5ZZOu LEgWyUN20v+F4R996tl4CiaV3udcdTW5vGPhU1UgoBJs0Xc6Y9yAx3t73Fa5Lbu15pdv U4E5t4iQbOC7Ta2+K5gnqnn3WqJwHtgoxESlZ14sVpIdUyXuq8OfXkzBf3toibU7haBY I3EA== 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=UJ6k2oJLvEAzkJJbvnjVbO2SulkQPRFsQWnhgt58Ivs=; b=U7seCPZmUYmsPZHTgJRbxmcfRZ7+syUOvDXcgVIIw2s0qmfmX+xj8/GQRu7fU/ykVI 19Mz3d6u+dGJ6IH5adDNvNpvzatW6Hf3K//GgAg9j0UIbFoMC4R3SS91KVqDZYUoAUGZ 2IRO0jzcXj8jez+C4H/YxNPE+MS4lo3kbY61FPEgBd9GG/heE2kDM+t5zdhspea8i9Pk 0qm9B2yTz4JPmIXmiKn4/ezDwzoH69MrTlnm7JEXeOAumAK9ktfSsc3oNXgQL0vCQ78T 3yj4jf1KRLiGKPTig97KES4Zk4r6Lf7yCTtsAGCDOzyAL26a3SpkLBr1vvy7BoF9Bld8 PtAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="sZq8B/Xu"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si14176659eds.366.2020.09.17.05.45.43; Thu, 17 Sep 2020 05:46:07 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b="sZq8B/Xu"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727047AbgIQMma (ORCPT + 99 others); Thu, 17 Sep 2020 08:42:30 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:47880 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbgIQMie (ORCPT ); Thu, 17 Sep 2020 08:38:34 -0400 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C181F2DB; Thu, 17 Sep 2020 14:38:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600346306; bh=s9KoUx1z44jLuwvlrdTyTpwp14U8lri6GxDBZu338BM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sZq8B/Xudj93Nt9/BGIHl6RtqbYqRrhrA+muJ3CsgZQcJBK2FFw5A/Q5QWM+Vcr0U k/DCkNeLOA43CiHeN/M6umskEigyfpx4dvH0hneZKKkj1ZUXnjZley8RzRAKhe4H9f YM62ecKT5FY1qnNcc06Qq6uZNUboTPagxM/gv5MU= Date: Thu, 17 Sep 2020 15:37:57 +0300 From: Laurent Pinchart To: Greg Kroah-Hartman 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: <20200917123757.GC3969@pendragon.ideasonboard.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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200917123426.GA3595353@kroah.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(). -- Regards, Laurent Pinchart