linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Narsimhulu Musini <nmusini@cisco.com>
Cc: linux-scsi@vger.kernel.org, hare@suse.de, boaz@plexistor.com,
	jthumshirn@suse.de, Sesidhar Baddela <sebaddel@cisco.com>
Subject: Re: [PATCH v7 8/9] snic:Add event tracing to capture IO events.
Date: Sat, 13 Jun 2015 09:20:28 -0700	[thread overview]
Message-ID: <1434212428.2208.7.camel@HansenPartnership.com> (raw)
In-Reply-To: <1432886649-12034-9-git-send-email-nmusini@cisco.com>

On Fri, 2015-05-29 at 01:04 -0700, Narsimhulu Musini wrote:
> +#define SNIC_TRC(_hno, _tag, d1, d2, d3, d4, d5)	\
> +	do {						\
> +		if (unlikely(snic_log_level & 0x2))	\
> +			SNIC_DBG("SnicTrace: %s %2u %2u %llx %llx %llx %llx %llx", \
> +				 (char *)__func__,	\
> +				 (u16)(_hno),		\
> +				 (u32)(_tag),		\
> +				 (u64)(d1),		\
> +				 (u64)(d2),		\
> +				 (u64)(d3),		\
> +				 (u64)(d4),		\
> +				 (u64)(d5));		\
> +	} while (0);

This one is also a fault: do { } while(0) is added to a set of
statements to make it appear to the compiler as a unit.  If you add an
extra semicolon at the end you get a hidden double semicolon which can
lead to unexpected problems.  For instance

for (SNIC_TRC(...), i=1; ...)

will cause an error.

I fixed this up too.

James



  parent reply	other threads:[~2015-06-13 16:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  8:04 [PATCH v7 0/9] snic:initial submission of snic driver for Cisco SCSI HBA Narsimhulu Musini
2015-05-29  8:04 ` [PATCH v7 1/9] snic: snic module infrastructure Narsimhulu Musini
2015-05-29 13:46   ` Hannes Reinecke
2015-05-29  8:04 ` [PATCH v7 2/9] snic:Add interrupt, resource firmware interfaces Narsimhulu Musini
2015-05-29 13:48   ` Hannes Reinecke
2015-05-29  8:04 ` [PATCH v7 3/9] snic:Add meta request, handling of meta requests Narsimhulu Musini
2015-05-29 13:51   ` Hannes Reinecke
2015-05-29  8:04 ` [PATCH v7 4/9] snic:Add snic target discovery Narsimhulu Musini
2015-05-29 13:57   ` Hannes Reinecke
2015-05-29  8:04 ` [PATCH v7 5/9] snic:add SCSI handling, AEN, and fwreset handling Narsimhulu Musini
2015-05-29 14:03   ` Hannes Reinecke
2015-05-29  8:04 ` [PATCH v7 6/9] snic:Add low level queuing interfaces Narsimhulu Musini
2015-05-29 14:05   ` Hannes Reinecke
2015-05-29  8:04 ` [PATCH v7 7/9] snic:Add sysfs entries to list stats and trace data Narsimhulu Musini
2015-05-29 14:05   ` Hannes Reinecke
2015-06-13 16:17   ` James Bottomley
2015-06-15  4:18     ` Narsimhulu Musini (nmusini)
2015-05-29  8:04 ` [PATCH v7 8/9] snic:Add event tracing to capture IO events Narsimhulu Musini
2015-05-29 14:05   ` Hannes Reinecke
2015-06-13 16:20   ` James Bottomley [this message]
2015-06-15  4:19     ` Narsimhulu Musini (nmusini)
2015-05-29  8:04 ` [PATCH v7 9/9] snic:Add Makefile, patch Kconfig, MAINTAINERS Narsimhulu Musini

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=1434212428.2208.7.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=boaz@plexistor.com \
    --cc=hare@suse.de \
    --cc=jthumshirn@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nmusini@cisco.com \
    --cc=sebaddel@cisco.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;
as well as URLs for NNTP newsgroup(s).