All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PATCH] intermediate SCSI updates
Date: Mon, 13 Oct 2008 15:20:06 -0400	[thread overview]
Message-ID: <1223925606.5566.20.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.00.0810131017030.3288@nehalem.linux-foundation.org>

On Mon, 2008-10-13 at 10:22 -0700, Linus Torvalds wrote:
> 
> On Mon, 13 Oct 2008, James Bottomley wrote:
> >
> > This represents all the pieces of SCSI which were depending on the
> > already merged block tree.
> 
> Grr. And it doesn't actually compile.
> 
>   drivers/scsi/sd.c:579:27: error: macro "sd_dif_op" passed 4 arguments, but takes just 3
>   drivers/scsi/sd.c: In function ‘sd_prep_fn’:
>   drivers/scsi/sd.c:578: error: ‘sd_dif_op’ undeclared (first use in this function)
>   drivers/scsi/sd.c:578: error: (Each undeclared identifier is reported only once
>   drivers/scsi/sd.c:578: error: for each function it appears in.)
> 
> Hmm? Was this testedt AT ALL? It can never compile unless that idiotic 
> CONFIG_BLK_DEV_INTEGRITY option is set that no sane person would set right 
> now, and which is even documented to not be enabled by default:
> 
>   If in doubt, say N.
> 
> yet it looks like it has not compiled since a commit that was put in in 
> the middle of September!
> 
> What part of "This is total untested crap" are we missing here?

OK, you caught me; I'm relying on linux-next to test randomly built
configs because I don't have a compile farm available to me where I can
test every permutation of the options (and obviously, I usually compile
with them all on to test the actual feature code).

> Yeah, I'm grumpy. I expect to not be fed shit like this. It has apparently 
> been rebased several times, and all apparently with no testing 
> what-so-ever!

Not exactly.  It has to be rebased to run as a postmerge tree, but it
does get tested by me (admittedly on my limited set of machines, which
don't include any actual devices that do block integrity) every time I
rebase.

However, does this work for you?  It fixes the problem for me.

James

---

diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h
index a92b991..75638e7 100644
--- a/drivers/scsi/sd.h
+++ b/drivers/scsi/sd.h
@@ -97,7 +97,7 @@ struct sd_dif_tuple {
        __be32 ref_tag;		/* Target LBA or indirect LBA */
 };
 
-#if defined(CONFIG_BLK_DEV_INTEGRITY)
+#ifdef CONFIG_BLK_DEV_INTEGRITY
 
 extern void sd_dif_op(struct scsi_cmnd *, unsigned int, unsigned int, unsigned int);
 extern void sd_dif_config_host(struct scsi_disk *);
@@ -106,10 +106,19 @@ extern void sd_dif_complete(struct scsi_cmnd *, unsigned int);
 
 #else /* CONFIG_BLK_DEV_INTEGRITY */
 
-#define sd_dif_op(a, b, c)			do { } while (0)
-#define sd_dif_config_host(a)			do { } while (0)
-#define sd_dif_prepare(a, b, c)			(0)
-#define sd_dif_complete(a, b)			(0)
+static inline void sd_dif_op(struct scsi_cmnd *cmd, unsigned int a, unsigned int b, unsigned int c)
+{
+}
+static inline void sd_dif_config_host(struct scsi_disk *disk)
+{
+}
+static inline int sd_dif_prepare(struct request *rq, sector_t s, unsigned int a)
+{
+	return 0;
+}
+static inline void sd_dif_complete(struct scsi_cmnd *cmd, unsigned int a)
+{
+}
 
 #endif /* CONFIG_BLK_DEV_INTEGRITY */
 


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PATCH] intermediate SCSI updates
Date: Mon, 13 Oct 2008 15:20:06 -0400	[thread overview]
Message-ID: <1223925606.5566.20.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.00.0810131017030.3288@nehalem.linux-foundation.org>

On Mon, 2008-10-13 at 10:22 -0700, Linus Torvalds wrote:
> 
> On Mon, 13 Oct 2008, James Bottomley wrote:
> >
> > This represents all the pieces of SCSI which were depending on the
> > already merged block tree.
> 
> Grr. And it doesn't actually compile.
> 
>   drivers/scsi/sd.c:579:27: error: macro "sd_dif_op" passed 4 arguments, but takes just 3
>   drivers/scsi/sd.c: In function ‘sd_prep_fn’:
>   drivers/scsi/sd.c:578: error: ‘sd_dif_op’ undeclared (first use in this function)
>   drivers/scsi/sd.c:578: error: (Each undeclared identifier is reported only once
>   drivers/scsi/sd.c:578: error: for each function it appears in.)
> 
> Hmm? Was this testedt AT ALL? It can never compile unless that idiotic 
> CONFIG_BLK_DEV_INTEGRITY option is set that no sane person would set right 
> now, and which is even documented to not be enabled by default:
> 
>   If in doubt, say N.
> 
> yet it looks like it has not compiled since a commit that was put in in 
> the middle of September!
> 
> What part of "This is total untested crap" are we missing here?

OK, you caught me; I'm relying on linux-next to test randomly built
configs because I don't have a compile farm available to me where I can
test every permutation of the options (and obviously, I usually compile
with them all on to test the actual feature code).

> Yeah, I'm grumpy. I expect to not be fed shit like this. It has apparently 
> been rebased several times, and all apparently with no testing 
> what-so-ever!

Not exactly.  It has to be rebased to run as a postmerge tree, but it
does get tested by me (admittedly on my limited set of machines, which
don't include any actual devices that do block integrity) every time I
rebase.

However, does this work for you?  It fixes the problem for me.

James

---

diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h
index a92b991..75638e7 100644
--- a/drivers/scsi/sd.h
+++ b/drivers/scsi/sd.h
@@ -97,7 +97,7 @@ struct sd_dif_tuple {
        __be32 ref_tag;		/* Target LBA or indirect LBA */
 };
 
-#if defined(CONFIG_BLK_DEV_INTEGRITY)
+#ifdef CONFIG_BLK_DEV_INTEGRITY
 
 extern void sd_dif_op(struct scsi_cmnd *, unsigned int, unsigned int, unsigned int);
 extern void sd_dif_config_host(struct scsi_disk *);
@@ -106,10 +106,19 @@ extern void sd_dif_complete(struct scsi_cmnd *, unsigned int);
 
 #else /* CONFIG_BLK_DEV_INTEGRITY */
 
-#define sd_dif_op(a, b, c)			do { } while (0)
-#define sd_dif_config_host(a)			do { } while (0)
-#define sd_dif_prepare(a, b, c)			(0)
-#define sd_dif_complete(a, b)			(0)
+static inline void sd_dif_op(struct scsi_cmnd *cmd, unsigned int a, unsigned int b, unsigned int c)
+{
+}
+static inline void sd_dif_config_host(struct scsi_disk *disk)
+{
+}
+static inline int sd_dif_prepare(struct request *rq, sector_t s, unsigned int a)
+{
+	return 0;
+}
+static inline void sd_dif_complete(struct scsi_cmnd *cmd, unsigned int a)
+{
+}
 
 #endif /* CONFIG_BLK_DEV_INTEGRITY */
 



  reply	other threads:[~2008-10-13 19:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-13 14:45 [GIT PATCH] intermediate SCSI updates James Bottomley
2008-10-13 17:22 ` Linus Torvalds
2008-10-13 17:22   ` Linus Torvalds
2008-10-13 19:20   ` James Bottomley [this message]
2008-10-13 19:20     ` James Bottomley
2008-10-13 21:22     ` Linus Torvalds
2008-10-13 22:02       ` Paul Mackerras
2008-10-13 22:22       ` Martin K. Petersen
2008-10-13 23:44       ` Stephen Rothwell
2008-10-14 12:49       ` James Bottomley
2008-10-17 15:11 ` [GIT PATCH] intermediate SCSI updates (v2) James Bottomley

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=1223925606.5566.20.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.