linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>,
	Chandra Seetharaman <sekharan@us.ibm.com>,
	Mike Christie <michaelc@cs.wisc.edu>
Cc: Sean Stewart <Sean.Stewart@netapp.com>,
	Bart Van Assche <bvanassche@acm.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] scsi: remove struct scsi_dh_devlist
Date: Mon, 20 Oct 2014 08:03:23 +0200	[thread overview]
Message-ID: <5444A5AB.3020008@suse.de> (raw)
In-Reply-To: <1413734404-1426-4-git-send-email-hch@lst.de>

On 10/19/2014 06:00 PM, Christoph Hellwig wrote:
> All drivers now do their own matching, so there is no more need to expose
> a device list as part of the interface.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/scsi/device_handler/scsi_dh_emc.c   | 6 ++++--
>  drivers/scsi/device_handler/scsi_dh_hp_sw.c | 6 ++++--
>  drivers/scsi/device_handler/scsi_dh_rdac.c  | 6 ++++--
>  include/scsi/scsi_device.h                  | 6 ------
>  4 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c
> index c2e26cd..800deb7 100644
> --- a/drivers/scsi/device_handler/scsi_dh_emc.c
> +++ b/drivers/scsi/device_handler/scsi_dh_emc.c
> @@ -622,7 +622,10 @@ done:
>  	return result;
>  }
>  
> -static const struct scsi_dh_devlist clariion_dev_list[] = {
> +static const struct {
> +	char *vendor;
> +	char *model;
> +} clariion_dev_list[] = {
>  	{"DGC", "RAID"},
>  	{"DGC", "DISK"},
>  	{"DGC", "VRAID"},
> @@ -653,7 +656,6 @@ static void clariion_bus_detach(struct scsi_device *sdev);
>  static struct scsi_device_handler clariion_dh = {
>  	.name		= CLARIION_NAME,
>  	.module		= THIS_MODULE,
> -	.devlist	= clariion_dev_list,
>  	.attach		= clariion_bus_attach,
>  	.detach		= clariion_bus_detach,
>  	.check_sense	= clariion_check_sense,
> diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
> index 040998c..aa40fcb 100644
> --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c
> +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
> @@ -311,7 +311,10 @@ static int hp_sw_activate(struct scsi_device *sdev,
>  	return 0;
>  }
>  
> -static const struct scsi_dh_devlist hp_sw_dh_data_list[] = {
> +static const struct {
> +	char *vendor;
> +	char *model;
> +} hp_sw_dh_data_list[] = {
>  	{"COMPAQ", "MSA1000 VOLUME"},
>  	{"COMPAQ", "HSV110"},
>  	{"HP", "HSV100"},
> @@ -343,7 +346,6 @@ static void hp_sw_bus_detach(struct scsi_device *sdev);
>  static struct scsi_device_handler hp_sw_dh = {
>  	.name		= HP_SW_NAME,
>  	.module		= THIS_MODULE,
> -	.devlist	= hp_sw_dh_data_list,
>  	.attach		= hp_sw_bus_attach,
>  	.detach		= hp_sw_bus_detach,
>  	.activate	= hp_sw_activate,
> diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
> index ef8caaa..8b09528 100644
> --- a/drivers/scsi/device_handler/scsi_dh_rdac.c
> +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
> @@ -778,7 +778,10 @@ static int rdac_check_sense(struct scsi_device *sdev,
>  	return SCSI_RETURN_NOT_HANDLED;
>  }
>  
> -static const struct scsi_dh_devlist rdac_dev_list[] = {
> +static const struct {
> +	char *vendor;
> +	char *model;
> +} rdac_dev_list[] = {
>  	{"IBM", "1722"},
>  	{"IBM", "1724"},
>  	{"IBM", "1726"},
> @@ -830,7 +833,6 @@ static void rdac_bus_detach(struct scsi_device *sdev);
>  static struct scsi_device_handler rdac_dh = {
>  	.name = RDAC_NAME,
>  	.module = THIS_MODULE,
> -	.devlist = rdac_dev_list,
>  	.prep_fn = rdac_prep_fn,
>  	.check_sense = rdac_check_sense,
>  	.attach = rdac_bus_attach,
> diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
> index fb46864..ba6c9b7 100644
> --- a/include/scsi/scsi_device.h
> +++ b/include/scsi/scsi_device.h
> @@ -201,11 +201,6 @@ struct scsi_device {
>  	unsigned long		sdev_data[0];
>  } __attribute__((aligned(sizeof(unsigned long))));
>  
> -struct scsi_dh_devlist {
> -	char *vendor;
> -	char *model;
> -};
> -
>  typedef void (*activate_complete)(void *, int);
>  struct scsi_device_handler {
>  	/* Used by the infrastructure */
> @@ -214,7 +209,6 @@ struct scsi_device_handler {
>  	/* Filled by the hardware handler */
>  	struct module *module;
>  	const char *name;
> -	const struct scsi_dh_devlist *devlist;
>  	int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *);
>  	int (*attach)(struct scsi_device *);
>  	void (*detach)(struct scsi_device *);
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes

-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

  reply	other threads:[~2014-10-20  6:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-19 15:59 device handler cleanups Christoph Hellwig
2014-10-19 15:59 ` [PATCH 1/6] scsi_dh: get module reference outside of device handler Christoph Hellwig
2014-10-20  6:01   ` Hannes Reinecke
2014-10-20  6:53     ` Christoph Hellwig
2014-10-20  8:06       ` Hannes Reinecke
2014-10-19 16:00 ` [PATCH 2/6] scsi: use container_of to get at device handler private data Christoph Hellwig
2014-10-20  6:02   ` Hannes Reinecke
2014-10-19 16:00 ` [PATCH 3/6] scsi: remove struct scsi_dh_devlist Christoph Hellwig
2014-10-20  6:03   ` Hannes Reinecke [this message]
2014-10-19 16:00 ` [PATCH 4/6] scsi: device handlers must have attach and detach methods Christoph Hellwig
2014-10-20  6:04   ` Hannes Reinecke
2014-10-19 16:00 ` [PATCH 5/6] scsi_dh_hp_sw: fix return value on failed allocation Christoph Hellwig
2014-10-20  6:04   ` Hannes Reinecke
2014-10-19 16:00 ` [PATCH 6/6] scsi: handle more device handler setup/teardown in common code Christoph Hellwig
2014-10-20  6:06   ` Hannes Reinecke
2014-10-28 17:53   ` Mike Christie
2014-10-30  9:00     ` Christoph Hellwig

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=5444A5AB.3020008@suse.de \
    --to=hare@suse.de \
    --cc=Sean.Stewart@netapp.com \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=sekharan@us.ibm.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;
as well as URLs for NNTP newsgroup(s).