netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Eli Cohen <eli@dev.mellanox.co.il>
Cc: Eli Cohen <eli@mellanox.com>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] mlx5_core: warn if no space left in alloc_4k()
Date: Mon, 4 Nov 2013 02:16:12 +0300	[thread overview]
Message-ID: <20131103231612.GS20521@mwanda> (raw)
In-Reply-To: <20131103070326.GA3051@mtldesk30>

On Sun, Nov 03, 2013 at 09:03:27AM +0200, Eli Cohen wrote:
> On Fri, Nov 01, 2013 at 01:20:44PM +0300, Dan Carpenter wrote:
> > The warning was unreachable.  In the original code, it would print the
> > line number and the function but I have added an error message.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > I haven't tested this, hopefully the warning is not annoying.
> > 
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
> > index ba816c2..cb86265 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
> > @@ -193,8 +193,8 @@ static int alloc_4k(struct mlx5_core_dev *dev, u64 *addr)
> >  	unsigned n;
> >  
> >  	if (list_empty(&dev->priv.free_list)) {
> > +		mlx5_core_warn(dev, "no available space\n");
> >  		return -ENOMEM;
> > -		mlx5_core_warn(dev, "\n");
> >  	}
> 
> What we really need to do here is silently return -ENOMEM. The list
> can be found empty on a regular basis so we don't want to flood dmesg
> with annoying messages. The statement was probably left there from a
> previous debug cycle.

Ah, ok.  Thanks for the review.  I will remove the message.

regards,
dan carpenter

  reply	other threads:[~2013-11-03 23:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 10:20 [patch -next] mlx5_core: warn if no space left in alloc_4k() Dan Carpenter
     [not found] ` <20131101102044.GB29795-dZEljifmRObu9KfB+GxooP8+0UxHXcjY@public.gmane.org>
2013-11-03  7:03   ` Eli Cohen
2013-11-03 23:16     ` Dan Carpenter [this message]
2013-11-04 22:20     ` [patch v2] mlx5_core: delete some dead code Dan Carpenter
2013-11-05 20:51       ` David Miller

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=20131103231612.GS20521@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=eli@dev.mellanox.co.il \
    --cc=eli@mellanox.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).