Skip to contentSkip to conversation

Staging: i4l: Return NULL instead of 0.

PATCH In review Sandhya Bankar 4 participants 5 messages Sep 17, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Staging: i4l: Return NULL instead of 0.

Return NULL instead of 0, if card with given driverId is not found.

---
Changes in v2:
* Correcting commit message

 drivers/staging/i4l/act2000/module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/i4l/act2000/module.c +1 -1
index 39a8940..6a6c911 100755
@@ -499,7 +499,7 @@ act2000_findcard(int driverid)
 			return p;
 		p = p->next;
 	}
-	return (act2000_card *) 0;
+	return NULL;
 }
 
 /*
Signature · 1 line
1.7.1
Acked-by on v2 1/1
#1 lore raw
Quoted 1 line · Sandhya Bankar

Return NULL instead of 0, if card with given driverId is not found.

Quoted 30 lines

---
Changes in v2:
* Correcting commit message

 drivers/staging/i4l/act2000/module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/i4l/act2000/module.c +1 -2
index 39a8940..6a6c911 100755
@@ -499,7 +499,7 @@ act2000_findcard(int driverid)
 			return p;
 		p = p->next;
 	}
-	return (act2000_card *) 0;
+	return NULL;
 }
 
 /*
--

1.7.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160917071702.GA16260%40sandhya.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
In reply to Sandhya Bankar
Quoted 3 lines · Sandhya Bankar

Return NULL instead of 0, if card with given driverId is not found.

Sandhya,

Not related to this patch specifically, but seems like most of the function declarations are not in kernel preferred style. They put the function type on a separate line, before the function name. (Could be that someone's already cleaned this and I'm behind in my email)

alison

Quoted 28 lines

---
Changes in v2:
* Correcting commit message

 drivers/staging/i4l/act2000/module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/i4l/act2000/module.c +1 -1
index 39a8940..6a6c911 100755
@@ -499,7 +499,7 @@ act2000_findcard(int driverid)
 			return p;
 		p = p->next;
 	}
-	return (act2000_card *) 0;
+	return NULL;
 }
 
 /*
Signature · 8 lines
1.7.1

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160917071702.GA16260%40sandhya.
For more options, visit https://groups.google.com/d/optout.
#3 lore raw
In reply to Sandhya Bankar
Quoted 3 lines · Sandhya Bankar

Return NULL instead of 0, if card with given driverId is not found.

Greg,

I was going to say something else here about there being a lot of printk's that maybe could be converted, but then I looked at the TODO file.

Quoted 3 lines
Quoted 3 lines

* The icn, pcbit and act2000 drivers are dead, remove them in 2017 after another longterm kernel has been released, just in the unlikely case someone still has this hardware.

Do you want work done on a driver that's on it's way out?

alisons

Quoted 28 lines

---
Changes in v2:
* Correcting commit message

 drivers/staging/i4l/act2000/module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/i4l/act2000/module.c +1 -1
index 39a8940..6a6c911 100755
@@ -499,7 +499,7 @@ act2000_findcard(int driverid)
 			return p;
 		p = p->next;
 	}
-	return (act2000_card *) 0;
+	return NULL;
 }
 
 /*
Signature · 8 lines
1.7.1

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160917071702.GA16260%40sandhya.
For more options, visit https://groups.google.com/d/optout.
maintainer
#4 lore raw
Quoted 11 lines · Alison Schofield
Quoted 3 lines · Sandhya Bankar

Return NULL instead of 0, if card with given driverId is not found.

Greg,

I was going to say something else here about there being a lot of printk's that maybe could be converted, but then I looked at the TODO file.

Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

* The icn, pcbit and act2000 drivers are dead, remove them in 2017 after another longterm kernel has been released, just in the unlikely case someone still has this hardware.

Do you want work done on a driver that's on it's way out?

If people want to "practice" on such a driver, it is fine with me.

thanks,

greg k-h