Skip to contentSkip to conversation

staging:lustre:obdclass:linux:convert &foo[0] to foo

PATCH In review Bhumika Goyal 2 participants 2 messages Jan 20, 2016 – Feb 3, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging:lustre:obdclass:linux:convert &foo[0] to foo

Replace &foo[0] with foo,to follow Linux coding style.

---
 drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +4 -4
index 11fe6cb..ecc2897 100644
@@ -130,22 +130,22 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg)
 	}
 
 	if (data->ioc_inllen1) {
-		data->ioc_inlbuf1 = &data->ioc_bulk[0];
+		data->ioc_inlbuf1 = data->ioc_bulk;
 		offset += cfs_size_round(data->ioc_inllen1);
 	}
 
 	if (data->ioc_inllen2) {
-		data->ioc_inlbuf2 = &data->ioc_bulk[0] + offset;
+		data->ioc_inlbuf2 = data->ioc_bulk + offset;
 		offset += cfs_size_round(data->ioc_inllen2);
 	}
 
 	if (data->ioc_inllen3) {
-		data->ioc_inlbuf3 = &data->ioc_bulk[0] + offset;
+		data->ioc_inlbuf3 = data->ioc_bulk + offset;
 		offset += cfs_size_round(data->ioc_inllen3);
 	}
 
 	if (data->ioc_inllen4)
-		data->ioc_inlbuf4 = &data->ioc_bulk[0] + offset;
+		data->ioc_inlbuf4 = data->ioc_bulk + offset;
 
 	return 0;
 
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 1 line · Bhumika Goyal

Replace &foo[0] with foo,to follow Linux coding style.

That's a coding style change? Why? They aren't always the same thing...

thanks,

greg k-h