linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: fsl-mc: Changed allocation types into the types that the kernel prefers
@ 2016-11-06 23:12 Shiva Kerdel
  2016-11-07 10:31 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Shiva Kerdel @ 2016-11-06 23:12 UTC (permalink / raw)
  To: German.Rivera
  Cc: stuart.yoder, gregkh, german.rivera, itai.katz, treding,
	bharat.bhushan, nipun.gupta, linux-kernel, devel, Shiva Kerdel

Fixed reports from checkpatch that pointed out that the code was not
using the preferred types of the kernel.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
---
 drivers/staging/fsl-mc/bus/dpmcp.h      | 80 ++++++++++++++++-----------------
 drivers/staging/fsl-mc/include/mc-bus.h |  4 +-
 drivers/staging/fsl-mc/include/mc.h     |  2 +-
 3 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpmcp.h b/drivers/staging/fsl-mc/bus/dpmcp.h
index fe79d4d..684c5b5 100644
--- a/drivers/staging/fsl-mc/bus/dpmcp.h
+++ b/drivers/staging/fsl-mc/bus/dpmcp.h
@@ -39,7 +39,7 @@
 struct fsl_mc_io;
 
 int dpmcp_open(struct fsl_mc_io *mc_io,
-	       uint32_t cmd_flags,
+	       u32 cmd_flags,
 	       int dpmcp_id,
 	       uint16_t *token);
 
@@ -47,7 +47,7 @@ int dpmcp_open(struct fsl_mc_io *mc_io,
 #define DPMCP_GET_PORTAL_ID_FROM_POOL (-1)
 
 int dpmcp_close(struct fsl_mc_io *mc_io,
-		uint32_t cmd_flags,
+		u32 cmd_flags,
 		uint16_t token);
 
 /**
@@ -60,16 +60,16 @@ struct dpmcp_cfg {
 };
 
 int dpmcp_create(struct fsl_mc_io	*mc_io,
-		 uint32_t		cmd_flags,
+		 u32			cmd_flags,
 		 const struct dpmcp_cfg	*cfg,
-		uint16_t		*token);
+		 uint16_t		*token);
 
 int dpmcp_destroy(struct fsl_mc_io *mc_io,
-		  uint32_t cmd_flags,
+		  u32 cmd_flags,
 		  uint16_t token);
 
 int dpmcp_reset(struct fsl_mc_io *mc_io,
-		uint32_t cmd_flags,
+		u32 cmd_flags,
 		uint16_t token);
 
 /* IRQ */
@@ -85,53 +85,53 @@ int dpmcp_reset(struct fsl_mc_io *mc_io,
  * @irq_num: A user defined number associated with this IRQ
  */
 struct dpmcp_irq_cfg {
-	     uint64_t		paddr;
-	     uint32_t		val;
+	     u64		paddr;
+	     u32		val;
 	     int		irq_num;
 };
 
 int dpmcp_set_irq(struct fsl_mc_io	*mc_io,
-		  uint32_t		cmd_flags,
-		  uint16_t		token,
-		 uint8_t		irq_index,
+		  u32			cmd_flags,
+		  u16			token,
+		  u8			irq_index,
 		  struct dpmcp_irq_cfg	*irq_cfg);
 
 int dpmcp_get_irq(struct fsl_mc_io	*mc_io,
-		  uint32_t		cmd_flags,
-		  uint16_t		token,
-		 uint8_t		irq_index,
-		 int			*type,
-		 struct dpmcp_irq_cfg	*irq_cfg);
+		  u32			cmd_flags,
+		  u16			token,
+		  u8			irq_index,
+		  int			*type,
+		  struct dpmcp_irq_cfg	*irq_cfg);
 
 int dpmcp_set_irq_enable(struct fsl_mc_io	*mc_io,
-			 uint32_t		cmd_flags,
-			 uint16_t		token,
-			uint8_t			irq_index,
-			uint8_t			en);
+			 u32			cmd_flags,
+			 u16			token,
+			 u8			irq_index,
+			 uint8_t		en);
 
 int dpmcp_get_irq_enable(struct fsl_mc_io	*mc_io,
-			 uint32_t		cmd_flags,
-			 uint16_t		token,
-			uint8_t			irq_index,
-			uint8_t			*en);
+			 u32			cmd_flags,
+			 u16			token,
+			 u8			irq_index,
+			 uint8_t		*en);
 
 int dpmcp_set_irq_mask(struct fsl_mc_io	*mc_io,
-		       uint32_t	cmd_flags,
-		       uint16_t		token,
-		      uint8_t		irq_index,
-		      uint32_t		mask);
+		       u32		cmd_flags,
+		       u16		token,
+		       u8		irq_index,
+		       uint32_t		mask);
 
 int dpmcp_get_irq_mask(struct fsl_mc_io	*mc_io,
-		       uint32_t	cmd_flags,
-		       uint16_t		token,
-		      uint8_t		irq_index,
-		      uint32_t		*mask);
+		       u32		cmd_flags,
+		       u16		token,
+		       u8		irq_index,
+		       uint32_t		*mask);
 
 int dpmcp_get_irq_status(struct fsl_mc_io	*mc_io,
-			 uint32_t		cmd_flags,
-			 uint16_t		token,
-			uint8_t			irq_index,
-			uint32_t		*status);
+			 u32			cmd_flags,
+			 u16			token,
+			 u8			irq_index,
+			 uint32_t		*status);
 
 /**
  * struct dpmcp_attr - Structure representing DPMCP attributes
@@ -146,14 +146,14 @@ struct dpmcp_attr {
 	 * @minor:	DPMCP minor version
 	 */
 	struct {
-		uint16_t major;
-		uint16_t minor;
+		u16 major;
+		u16 minor;
 	} version;
 };
 
 int dpmcp_get_attributes(struct fsl_mc_io	*mc_io,
-			 uint32_t		cmd_flags,
-			 uint16_t		token,
+			 u32			cmd_flags,
+			 u16			token,
 			struct dpmcp_attr	*attr);
 
 #endif /* __FSL_DPMCP_H */
