Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Wang Ming <machel@vivo.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: opensource.kernel@vivo.com
Subject: Re: [Intel-wired-lan] [PATCH v2] net:Fix an NULL vs IS_ERR() bug for debugfs_create_dir() in i40e_dbg_init()
Date: Wed, 12 Jul 2023 13:57:25 -0700	[thread overview]
Message-ID: <bdf08528-1e45-0b7a-e617-63151aa89e0d@intel.com> (raw)
In-Reply-To: <20230712121943.7597-1-machel@vivo.com>

On 7/12/2023 5:19 AM, Wang Ming wrote:

Please designate a tree for the patch (net or net-next) [1].

If you could include the driver (i40e) in the commit title as well. 
Also, a nit, but the title is a bit long, seems like it could be a bit 
more succinct.

> The debugfs_create_dir() function returns error pointers.
> It never returns NULL. Most incorrect error checks were fixed,
> but the one in i40e_dbg_init() was forgotten.
> 
> Fix the remaining error check.

As it's a fix, there should be a Fixes tag as well.

> Signed-off-by: Wang Ming <machel@vivo.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> index 9954493cd448..62497f5565c5 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> @@ -1839,7 +1839,7 @@ void i40e_dbg_pf_exit(struct i40e_pf *pf)
>   void i40e_dbg_init(void)
>   {
>   	i40e_dbg_root = debugfs_create_dir(i40e_driver_name, NULL);
> -	if (!i40e_dbg_root)
> +	if (IS_ERR(i40e_dbg_root))
>   		pr_info("init of debugfs failed\n");
>   }
>   

[1] 
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#netdev-faq
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2023-07-12 20:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 12:19 [Intel-wired-lan] [PATCH v2] net:Fix an NULL vs IS_ERR() bug for debugfs_create_dir() in i40e_dbg_init() Wang Ming
2023-07-12 20:57 ` Tony Nguyen [this message]
2023-07-13  1:15   ` [Intel-wired-lan] 回复: " 王明-软件底层技术部
2023-07-13  1:54   ` 王明-软件底层技术部

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bdf08528-1e45-0b7a-e617-63151aa89e0d@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=machel@vivo.com \
    --cc=netdev@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox