Netdev List
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Somnath Kotur <somnath.kotur@emulex.com>
Cc: <netdev@vger.kernel.org>, Suresh Redy <suresh.reddy@emulex.com>
Subject: Re: [PATCH net-next v3] be2net: Fix to allow get/set of debug levels in the firmware.
Date: Mon, 14 May 2012 15:29:19 +0100	[thread overview]
Message-ID: <1337005759.2550.7.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <847bec25-7806-4eaf-8a3e-2411a0c6bba9@exht1.ad.emulex.com>

On Sat, 2012-05-12 at 09:09 +0530, Somnath Kotur wrote:
[...]
> +static void be_set_msg_level(struct net_device *netdev, u32 level)
> +{
> +	struct be_adapter *adapter = netdev_priv(netdev);
> +
> +	if (lancer_chip(adapter)) {
> +		dev_err(&adapter->pdev->dev, "Operation not supported\n");
> +		return;
> +	}
> +
> +	if (adapter->msg_enable == level)
> +		return;
> +
> +	if (level & NETIF_MSG_HW != adapter->msg_enable & NETIF_MSG_HW)
> +		be_set_fw_log_level(adapter, level & NETIF_MSG_HW ?
> +			       	    FW_LOG_LEVEL_DEFAULT : FW_LOG_LEVEL_FATAL);
[...]

Oh, come on, you can't have actually tested this.  The compiler even
warns you this is probably wrong.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

      reply	other threads:[~2012-05-14 14:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-12  3:39 [PATCH net-next v3] be2net: Fix to allow get/set of debug levels in the firmware Somnath Kotur
2012-05-14 14:29 ` Ben Hutchings [this message]

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=1337005759.2550.7.camel@bwh-desktop.uk.solarflarecom.com \
    --to=bhutchings@solarflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=somnath.kotur@emulex.com \
    --cc=suresh.reddy@emulex.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