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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 11692C433FF for ; Mon, 12 Aug 2019 19:01:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D400F20684 for ; Mon, 12 Aug 2019 19:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565636492; bh=Cs2oMB53k2wKFOnhQE2Y5U59oiCCpOdSLCO/UYkCXgI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=JkOfqSXTWqoN775KSsTyV0ZWgF7khmkYBBKd+n8IDnseIZPzSqqVP4IiJksGnnVP8 lfbui3uF2KT0XV9yc+qlpa2yTpcfBE1SbXptAJgVlzRgPUl4/RF2ffefZO2s2/+3Hs QDtGdLYG0d+wSC/dlNvMuyih6clrxp/z8HeAlNL4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726604AbfHLTBb (ORCPT ); Mon, 12 Aug 2019 15:01:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:44948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726510AbfHLTBb (ORCPT ); Mon, 12 Aug 2019 15:01:31 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 82EB320679; Mon, 12 Aug 2019 19:01:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565636491; bh=Cs2oMB53k2wKFOnhQE2Y5U59oiCCpOdSLCO/UYkCXgI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RGkzINWGORCuiHLQtyEKzlojXFUxhSn0iYYWnnbJzP8P914Z6srb0Tiy6Xwh9+8tF 0K/cr0Ni1p9QWLZ9rD6885rpwvMC7jNTGbdCmwX7F2b+8oL28AA5sIGs8Jlmi/b+EZ 3nyw6LcN3jQAUODuTnwIUkFHo2UVUSdIwdUbAVVc= Date: Mon, 12 Aug 2019 21:01:28 +0200 From: Greg Kroah-Hartman To: Nick Desaulniers Cc: netdev@vger.kernel.org, "David S. Miller" , Maxime Chevallier , Nathan Huckleberry Subject: Re: [PATCH v3 13/17] mvpp2: no need to check return value of debugfs_create functions Message-ID: <20190812190128.GB14905@kroah.com> References: <20190810101732.26612-1-gregkh@linuxfoundation.org> <20190810101732.26612-14-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Aug 12, 2019 at 10:55:51AM -0700, Nick Desaulniers wrote: > On Sat, Aug 10, 2019 at 3:17 AM 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. > > Maybe adding this recommendation to the comment block above the > definition of debugfs_create_dir() in fs/debugfs/inode.c would help > prevent this issue in the future? What failure means, and how to > proceed can be tricky; more documentation can only help in this > regard. If it was there, would you have read it? :) I'll add it to the list for when I revamp the debugfs documentation that is already in the kernel, that very few people actually read... thanks, greg k-h