netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Malahal Naineni <malahal@us.ibm.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] qlge: call ql_core_dump() only if dump memory was allocated.
Date: Fri, 20 Sep 2013 11:08:51 -0700	[thread overview]
Message-ID: <1379700531.2301.2.camel@joe-AO722> (raw)
In-Reply-To: <1379696386-29573-1-git-send-email-malahal@us.ibm.com>

On Fri, 2013-09-20 at 11:59 -0500, Malahal Naineni wrote:
> Also changed a log message to indicate that memory was not allocated
> instead of memory not available!
[]
> diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
[]
> @@ -1274,11 +1274,13 @@ void ql_mpi_reset_work(struct work_struct *work)
>  		return;
>  	}
>  
> -	if (!ql_core_dump(qdev, qdev->mpi_coredump)) {
> -		netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n");
> -		qdev->core_is_dumped = 1;
> -		queue_delayed_work(qdev->workqueue,
> -			&qdev->mpi_core_to_log, 5 * HZ);
> +	if (qdev->mpi_coredump) {
> +		if (!ql_core_dump(qdev, qdev->mpi_coredump)) {
> +			netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n");
> +			qdev->core_is_dumped = 1;
> +			queue_delayed_work(qdev->workqueue,
> +				&qdev->mpi_core_to_log, 5 * HZ);
> +		}

This can be done without adding another indentation level

	if (qdev->mpi_coredump &&
	    !ql_core_dump(qdev, qdev->mpi_coredump)) {

  reply	other threads:[~2013-09-20 18:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20 15:30 [PATCH] qlge: call ql_core_dump() only if dump memory was allocated Malahal Naineni
2013-09-20 16:02 ` David Miller
2013-09-20 16:59   ` Malahal Naineni
2013-09-20 18:08     ` Joe Perches [this message]
2013-09-20 18:50       ` David Miller
2013-09-20 18:57       ` Malahal Naineni
2013-09-20 19:00         ` 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=1379700531.2301.2.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=malahal@us.ibm.com \
    --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).