Staging: wlags49_h2: Fix Sparse Warning for Static Declarations in hcf.c
authorMonam Agarwal <monamagarwal123@gmail.com>
Wed, 5 Mar 2014 20:49:41 +0000 (02:19 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 22:54:15 +0000 (14:54 -0800)
This patch fixes following sparse warnings:
drivers/staging/wlags49_h2/hcf.c:253:26: warning: symbol 'cfg_drv_identity' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:262:24: warning: symbol 'cfg_drv_sup_range' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:274:31: warning: symbol 'cfg_drv_act_ranges_pri' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:291:31: warning: symbol 'cfg_drv_act_ranges_sta' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:336:31: warning: symbol 'cfg_drv_act_ranges_hsi' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:373:24: warning: symbol 'cfg_drv_act_ranges_apf' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:3103:1: warning: symbol 'calc_mic' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:3419:1: warning: symbol 'check_mic' was not declared. Should it be static?

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlags49_h2/hcf.c

index 4aac26d486f13d8e209c5e6f9cf5dfb8c0771e7e..f44d888ecd6e7946b75b8120ede4c5fedae970fd 100644 (file)
@@ -250,7 +250,7 @@ HCF_STATIC hcf_8 BASED mic_pad[8] = { 0x5A, 0, 0, 0, 0, 0, 0, 0 };      //MIC pa
 #endif // HCF_TYPE_WPA
 
 #if defined MSF_COMPONENT_ID
-CFG_IDENTITY_STRCT BASED cfg_drv_identity = {
+static CFG_IDENTITY_STRCT BASED cfg_drv_identity = {
        sizeof(cfg_drv_identity)/sizeof(hcf_16) - 1,    //length of RID
        CFG_DRV_IDENTITY,           // (0x0826)
        MSF_COMPONENT_ID,
@@ -259,7 +259,7 @@ CFG_IDENTITY_STRCT BASED cfg_drv_identity = {
        MSF_COMPONENT_MINOR_VER
 } ;
 
-CFG_RANGES_STRCT BASED cfg_drv_sup_range = {
+static CFG_RANGES_STRCT BASED cfg_drv_sup_range = {
        sizeof(cfg_drv_sup_range)/sizeof(hcf_16) - 1,   //length of RID
        CFG_DRV_SUP_RANGE,          // (0x0827)
 
@@ -271,7 +271,7 @@ CFG_RANGES_STRCT BASED cfg_drv_sup_range = {
        }}
 } ;
 
-struct CFG_RANGE3_STRCT BASED cfg_drv_act_ranges_pri = {
+static struct CFG_RANGE3_STRCT BASED cfg_drv_act_ranges_pri = {
        sizeof(cfg_drv_act_ranges_pri)/sizeof(hcf_16) - 1,  //length of RID
        CFG_DRV_ACT_RANGES_PRI,     // (0x0828)
 
@@ -288,7 +288,7 @@ struct CFG_RANGE3_STRCT BASED cfg_drv_act_ranges_pri = {
 } ;
 
 
-struct CFG_RANGE4_STRCT BASED cfg_drv_act_ranges_sta = {
+static struct CFG_RANGE4_STRCT BASED cfg_drv_act_ranges_sta = {
        sizeof(cfg_drv_act_ranges_sta)/sizeof(hcf_16) - 1,  //length of RID
        CFG_DRV_ACT_RANGES_STA,     // (0x0829)
 
@@ -333,7 +333,7 @@ struct CFG_RANGE4_STRCT BASED cfg_drv_act_ranges_sta = {
 } ;
 
 
-struct CFG_RANGE6_STRCT BASED cfg_drv_act_ranges_hsi = {
+static struct CFG_RANGE6_STRCT BASED cfg_drv_act_ranges_hsi = {
        sizeof(cfg_drv_act_ranges_hsi)/sizeof(hcf_16) - 1,  //length of RID
        CFG_DRV_ACT_RANGES_HSI,     // (0x082A)
        COMP_ROLE_ACT,
@@ -370,7 +370,7 @@ struct CFG_RANGE6_STRCT BASED cfg_drv_act_ranges_hsi = {
 } ;
 
 
-CFG_RANGE4_STRCT BASED cfg_drv_act_ranges_apf = {
+static CFG_RANGE4_STRCT BASED cfg_drv_act_ranges_apf = {
        sizeof(cfg_drv_act_ranges_apf)/sizeof(hcf_16) - 1,  //length of RID
        CFG_DRV_ACT_RANGES_APF,     // (0x082B)
 
@@ -3099,7 +3099,7 @@ hcf_service_nic( IFBP ifbp, wci_bufp bufp, unsigned int len )
 #define L   *p
 #define R   *(p+1)
 
-void
+static void
 calc_mic( hcf_32* p, hcf_32 m )
 {
 #if HCF_BIG_ENDIAN
@@ -3415,7 +3415,7 @@ calibrate( IFBP ifbp )
  *.ENDDOC                END DOCUMENTATION
  *
  ************************************************************************************************************/
-int
+static int
 check_mic( IFBP ifbp )
 {
        int     rc = HCF_SUCCESS;