linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: James Bottomley <James.Bottomley@steeleye.com>,
	FUJITA Tomonori <tomof@acm.org>
Cc: linux-scsi@vger.kernel.org
Subject: git-scsi-misc build error
Date: Tue, 31 Jul 2007 15:27:32 -0700	[thread overview]
Message-ID: <20070731152732.ae8d251d.akpm@linux-foundation.org> (raw)

ERROR: "scsi_tgt_it_nexus_create" [drivers/scsi/scsi_transport_srp.ko] undefined!
ERROR: "scsi_tgt_it_nexus_destroy" [drivers/scsi/scsi_transport_srp.ko] undefined!

This bug was reported about seven times against 2.6.23-rc1-mm1's
git-scsi-target, and now it has been moved into git-scsi-misc.




From: Andrew Morton <akpm@linux-foundation.org>

- Fix this:

ERROR: "scsi_tgt_it_nexus_create" [drivers/scsi/scsi_transport_srp.ko] undefined!
ERROR: "scsi_tgt_it_nexus_destroy" [drivers/scsi/scsi_transport_srp.ko] undefined!

- Also avoid anonymous args in the function prototypes: adding the names has
  commentary value, and makes it easier to check the stubbed inline function
  against the out-of-line declaration.

Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: FUJITA Tomonori <tomof@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/scsi/scsi_tgt.h |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff -puN include/scsi/scsi_tgt.h~scsi-fix-build-for-config_scsi_tgt=n include/scsi/scsi_tgt.h
--- a/include/scsi/scsi_tgt.h~scsi-fix-build-for-config_scsi_tgt=n
+++ a/include/scsi/scsi_tgt.h
@@ -17,5 +17,20 @@ extern int scsi_tgt_tsk_mgmt_request(str
 extern struct scsi_cmnd *scsi_host_get_command(struct Scsi_Host *,
 					       enum dma_data_direction,	gfp_t);
 extern void scsi_host_put_command(struct Scsi_Host *, struct scsi_cmnd *);
-extern int scsi_tgt_it_nexus_create(struct Scsi_Host *, u64, char *);
-extern int scsi_tgt_it_nexus_destroy(struct Scsi_Host *, u64);
+
+#ifdef CONFIG_SCSI_TGT
+extern int scsi_tgt_it_nexus_create(struct Scsi_Host *shost, u64 itn_id,
+				char *initiator);
+extern int scsi_tgt_it_nexus_destroy(struct Scsi_Host *shost, u64 itn_id);
+#else
+static inline int scsi_tgt_it_nexus_create(struct Scsi_Host *shost,
+				u64 itn_id, char *initiator)
+{
+	return 0;
+}
+
+static inline int scsi_tgt_it_nexus_destroy(struct Scsi_Host *shost, u64 itn_id)
+{
+	return 0;
+}
+#endif
_


             reply	other threads:[~2007-07-31 22:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 22:27 Andrew Morton [this message]
2007-07-31 22:30 ` git-scsi-misc build error James Bottomley
2007-07-31 22:41   ` Andrew Morton
2007-07-31 22:46     ` James Bottomley
2007-08-01 22:22     ` FUJITA Tomonori

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=20070731152732.ae8d251d.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tomof@acm.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).