Skip to contentSkip to conversation

scsi: add __init/__exit macros to ibmvstgt.c

PATCH In review [email protected] 4 participants 5 messages Dec 22, 2009 – Dec 31, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/19 scsi: add __init/__exit macros to ibmvstgt.c

From: Peter Huewe <[email protected]>

Add the __init and __exit macros to the module_init / module_exit functions from drivers/scsi/ibmvscsi/ibmvstgt.c

---

 drivers/scsi/ibmvscsi/ibmvstgt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ibmvscsi/ibmvstgt.c renamed from drivers/scsi/ibmvscsi/ibmvstgt.c~scsi-add-__init-__exit-macros-to-ibmvstgtc +2 -2
diff -puN drivers/scsi/ibmvscsi/ibmvstgt.c~scsi-add-__init-__exit-macros-to-ibmvstgtc drivers/scsi/ibmvscsi/ibmvstgt.c
@@ -955,7 +955,7 @@ static struct srp_function_template ibmv
 	.it_nexus_response = ibmvstgt_it_nexus_response,
 };
 
-static int ibmvstgt_init(void)
+static int __init ibmvstgt_init(void)
 {
 	int err = -ENOMEM;
 
@@ -986,7 +986,7 @@ release_transport:
 	return err;
 }
 
-static void ibmvstgt_exit(void)
+static void __exit ibmvstgt_exit(void)
 {
 	printk("Unregister IBM virtual SCSI driver\n");
 

_

#1 lore raw

Am Dienstag 22 Dezember 2009 01:27:38 schrieb [email protected]:

Quoted 38 lines

From: Peter Huewe <[email protected]>

Add the __init and __exit macros to the module_init / module_exit functions from drivers/scsi/ibmvscsi/ibmvstgt.c

---

 drivers/scsi/ibmvscsi/ibmvstgt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN
drivers/scsi/ibmvscsi/ibmvstgt.c~scsi-add-__init-__exit-macros-to-ibmvstgt
c drivers/scsi/ibmvscsi/ibmvstgt.c ---
a/drivers/scsi/ibmvscsi/ibmvstgt.c~scsi-add-__init-__exit-macros-to-ibmvst
gtc +++ a/drivers/scsi/ibmvscsi/ibmvstgt.c

drivers/scsi/ibmvscsi/ibmvstgt.c renamed from drivers/scsi/ibmvscsi/ibmvstgt.c~scsi-add-__init-__exit-macros-to-ibmvstgtc +2 -2
@@ -955,7 +955,7 @@ static struct srp_function_template ibmv
 	.it_nexus_response = ibmvstgt_it_nexus_response,
 };
 
-static int ibmvstgt_init(void)
+static int __init ibmvstgt_init(void)
 {
 	int err = -ENOMEM;
 
@@ -986,7 +986,7 @@ release_transport:
 	return err;
 }
 
-static void ibmvstgt_exit(void)
+static void __exit ibmvstgt_exit(void)
 {
 	printk("Unregister IBM virtual SCSI driver\n");
 
Quoted 2 lines

_

Hi,

this patch is floating around for almost half a year (2009/06/23) and I was wondering if there is anything wrong with it, or why it doesn't get merged upstream.

I know the patch is really trivial and maybe not even worth this email, but in my opinion every single line counts :)

@James: Do you prefer if Jiri Kosina merges this one through his trivial tree?

Thanks,
Peter

#2 lore raw
Quoted 39 lines · Peter Huewe

Am Dienstag 22 Dezember 2009 01:27:38 schrieb [email protected]:

Quoted 38 lines

From: Peter Huewe <[email protected]>

Add the __init and __exit macros to the module_init / module_exit functions from drivers/scsi/ibmvscsi/ibmvstgt.c

---

 drivers/scsi/ibmvscsi/ibmvstgt.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN
drivers/scsi/ibmvscsi/ibmvstgt.c~scsi-add-__init-__exit-macros-to-ibmvstgt
c drivers/scsi/ibmvscsi/ibmvstgt.c ---
a/drivers/scsi/ibmvscsi/ibmvstgt.c~scsi-add-__init-__exit-macros-to-ibmvst
gtc +++ a/drivers/scsi/ibmvscsi/ibmvstgt.c

drivers/scsi/ibmvscsi/ibmvstgt.c renamed from drivers/scsi/ibmvscsi/ibmvstgt.c~scsi-add-__init-__exit-macros-to-ibmvstgtc +2 -2
@@ -955,7 +955,7 @@ static struct srp_function_template ibmv
 	.it_nexus_response = ibmvstgt_it_nexus_response,
 };
 
-static int ibmvstgt_init(void)
+static int __init ibmvstgt_init(void)
 {
 	int err = -ENOMEM;
 
@@ -986,7 +986,7 @@ release_transport:
 	return err;
 }
 
-static void ibmvstgt_exit(void)
+static void __exit ibmvstgt_exit(void)
 {
 	printk("Unregister IBM virtual SCSI driver\n");
 
Quoted 8 lines
Quoted 2 lines

_

Hi,

this patch is floating around for almost half a year (2009/06/23) and I was wondering if there is anything wrong with it, or why it doesn't get merged upstream.

well, it still has to be tested. I'd guess IBM is putting out other fires, since it's really just cosmetic, even in terms of memory savings.

Quoted 2 lines

I know the patch is really trivial and maybe not even worth this email, but in my opinion every single line counts :)

Unfortunately, a significant number of problems tend to come via "trivial" patches, so I'd like someone who knows the driver to look at it.

Quoted 1 line

@James: Do you prefer if Jiri Kosina merges this one through his trivial tree?

It's not really my call ... it's Brian's

James

#3 lore raw
Quoted 7 lines · On Tue, 22 Dec 2009 10:46:44 -0600 James Bottomley <[email protected]>…
Quoted 4 lines

this patch is floating around for almost half a year (2009/06/23) and I was wondering if there is anything wrong with it, or why it doesn't get merged upstream.

well, it still has to be tested. I'd guess IBM is putting out other fires, since it's really just cosmetic, even in terms of memory savings.

James, this is pathetic. Why not just read the darned code for eighteen seconds? You can see that the patch is correct and safe - you don't have to wait for some rigor-mortis-maintainer to read it for you.

#4 lore raw
In reply to James Bottomley
Quoted 10 lines · James Bottomley
Quoted 5 lines · Peter Huewe

Am Dienstag 22 Dezember 2009 01:27:38 schrieb [email protected]:
[ ... ]
this patch is floating around for almost half a year (2009/06/23) and I was wondering if there is anything wrong with it, or why it doesn't get merged upstream.

well, it still has to be tested.  I'd guess IBM is putting out other fires, since it's really just cosmetic, even in terms of memory savings.

I'm not sure that's a valid reason for holding up ibmvscsi patches. If IBM not having time to retest ibmvscsi was a valid reason for blocking ibmvscsi patches, then all patches that touch any kernel subsystem used by ibmvscsi should be rejected. Examples of subsystems used by ibmvscsi are libsrp and kfifo.

By the way, srp_iu_pool_alloc() in libsrp passes max * sizeof(void *) to the size argument of kfifo_init(), and kfifo_init() tests the size argument as follows:

BUG_ON(!is_power_of_2(size));

The function srp_iu_pool_alloc() in libsrp neither verifies that 'max' is a power of two nor rounds up 'max' to the next power of two. Doesn't look very good ...

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html