Skip to contentSkip to conversation

Staging: fsl-mc/bus: mc-bus.c: Fixed coding style issues

PATCH In review nayeem 4 participants 6 messages Aug 21, 2015 – Sep 4, 2015 Staging

lore
Share & tools
lore

nayeem

author
#0 lore raw

PATCH 1/1 Staging: fsl-mc/bus: mc-bus.c: Fixed coding style issues

Fixed coding style issues where kernel types u16,u64,u32 should be preferred over uint16_t,uint64_t,uint32_t

---
 drivers/staging/fsl-mc/bus/mc-bus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fsl-mc/bus/mc-bus.c +3 -3
index 766a659..b3a60a0 100644
@@ -209,7 +209,7 @@ EXPORT_SYMBOL_GPL(fsl_mc_driver_unregister);
 static int get_dprc_icid(struct fsl_mc_io *mc_io,
 			 int container_id, uint16_t *icid)
 {
-	uint16_t dprc_handle;
+	u16 dprc_handle;
 	struct dprc_attributes attr;
 	int error;
 
@@ -234,7 +234,7 @@ common_cleanup:
 	return error;
 }
 
-static int translate_mc_addr(uint64_t mc_addr, phys_addr_t *phys_addr)
+static int translate_mc_addr(u64 mc_addr, phys_addr_t *phys_addr)
 {
 	int i;
 	struct fsl_mc *mc = dev_get_drvdata(fsl_mc_bus_type.dev_root->parent);
@@ -600,7 +600,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
 	struct fsl_mc_io *mc_io = NULL;
 	int container_id;
 	phys_addr_t mc_portal_phys_addr;
-	uint32_t mc_portal_size;
+	u32 mc_portal_size;
 	struct mc_version mc_version;
 	struct resource res;
 
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 4 lines · nayeem

Fixed coding style issues where kernel types u16,u64,u32 should be preferred over uint16_t,uint64_t,uint32_t

This name needs to match your name in the "From:" line of your email.

Please fix up and resend.

thanks,

greg k-h

#2 lore raw

PATCH 1/1 Staging: fsl-mc/bus: mc-bus.c: Fixed coding style issues

Fixed coding style issues where kernel types u16,u64,u32 should be preferred over uint16_t,uint64_t,uint32_t

---
 drivers/staging/fsl-mc/bus/mc-bus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fsl-mc/bus/mc-bus.c +3 -3
index 766a659..b3a60a0 100644
@@ -209,7 +209,7 @@ EXPORT_SYMBOL_GPL(fsl_mc_driver_unregister);
 static int get_dprc_icid(struct fsl_mc_io *mc_io,
 			 int container_id, uint16_t *icid)
 {
-	uint16_t dprc_handle;
+	u16 dprc_handle;
 	struct dprc_attributes attr;
 	int error;
 
@@ -234,7 +234,7 @@ common_cleanup:
 	return error;
 }
 
-static int translate_mc_addr(uint64_t mc_addr, phys_addr_t *phys_addr)
+static int translate_mc_addr(u64 mc_addr, phys_addr_t *phys_addr)
 {
 	int i;
 	struct fsl_mc *mc = dev_get_drvdata(fsl_mc_bus_type.dev_root->parent);
@@ -600,7 +600,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
 	struct fsl_mc_io *mc_io = NULL;
 	int container_id;
 	phys_addr_t mc_portal_phys_addr;
-	uint32_t mc_portal_size;
+	u32 mc_portal_size;
 	struct mc_version mc_version;
 	struct resource res;
 
Signature · 1 line
1.9.1
#3 lore raw
Quoted 11 lines

-----Original Message-----
From: Nayeemahmed Badebade [mailto:[email protected]]
Sent: Friday, September 04, 2015 12:01 PM
To: [email protected]
Cc: Rivera Jose-B46482; Yoder Stuart-B08248; [email protected]; [email protected]; [email protected]
Subject: [PATCH] Staging: fsl-mc/bus: mc-bus.c: Fixed coding style issues

Fixed coding style issues where kernel types u16,u64,u32 should be preferred over uint16_t,uint64_t,uint32_t

Nayeemahmed,

Thanks for your interests in helping us clean up this coding style issue. However, doing this for all the files related to the MC bus driver (not just for one) is something that I intend to do in a future patch as part of the "Cleanup" item of our TODO list.
Doing this clean up across the board for all files is preferable than doing it just for this file in this patch.
Thanks,

German

Quoted 41 lines
---
 drivers/staging/fsl-mc/bus/mc-bus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fsl- renamed from drivers/staging/fsl-mc/bus/mc-bus.c +0 -0

mc/bus/mc-bus.c
index 766a659..b3a60a0 100644

drivers/staging/fsl-mc/bus/mc-bus.c +2 -2
@@ -209,7 +209,7 @@ EXPORT_SYMBOL_GPL(fsl_mc_driver_unregister);
 static int get_dprc_icid(struct fsl_mc_io *mc_io,
 			 int container_id, uint16_t *icid)
 {
-	uint16_t dprc_handle;
+	u16 dprc_handle;
 	struct dprc_attributes attr;
 	int error;
 
@@ -234,7 +234,7 @@ common_cleanup:
 	return error;
 }
 
-static int translate_mc_addr(uint64_t mc_addr, phys_addr_t *phys_addr)
+static int translate_mc_addr(u64 mc_addr, phys_addr_t *phys_addr)
 {
 	int i;
 	struct fsl_mc *mc = dev_get_drvdata(fsl_mc_bus_type.dev_root-
Quoted 1 line

parent);

drivers/staging/fsl-mc/bus/mc-bus.c +1 -2
@@ -600,7 +600,7 @@ static int fsl_mc_bus_probe(struct platform_device
 *pdev)
 	struct fsl_mc_io *mc_io = NULL;
 	int container_id;
 	phys_addr_t mc_portal_phys_addr;
-	uint32_t mc_portal_size;
+	u32 mc_portal_size;
 	struct mc_version mc_version;
 	struct resource res;
 
--

1.9.1

#4 lore raw
Quoted 11 lines · Jose Rivera
Quoted 11 lines

-----Original Message-----
From: Nayeemahmed Badebade [mailto:[email protected]]
Sent: Friday, September 04, 2015 12:01 PM
To: [email protected]
Cc: Rivera Jose-B46482; Yoder Stuart-B08248; [email protected]; [email protected]; [email protected]
Subject: [PATCH] Staging: fsl-mc/bus: mc-bus.c: Fixed coding style issues

Fixed coding style issues where kernel types u16,u64,u32 should be preferred over uint16_t,uint64_t,uint32_t

Quoted 8 lines

Nayeemahmed,

Thanks for your interests in helping us clean up this coding style issue. However, doing this for all the files related to the MC bus driver (not just for one) is something that I intend to do in a future patch as part of the "Cleanup" item of our TODO list.
Doing this clean up across the board for all files is preferable than doing it just for this file in this patch.

Sorry, but we never postpone a change submitted by someone just because someone says "sometime in the future we will be making much the same change". That's a sure way to kill productivity and stop developers from helping you out.

If you really wanted to make this type of change, you would have done so already, so obviously it's not a high priority. I'll take Nayeemahmed's patch.

greg k-h

#5 lore raw
Quoted 3 lines · On Fri, 2015-09-04 at 11:00 -0700, [email protected] wrote:
Quoted 2 lines · Jose Rivera
Quoted 2 lines

-----Original Message-----
From: Nayeemahmed Badebade [mailto:[email protected]]

[]

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Fixed coding style issues where kernel types u16,u64,u32 should be preferred over uint16_t,uint64_t,uint32_t

[]

Quoted 7 lines
Quoted 6 lines

Thanks for your interests in helping us clean up this coding style issue. However, doing this for all the files related to the MC bus driver (not just for one) is something that I intend to do in a future patch as part of the "Cleanup" item of our TODO list.
Doing this clean up across the board for all files is preferable than doing it just for this file in this patch.

Quoted 8 lines

Sorry, but we never postpone a change submitted by someone just because someone says "sometime in the future we will be making much the same change". That's a sure way to kill productivity and stop developers from helping you out.

If you really wanted to make this type of change, you would have done so already, so obviously it's not a high priority. I'll take Nayeemahmed's patch.

There's a problem with doing this on a file-by-file basis for a particular subsystem/driver.

Doing so can break compilation because of differences between header files and compilation units.

It's likely much better to do something like:

$ git ls-files -- drivers/staging/fsl-mc/*.[ch] | \
  xargs sed -r -i \
	-e 's/\buint(8|16|32|64)_t\b/u\1/g' \
	-e 's/\bint(8|16|32|64)_t\b/s\1/g'

then verify, compile, test, and submit the diff.