Skip to contentSkip to conversation

ivtv-alsa: regression fix: remove __init from ivtv_alsa_load

RFC PATCH In review Hans Verkuil 2 participants 4 messages Feb 7, 2013

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

RFC PATCH 1/1 ivtv-alsa: regression fix: remove __init from ivtv_alsa_load

Andy,

Please review this patch. This fix probably should be fast-tracked to 3.8 and queued for stable 3.7.

ivtv-alsa kept crashing my machine every time I loaded it, and this is the cause.

Regards,

Hans

This function is called after initialization, so it should never be marked __init!

---
 drivers/media/pci/ivtv/ivtv-alsa-main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ivtv/ivtv-alsa-main.c +1 -1
index 4a221c6..e970cfa 100644
@@ -205,7 +205,7 @@ err_exit:
 	return ret;
 }
 
-static int __init ivtv_alsa_load(struct ivtv *itv)
+static int ivtv_alsa_load(struct ivtv *itv)
 {
 	struct v4l2_device *v4l2_dev = &itv->v4l2_dev;
 	struct ivtv_stream *s;
Signature · 1 line
1.7.10.4
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 39 lines · Hans Verkuil

Andy,

Please review this patch. This fix probably should be fast-tracked to 3.8 and
queued for stable 3.7.

ivtv-alsa kept crashing my machine every time I loaded it, and this is the
cause.

Regards,

Hans

This function is called after initialization, so it should never be marked
__init!

---
drivers/media/pci/ivtv/ivtv-alsa-main.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ivtv/ivtv-alsa-main.c +1 -1
index 4a221c6..e970cfa 100644
@@ -205,7 +205,7 @@ err_exit:
 	return ret;
 }
 
-static int __init ivtv_alsa_load(struct ivtv *itv)
+static int ivtv_alsa_load(struct ivtv *itv)
 {
 	struct v4l2_device *v4l2_dev = &itv->v4l2_dev;
 	struct ivtv_stream *s;
Signature · 1 line
1.7.10.4

Hans,

I concur. Now I have to check cx18 for the same problem.

Your patch looks good.

Regards,
Andy

#2 lore raw
Quoted 42 lines · On Thu February 7 2013 22:58:53 Andy Walls wrote:
Quoted 29 lines · Hans Verkuil

Andy,

Please review this patch. This fix probably should be fast-tracked to 3.8 and
queued for stable 3.7.

ivtv-alsa kept crashing my machine every time I loaded it, and this is the
cause.

Regards,

Hans

This function is called after initialization, so it should never be marked
__init!

---
drivers/media/pci/ivtv/ivtv-alsa-main.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ivtv/ivtv-alsa-main.c +0 -0
index 4a221c6..e970cfa 100644

drivers/media/pci/ivtv/ivtv-alsa-main.c err_exit: · line 211

Quoted 8 lines
drivers/media/pci/ivtv/ivtv-alsa-main.c +1 -1
@@ -205,7 +205,7 @@ err_exit:
 	return ret;
 }
 
-static int __init ivtv_alsa_load(struct ivtv *itv)
+static int ivtv_alsa_load(struct ivtv *itv)
 {
 	struct v4l2_device *v4l2_dev = &itv->v4l2_dev;
 	struct ivtv_stream *s;

Hans,

Quoted 1 line

I concur. Now I have to check cx18 for the same problem.

Hmm, there is the same problem in cx18 as well:

static int __init cx18_alsa_load(struct cx18 *cx)

Checking some more I saw that this __init annotation was added only in 3.8, both for ivtv and cx18 (so 3.7 is fine).

Ah, I see that Mauro added __init accidentally when fixing some compiler warnings in ivtv and cx18.

I'll make a pull request tomorrow morning removing the __init from ivtv_alsa_load and cx18_alsa_load and ask Mauro to fast-track this regression.

I assume I have your SoB for this?

Regards,

Hans

Quoted 9 lines

Your patch looks good.

Regards,
Andy

maintainer
#3 lore raw
Quoted 63 lines · Hans Verkuil
Quoted 5 lines · On Thu February 7 2013 22:58:53 Andy Walls wrote:
Quoted 3 lines · Hans Verkuil

Andy,

Please review this patch. This fix probably should be fast-tracked

to

Quoted 4 lines
Quoted 4 lines

3.8 and
queued for stable 3.7.

ivtv-alsa kept crashing my machine every time I loaded it, and this

is

Quoted 33 lines
Quoted 22 lines

the
cause.

Regards,

Hans

This function is called after initialization, so it should never be marked
__init!

---
drivers/media/pci/ivtv/ivtv-alsa-main.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ivtv/ivtv-alsa-main.c +0 -0
index 4a221c6..e970cfa 100644

drivers/media/pci/ivtv/ivtv-alsa-main.c err_exit: · line 211

Quoted 8 lines
drivers/media/pci/ivtv/ivtv-alsa-main.c +1 -1
@@ -205,7 +205,7 @@ err_exit:
 	return ret;
 }
 
-static int __init ivtv_alsa_load(struct ivtv *itv)
+static int ivtv_alsa_load(struct ivtv *itv)
 {
 	struct v4l2_device *v4l2_dev = &itv->v4l2_dev;
 	struct ivtv_stream *s;

Hans,

Quoted 1 line

I concur. Now I have to check cx18 for the same problem.

Hmm, there is the same problem in cx18 as well:

static int __init cx18_alsa_load(struct cx18 *cx)

Checking some more I saw that this __init annotation was added only in 3.8,
both for ivtv and cx18 (so 3.7 is fine).

Ah, I see that Mauro added __init accidentally when fixing some compiler
warnings in ivtv and cx18.

I'll make a pull request tomorrow morning removing the __init from ivtv_alsa_load
and cx18_alsa_load and ask Mauro to fast-track this regression.

Quoted 15 lines

I assume I have your SoB for this?

Regards,

Hans

Quoted 9 lines

Your patch looks good.

Regards,
Andy

Yes.

-Andy