From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Douglas Gilbert <dgilbert@interlog.com>,
Richard Sharpe <realrichardsharpe@gmail.com>,
Christoph Hellwig <hch@lst.de>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Mike Christie <michaelc@cs.wisc.edu>,
Hannes Reinecke <hare@suse.de>,
James Bottomley <James.Bottomley@suse.de>,
Greg KH <greg@kroah.com>
Subject: Re: [PATCH v2] scsi_debug: Convert to use root_device_register() and root_device_unregister()
Date: Mon, 06 Sep 2010 17:20:53 -0700 [thread overview]
Message-ID: <1283818853.556.253.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20100907001342.GB20882@core.coreip.homeip.net>
On Mon, 2010-09-06 at 17:13 -0700, Dmitry Torokhov wrote:
> On Mon, Sep 06, 2010 at 04:59:11PM -0700, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger <nab@linux-iscsi.org>
> >
> > Hi Dough and Co,
> >
> > This patch updates the scsi_debug virtual LLD to use root_device_register()
> > and root_device_unregister() from include/linux/device.h instead of device_register()
> > and device_unregister() respectively within scsi_debug_init() and scsi_debug_exit()
> > This simply involved converting the static struct device pseudo_primary into a
> > pointer that is setup by the call to root_device_register().
> >
> > This patch also contains the correct IS_ERR() conditional check of
> > root_device_register() from within scsi_debug_init().
> >
> > Thanks to Richard Sharpe and Dmitry Torokhov for their help with this item.
> >
> > Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
> > ---
> > drivers/scsi/scsi_debug.c | 27 +++++++++------------------
> > 1 files changed, 9 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> > index b02bdc6..86d483e 100644
> > --- a/drivers/scsi/scsi_debug.c
> > +++ b/drivers/scsi/scsi_debug.c
> > @@ -3207,23 +3207,14 @@ static void do_remove_driverfs_files(void)
> > driver_remove_file(&sdebug_driverfs_driver, &driver_attr_add_host);
> > }
> >
> > -static void pseudo_0_release(struct device *dev)
> > -{
> > - if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)
> > - printk(KERN_INFO "scsi_debug: pseudo_0_release() called\n");
> > -}
> > -
> > -static struct device pseudo_primary = {
> > - .init_name = "pseudo_0",
> > - .release = pseudo_0_release,
> > -};
> > +struct device *pseudo_primary;
> >
> > static int __init scsi_debug_init(void)
> > {
> > unsigned long sz;
> > int host_to_add;
> > int k;
> > - int ret;
> > + int ret = 0;
>
> Please drop this chunk, it is not needed and is dangerous WRT future
> changes to the file as I explained earlier.
As you wish..
Best,
--nab
prev parent reply other threads:[~2010-09-07 0:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 23:59 Nicholas A. Bellinger
2010-09-07 0:13 ` Dmitry Torokhov
2010-09-07 0:20 ` Nicholas A. Bellinger [this message]
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=1283818853.556.253.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=James.Bottomley@suse.de \
--cc=dgilbert@interlog.com \
--cc=dmitry.torokhov@gmail.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=greg@kroah.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=realrichardsharpe@gmail.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
all inboxes | Powered by JetHome®