From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 2/3] sd: Allow sd_print_sense_hdr to be called outside of sd.c
Date: Fri, 06 Jun 2008 15:25:20 -0400 [thread overview]
Message-ID: <yq1iqwml61r.fsf@sermon.lab.mkp.net> (raw)
sd: Allow sd_print_sense_hdr to be called outside of sd.c
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
diff -r 431a96f963a6 drivers/scsi/sd.c
--- a/drivers/scsi/sd.c Fri Apr 25 13:36:00 2008 -0400
+++ b/drivers/scsi/sd.c Fri Apr 25 13:36:39 2008 -0400
@@ -96,7 +96,6 @@
static int sd_done(struct scsi_cmnd *);
static void sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer);
static void scsi_disk_release(struct device *cdev);
-static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
static void sd_print_result(struct scsi_disk *, int);
static DEFINE_IDR(sd_index_idr);
@@ -1930,14 +1929,14 @@
module_init(init_sd);
module_exit(exit_sd);
-static void sd_print_sense_hdr(struct scsi_disk *sdkp,
- struct scsi_sense_hdr *sshdr)
+void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr)
{
sd_printk(KERN_INFO, sdkp, "");
scsi_show_sense_hdr(sshdr);
sd_printk(KERN_INFO, sdkp, "");
scsi_show_extd_sense(sshdr->asc, sshdr->ascq);
}
+EXPORT_SYMBOL(sd_print_sense_hdr);
static void sd_print_result(struct scsi_disk *sdkp, int result)
{
diff -r 431a96f963a6 drivers/scsi/sd.h
--- a/drivers/scsi/sd.h Fri Apr 25 13:36:00 2008 -0400
+++ b/drivers/scsi/sd.h Fri Apr 25 13:36:39 2008 -0400
@@ -48,6 +48,8 @@
};
#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev)
+extern void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
+
#define sd_printk(prefix, sdsk, fmt, a...) \
(sdsk)->disk ? \
sdev_printk(prefix, (sdsk)->device, "[%s] " fmt, \
next reply other threads:[~2008-06-06 19:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 19:25 Martin K. Petersen [this message]
2008-06-09 7:06 ` [PATCH 2/3] sd: Allow sd_print_sense_hdr to be called outside of sd.c Christoph Hellwig
2008-06-09 15:07 ` Martin K. Petersen
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=yq1iqwml61r.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=linux-scsi@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