All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] scsi: remove usage of proc_name from scsi_host_alloc
@ 2005-11-13 16:17 Stefan Richter
  2005-11-13 16:42 ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Richter @ 2005-11-13 16:17 UTC (permalink / raw)
  To: linux-scsi

scsi_host_alloc: use host template's .name instead of .proc_name in order to
restrict usage of .proc_name to procfs and sysfs

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
 drivers/scsi/hosts.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.14-git3/drivers/scsi/hosts.c.orig	2005-10-31 12:27:21.000000000 +0100
+++ linux-2.6.14-git3/drivers/scsi/hosts.c	2005-11-13 16:06:26.000000000 +0100
@@ -301,7 +301,7 @@ struct Scsi_Host *scsi_host_alloc(struct
 				"ERROR: This is not a safe way to run your "
 				        "SCSI host\n"
 				"ERROR: The error handling must be added to "
-				"this driver\n", sht->proc_name);
+				"this driver\n", sht->name);
 		dump_stack();
         }
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/4] scsi: remove usage of proc_name from scsi_host_alloc
  2005-11-13 16:17 [PATCH 2/4] scsi: remove usage of proc_name from scsi_host_alloc Stefan Richter
@ 2005-11-13 16:42 ` Christoph Hellwig
  2005-11-13 16:49   ` Stefan Richter
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2005-11-13 16:42 UTC (permalink / raw)
  To: Stefan Richter; +Cc: linux-scsi

On Sun, Nov 13, 2005 at 05:17:03PM +0100, Stefan Richter wrote:
> scsi_host_alloc: use host template's .name instead of .proc_name in order to
> restrict usage of .proc_name to procfs and sysfs

->name is not mandatory.  You may just implement ->info


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/4] scsi: remove usage of proc_name from scsi_host_alloc
  2005-11-13 16:42 ` Christoph Hellwig
@ 2005-11-13 16:49   ` Stefan Richter
  2005-11-13 16:52     ` Stefan Richter
  2005-11-13 17:07     ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Richter @ 2005-11-13 16:49 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-scsi

Christoph Hellwig wrote:
> On Sun, Nov 13, 2005 at 05:17:03PM +0100, Stefan Richter wrote:
> 
>>scsi_host_alloc: use host template's .name instead of .proc_name in order to
>>restrict usage of .proc_name to procfs and sysfs
> 
> 
> ->name is not mandatory.  You may just implement ->info

No, ->info is optional according to a current comment, and according to 
the implementation as far as I have seen.

Also, ->name is used in a number of places if some other host template 
members are not provided, i.e. it is practically mandatory.
-- 
Stefan Richter
-=====-=-=-= =-== -==-=
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/4] scsi: remove usage of proc_name from scsi_host_alloc
  2005-11-13 16:49   ` Stefan Richter
@ 2005-11-13 16:52     ` Stefan Richter
  2005-11-13 17:07     ` Christoph Hellwig
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Richter @ 2005-11-13 16:52 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-scsi

I wrote:
> Christoph Hellwig wrote:
>> ->name is not mandatory.  You may just implement ->info
> 
> No, ->info is optional according to a current comment, and according to 
> the implementation as far as I have seen.
> 
> Also, ->name is used in a number of places if some other host template 
> members are not provided, i.e. it is practically mandatory.

PS: name can be (and is) used in place of info, but info can hardly be 
used instead of name because name is shorter.
-- 
Stefan Richter
-=====-=-=-= =-== -==-=
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/4] scsi: remove usage of proc_name from scsi_host_alloc
  2005-11-13 16:49   ` Stefan Richter
  2005-11-13 16:52     ` Stefan Richter
@ 2005-11-13 17:07     ` Christoph Hellwig
  1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2005-11-13 17:07 UTC (permalink / raw)
  To: Stefan Richter; +Cc: linux-scsi

On Sun, Nov 13, 2005 at 05:49:39PM +0100, Stefan Richter wrote:
> >->name is not mandatory.  You may just implement ->info
> 
> No, ->info is optional according to a current comment, and according to 
> the implementation as far as I have seen.
> 
> Also, ->name is used in a number of places if some other host template 
> members are not provided, i.e. it is practically mandatory.

Well, the original plan was that a host implements either ->name or
->info.  The first in case the information is static and the latter in
case it's dynamic.  I think it's a bit complex and would prefer to have
just one of them long term or rather just a routine that prints a trivial
name, similar to the current ->proc_info.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-11-13 17:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-13 16:17 [PATCH 2/4] scsi: remove usage of proc_name from scsi_host_alloc Stefan Richter
2005-11-13 16:42 ` Christoph Hellwig
2005-11-13 16:49   ` Stefan Richter
2005-11-13 16:52     ` Stefan Richter
2005-11-13 17:07     ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.