diff --git a/drivers/staging/fsl-mc/include/mc-bus.h b/drivers/staging/fsl-mc/include/mc-bus.h
index 170684a..ff1d47e 100644
--- a/drivers/staging/fsl-mc/include/mc-bus.h
+++ b/drivers/staging/fsl-mc/include/mc-bus.h
@@ -42,8 +42,8 @@ struct msi_domain_info;
  */
 struct fsl_mc_resource_pool {
 	enum fsl_mc_pool_type type;
-	int16_t max_count;
-	int16_t free_count;
+	s16 max_count;
+	s16 free_count;
 	struct mutex mutex;	/* serializes access to free_list */
 	struct list_head free_list;
 	struct fsl_mc_bus *mc_bus;
diff --git a/drivers/staging/fsl-mc/include/mc.h b/drivers/staging/fsl-mc/include/mc.h
index f6e720e..5c3cc42 100644
--- a/drivers/staging/fsl-mc/include/mc.h
+++ b/drivers/staging/fsl-mc/include/mc.h
@@ -81,7 +81,7 @@ enum fsl_mc_pool_type {
  */
 struct fsl_mc_resource {
 	enum fsl_mc_pool_type type;
-	int32_t id;
+	s32 id;
 	void *data;
 	struct fsl_mc_resource_pool *parent_pool;
 	struct list_head node;
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Staging: fsl-mc: Changed allocation types into the types that the kernel prefers
  2016-11-06 23:12 [PATCH] Staging: fsl-mc: Changed allocation types into the types that the kernel prefers Shiva Kerdel
@ 2016-11-07 10:31 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-11-07 10:31 UTC (permalink / raw)
  To: Shiva Kerdel
  Cc: German.Rivera, devel, nipun.gupta, stuart.yoder, linux-kernel,
	german.rivera, treding, bharat.bhushan, itai.katz

On Mon, Nov 07, 2016 at 12:12:01AM +0100, Shiva Kerdel wrote:
> Fixed reports from checkpatch that pointed out that the code was not
> using the preferred types of the kernel.
> 
> Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
> ---
>  drivers/staging/fsl-mc/bus/dpmcp.h      | 80 ++++++++++++++++-----------------
>  drivers/staging/fsl-mc/include/mc-bus.h |  4 +-
>  drivers/staging/fsl-mc/include/mc.h     |  2 +-
>  3 files changed, 43 insertions(+), 43 deletions(-)
> 
> diff --git a/drivers/staging/fsl-mc/bus/dpmcp.h b/drivers/staging/fsl-mc/bus/dpmcp.h
> index fe79d4d..684c5b5 100644
> --- a/drivers/staging/fsl-mc/bus/dpmcp.h
> +++ b/drivers/staging/fsl-mc/bus/dpmcp.h
> @@ -39,7 +39,7 @@
>  struct fsl_mc_io;
>  
>  int dpmcp_open(struct fsl_mc_io *mc_io,
> -	       uint32_t cmd_flags,
> +	       u32 cmd_flags,
>  	       int dpmcp_id,
>  	       uint16_t *token);
>  
> @@ -47,7 +47,7 @@ int dpmcp_open(struct fsl_mc_io *mc_io,
>  #define DPMCP_GET_PORTAL_ID_FROM_POOL (-1)
>  
>  int dpmcp_close(struct fsl_mc_io *mc_io,
> -		uint32_t cmd_flags,
> +		u32 cmd_flags,
>  		uint16_t token);
>  
>  /**
> @@ -60,16 +60,16 @@ struct dpmcp_cfg {
>  };
>  
>  int dpmcp_create(struct fsl_mc_io	*mc_io,
> -		 uint32_t		cmd_flags,
> +		 u32			cmd_flags,
>  		 const struct dpmcp_cfg	*cfg,
> -		uint16_t		*token);
> +		 uint16_t		*token);

Why did you change the indentation of this line?

Please only do one type of thing, like change the unit32_t types to u32,
in one patch, then do the uint64_t, and then, you forgot the uint16_t
changes :(

Please fix up and make a patch series for this.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-07 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-06 23:12 [PATCH] Staging: fsl-mc: Changed allocation types into the types that the kernel prefers Shiva Kerdel
2016-11-07 10:31 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).