Skip to contentSkip to conversation

w1: w1_ds2408.c: quite sparse noise about using plaing integer as NULL pointer

PATCH In review H Hartley Sweeten 3 participants 3 messages May 3, 2012 – May 4, 2012 W1 dallas's 1-wire bus

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 w1: w1_ds2408.c: quite sparse noise about using plaing integer as NULL pointer

NULL not 0 should be used with pointers. Just remove the offending lines since they will default to NULL anyway.

---

drivers/w1/slaves/w1_ds2408.c +0 -2
index 7c8cdb8..8e813ee 100644
@@ -332,7 +332,6 @@ static struct bin_attribute w1_f29_sysfs_bin_files[NB_SYSFS_BIN_FILES] = {
 		},
 		.size = 1,
 		.read = w1_f29_read_cond_search_mask,
-		.write = 0,
 	},
 	{
 		.attr =	{
@@ -341,7 +340,6 @@ static struct bin_attribute w1_f29_sysfs_bin_files[NB_SYSFS_BIN_FILES] = {
 		},
 		.size = 1,
 		.read = w1_f29_read_cond_search_polarity,
-		.write = 0,
 	},
 	{
 		.attr =	{
#1 lore raw
Quoted 5 lines · H Hartley Sweeten

NULL not 0 should be used with pointers. Just remove the offending lines since they will default to NULL anyway.

Looks good, thank you
Greg, please pull it into your tree or should it be forwarded to janitor list?

Signature · 1 line
	Evgeniy Polyakov
#2 lore raw
Quoted 10 lines · Evgeniy Polyakov
Quoted 5 lines · H Hartley Sweeten

NULL not 0 should be used with pointers. Just remove the offending lines since they will default to NULL anyway.

Looks good, thank you
Greg, please pull it into your tree or should it be forwarded to janitor list?

I'll take it, thanks.

greg k-h