From: "Martin J. Bligh" <mbligh@aracnet.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: andmike@us.ibm.com, Patrick Mochel <mochel@osdl.org>,
James Bottomley <James.Bottomley@SteelEye.com>
Subject: [PATCH][RFC] fixup store_rescan_field / scsi_rescan_device
Date: Thu, 20 Mar 2003 00:12:25 -0800 [thread overview]
Message-ID: <2080000.1048147945@[10.10.2.4]> (raw)
OK, started off with this warning:
drivers/scsi/scsi_sysfs.c: In function `store_rescan_field':
drivers/scsi/scsi_sysfs.c:282: warning: implicit declaration of function `scsi_rescan_device
which is easy to fix by just adding a declaration in the header, but
store_rescan_field is expecting a return value from a void func (oops).
I made it assume 0, which *seems* reasonable giving the surrounding
code, but I'm not really familiar with this area, so would like
someone's blessing?
M.
diff -urpN -X /home/fletch/.diff.exclude virgin/drivers/scsi/scsi.h scsi_sysfs_fix/drivers/scsi/scsi.h
--- virgin/drivers/scsi/scsi.h Mon Mar 17 21:43:46 2003
+++ scsi_sysfs_fix/drivers/scsi/scsi.h Wed Mar 19 23:54:50 2003
@@ -442,6 +442,7 @@ extern void scsi_finish_command(Scsi_Cmn
extern int scsi_retry_command(Scsi_Cmnd *);
extern int scsi_attach_device(struct scsi_device *);
extern void scsi_detach_device(struct scsi_device *);
+extern void scsi_rescan_device(struct scsi_device *);
extern int scsi_get_device_flags(unsigned char *vendor, unsigned char *model);
/*
diff -urpN -X /home/fletch/.diff.exclude virgin/drivers/scsi/scsi_sysfs.c scsi_sysfs_fix/drivers/scsi/scsi_sysfs.c
--- virgin/drivers/scsi/scsi_sysfs.c Mon Mar 17 21:43:46 2003
+++ scsi_sysfs_fix/drivers/scsi/scsi_sysfs.c Thu Mar 20 00:01:13 2003
@@ -275,12 +275,13 @@ show_rescan_field (struct device *dev, c
static ssize_t
store_rescan_field (struct device *dev, const char *buf, size_t count)
{
- int ret = ENODEV;
struct scsi_device *sdev;
sdev = to_scsi_device(dev);
- if (sdev)
- ret = scsi_rescan_device(sdev);
- return ret;
+ if (sdev) {
+ scsi_rescan_device(sdev);
+ return 0;
+ } else
+ return ENODEV;
}
static DEVICE_ATTR(rescan, S_IRUGO | S_IWUSR, show_rescan_field, store_rescan_field)
reply other threads:[~2003-03-20 8:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='2080000.1048147945@[10.10.2.4]' \
--to=mbligh@aracnet.com \
--cc=James.Bottomley@SteelEye.com \
--cc=andmike@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.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
all inboxes | Powered by JetHome®