From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [PATCH net-next v3] rocker: add debugfs support to dump internal tables Date: Tue, 18 Aug 2015 09:52:49 +0200 Message-ID: <20150818075249.GC2200@nanopsycho.orion> References: <1439850977-31079-1-git-send-email-sfeldma@gmail.com> <20150818055555.GA2200@nanopsycho.orion> <20150818064829.GB2200@nanopsycho.orion> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Netdev To: Scott Feldman Return-path: Received: from mail-wi0-f179.google.com ([209.85.212.179]:35435 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751282AbbHRHww (ORCPT ); Tue, 18 Aug 2015 03:52:52 -0400 Received: by wicne3 with SMTP id ne3so88027768wic.0 for ; Tue, 18 Aug 2015 00:52:51 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Tue, Aug 18, 2015 at 09:21:15AM CEST, sfeldma@gmail.com wrote: >On Mon, Aug 17, 2015 at 11:48 PM, Jiri Pirko wrote: >> Tue, Aug 18, 2015 at 08:14:48AM CEST, sfeldma@gmail.com wrote: >>>On Mon, Aug 17, 2015 at 10:55 PM, Jiri Pirko wrote: >>>> Tue, Aug 18, 2015 at 12:36:17AM CEST, sfeldma@gmail.com wrote: >>>>>From: Scott Feldman >>>> >>>> >>>> >>>>>+ rocker->dbg_dir = debugfs_create_dir(dbg_dir_name, rocker_dbg_root); >>>>>+ if (!rocker->dbg_dir) >>>> >>>> You still check the retval here and >>> >>>It's OK. See include/linux/debugfs.h when CONFIG_DEBUG_FS=n. >>>debugfs_create_dir() returns ERR_PTR(-ENODEV), which is !NULL. >> >> Does not make sense to check it for NULL then. It is never NULL... > >It can be NULL when CONFIG_DEBUG_FS=y. You are right, this inconsistency looks odd to me though. Anyway, Acked-by: Jiri Pirko