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=-3.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT 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 C28BAC282C3 for ; Tue, 22 Jan 2019 16:43:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F97B21019 for ; Tue, 22 Jan 2019 16:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548175437; bh=rfxfim8KsIxpsj1joBPPSaa7I6MEYhva8Dqp/zCEX28=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=D4bkyQbt+Y1FyiMqpYDSNIUMjt5ivUjfxl+Pu6b+jW8nkkvEzLvQ2+0pvDS7yJETK LDkuf8JyWjMNer24AggrMGxprU4r3OdLcS4uNfo0aZg2dBDRZ798GYgk0jtaMzecTd 9N+4MXTeRHFxMhg6eJBkZ56JZYZCOmE+DDnXXeto= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729555AbfAVQnz (ORCPT ); Tue, 22 Jan 2019 11:43:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:34026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729031AbfAVQnz (ORCPT ); Tue, 22 Jan 2019 11:43:55 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 64A3E21019; Tue, 22 Jan 2019 16:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548175434; bh=rfxfim8KsIxpsj1joBPPSaa7I6MEYhva8Dqp/zCEX28=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EmUNVi8SsFXF+TvhynBEGC+Eojjf7GI8xc7mpAzuzF5Y8I0oy7lLJOu0V0oWkJ0BM vrsSosLJN9pn1R69h4H9C0rgLf1b8sRPAFxlW/I4ixBllsndQAAE2CyEM/zk0OVS8C lEBcr4dlkVmgS25cpmwSt3fZ8uyOq07JIbCil7R8= Date: Tue, 22 Jan 2019 17:43:52 +0100 From: Greg Kroah-Hartman To: Mark Brown Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" Subject: Re: [PATCH] regmap: no need to check return value of debugfs_create functions Message-ID: <20190122164352.GA24734@kroah.com> References: <20190122152151.16139-7-gregkh@linuxfoundation.org> <20190122155606.GB7579@sirena.org.uk> <20190122160857.GD21349@kroah.com> <20190122163826.GC7579@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190122163826.GC7579@sirena.org.uk> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 22, 2019 at 04:38:26PM +0000, Mark Brown wrote: > On Tue, Jan 22, 2019 at 05:08:57PM +0100, Greg Kroah-Hartman wrote: > > On Tue, Jan 22, 2019 at 03:56:06PM +0000, Mark Brown wrote: > > > > Given that all the rest of the function is doing is further debugfs > > > operations and when it fails people trying to use the debugfs do welcome > > > some diagnostics I'm not sure that's particularly helpful. > > > The only way it will fail is if we are out of memory. And you are in a > > bigger mess then, no one cares about debugfs calls, just make them and > > move on, you should never care about the result of such a call. > > No, it also fails if there's already something with the same name in > debugfs which can happen as as a result of configuration. This gets > confusing for users, they see the debugfs files they're expecting but > the contents don't match up at all. How can you allow a duplicate name for the other regmap stuff? Will that not also cause a collision somewhere else? Anyway, if this is that big of a problem, ok, but then your code will run differently if debugfs is enabled or not, which isn't ok. Don't rely on debugfs to do your name filtering for you :) thanks, greg k-h