All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Staging: rtl8723bs: Avoid typedefs for structure
@ 2019-04-19 11:12 Bhanusree Pola
  2019-04-19 11:20 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Bhanusree Pola @ 2019-04-19 11:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, devel

Avoid typedefs for structure types to maintain kernel coding style.
Remove typedefs for _ODM_Phy_Dbg_Info and _ODM_Mac_Status_Info_.
This part is done by the following semantic patch:

<smpl>
@r1@
identifier i;
type t;
@@
typedef struct i {
...
}t;

@r2@
type r1.t;
identifier v;
@@
t v;

@script:python match@
i << r1.i;
x;
@@
coccinelle.x = i;

@r4@
identifier match.x;
type r1.t;
@@
- typedef struct x
+ struct x
{ ... }
- t
;

@r5@
type r1.t;
identifier r2.v, match.x;
@@
- t v;
+ struct x v;
</smpl>

Change Structure name _ODM_Phy_Dbg_Info and _ODM_Mac_Status_Info_ to maintain Linux kernel Coding Style.
Replace occurences of ODM_PHY_DBG_INFO_T to odm_phy_dbg_info and ODM_MAC_INFO to odm_mac_status_info.

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
---
v2:
 Changed the occurence of (ODM_MAC_INFO *) to (struct odm_mac_status_info *) in the commented code

 drivers/staging/rtl8723bs/hal/odm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm.c b/drivers/staging/rtl8723bs/hal/odm.c
index 7de5161..9db9f17 100644
--- a/drivers/staging/rtl8723bs/hal/odm.c
+++ b/drivers/staging/rtl8723bs/hal/odm.c
@@ -691,7 +691,7 @@ void ODM_CmnInfoHook(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, void *pValue)
 	/* break; */
 
 	/* case ODM_CMNINFO_MAC_STATUS: */
-	/* pDM_Odm->pMacInfo = (ODM_MAC_INFO *)pValue; */
+	/* pDM_Odm->pMacInfo = (struct odm_mac_status_info *)pValue; */
 	/* break; */
 	/* To remove the compiler warning, must add an empty default statement to handle the other values. */
 	default:
-- 
2.7.4


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

* Re: [PATCH v2] Staging: rtl8723bs: Avoid typedefs for structure
  2019-04-19 11:12 [PATCH v2] Staging: rtl8723bs: Avoid typedefs for structure Bhanusree Pola
@ 2019-04-19 11:20 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2019-04-19 11:20 UTC (permalink / raw)
  To: Bhanusree Pola; +Cc: devel, linux-kernel

On Fri, Apr 19, 2019 at 04:42:56PM +0530, Bhanusree Pola wrote:
> Avoid typedefs for structure types to maintain kernel coding style.
> Remove typedefs for _ODM_Phy_Dbg_Info and _ODM_Mac_Status_Info_.
> This part is done by the following semantic patch:
> 
> <smpl>
> @r1@
> identifier i;
> type t;
> @@
> typedef struct i {
> ...
> }t;
> 
> @r2@
> type r1.t;
> identifier v;
> @@
> t v;
> 
> @script:python match@
> i << r1.i;
> x;
> @@
> coccinelle.x = i;
> 
> @r4@
> identifier match.x;
> type r1.t;
> @@
> - typedef struct x
> + struct x
> { ... }
> - t
> ;
> 
> @r5@
> type r1.t;
> identifier r2.v, match.x;
> @@
> - t v;
> + struct x v;
> </smpl>
> 
> Change Structure name _ODM_Phy_Dbg_Info and _ODM_Mac_Status_Info_ to maintain Linux kernel Coding Style.
> Replace occurences of ODM_PHY_DBG_INFO_T to odm_phy_dbg_info and ODM_MAC_INFO to odm_mac_status_info.
> 
> Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
> ---
> v2:
>  Changed the occurence of (ODM_MAC_INFO *) to (struct odm_mac_status_info *) in the commented code
> 
>  drivers/staging/rtl8723bs/hal/odm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/odm.c b/drivers/staging/rtl8723bs/hal/odm.c
> index 7de5161..9db9f17 100644
> --- a/drivers/staging/rtl8723bs/hal/odm.c
> +++ b/drivers/staging/rtl8723bs/hal/odm.c
> @@ -691,7 +691,7 @@ void ODM_CmnInfoHook(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, void *pValue)
>  	/* break; */
>  
>  	/* case ODM_CMNINFO_MAC_STATUS: */
> -	/* pDM_Odm->pMacInfo = (ODM_MAC_INFO *)pValue; */
> +	/* pDM_Odm->pMacInfo = (struct odm_mac_status_info *)pValue; */
>  	/* break; */
>  	/* To remove the compiler warning, must add an empty default statement to handle the other values. */
>  	default:

This patch doesn't really do anything at all, right?

Are you sure you included the correct patch?

thanks,

greg k-h

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

end of thread, other threads:[~2019-04-19 18:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19 11:12 [PATCH v2] Staging: rtl8723bs: Avoid typedefs for structure Bhanusree Pola
2019-04-19 11:20 ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.