All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t'
@ 2017-03-12  2:29 Shiva Kerdel
  2017-03-12  2:30 ` [PATCH 2/3] Staging: ks7010: ks_hostif.*: Use preferred 'u16' kernel type over 'uint16_t' Shiva Kerdel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Shiva Kerdel @ 2017-03-12  2:29 UTC (permalink / raw)
  To: gregkh
  Cc: wsa+renesas, p.hoefflin, karniksayli1995, sabitha.george, kdunne,
	me, bhumirks, mattkilgore12, georgiana.chelu93, goudapatilk,
	mihaela.muraru21, devel, linux-kernel, Shiva Kerdel

Fix prefer kernel type 'u8' over 'uint8_t' checks.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
---
 drivers/staging/ks7010/ks_hostif.c   |   4 +-
 drivers/staging/ks7010/ks_hostif.h   | 114 +++++++++++++++++------------------
 drivers/staging/ks7010/ks_wlan_net.c |   2 +-
 3 files changed, 60 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 6522bc3d30d5..0d6bbe61131c 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -2384,8 +2384,8 @@ void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
 	struct pmk_cache_t {
 		uint16_t size;
 		struct {
-			uint8_t bssid[ETH_ALEN];
-			uint8_t pmkid[IW_PMKID_LEN];
+			u8 bssid[ETH_ALEN];
+			u8 pmkid[IW_PMKID_LEN];
 		} __packed list[PMK_LIST_MAX];
 	} __packed pmkcache;
 	struct pmk_t *pmk;
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 35bfadf4665d..be8ded44c1ac 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -72,7 +72,7 @@ struct hostif_data_request_t {
 #define TYPE_DATA 0x0000
 #define TYPE_AUTH 0x0001
 	uint16_t reserved;
-	uint8_t data[0];
+	u8 data[0];
 } __packed;
 
 struct hostif_data_indication_t {
@@ -83,14 +83,14 @@ struct hostif_data_indication_t {
 #define TYPE_GMK1 0x0002
 #define TYPE_GMK2 0x0003
 	uint16_t reserved;
-	uint8_t data[0];
+	u8 data[0];
 } __packed;
 
 #define CHANNEL_LIST_MAX_SIZE 14
 struct channel_list_t {
-	uint8_t size;
-	uint8_t body[CHANNEL_LIST_MAX_SIZE];
-	uint8_t pad;
+	u8 size;
+	u8 body[CHANNEL_LIST_MAX_SIZE];
+	u8 pad;
 } __packed;
 
 /* MIB Attribute */
@@ -154,7 +154,7 @@ struct hostif_mib_value_t {
 #define MIB_VALUE_TYPE_BOOL     2
 #define MIB_VALUE_TYPE_COUNT32  3
 #define MIB_VALUE_TYPE_OSTRING  4
-	uint8_t body[0];
+	u8 body[0];
 } __packed;
 
 struct hostif_mib_get_confirm_t {
@@ -227,32 +227,32 @@ struct hostif_start_confirm_t {
 
 #define SSID_MAX_SIZE 32
 struct ssid_t {
-	uint8_t size;
-	uint8_t body[SSID_MAX_SIZE];
-	uint8_t ssid_pad;
+	u8 size;
+	u8 body[SSID_MAX_SIZE];
+	u8 ssid_pad;
 } __packed;
 
 #define RATE_SET_MAX_SIZE 16
 struct rate_set8_t {
-	uint8_t size;
-	uint8_t body[8];
-	uint8_t rate_pad;
+	u8 size;
+	u8 body[8];
+	u8 rate_pad;
 } __packed;
 
 struct FhParms_t {
 	uint16_t dwellTime;
-	uint8_t hopSet;
-	uint8_t hopPattern;
-	uint8_t hopIndex;
+	u8 hopSet;
+	u8 hopPattern;
+	u8 hopIndex;
 } __packed;
 
 struct DsParms_t {
-	uint8_t channel;
+	u8 channel;
 } __packed;
 
 struct CfParms_t {
-	uint8_t count;
-	uint8_t period;
+	u8 count;
+	u8 period;
 	uint16_t maxDuration;
 	uint16_t durRemaining;
 } __packed;
@@ -262,27 +262,27 @@ struct IbssParms_t {
 } __packed;
 
 struct rsn_t {
-	uint8_t size;
+	u8 size;
 #define RSN_BODY_SIZE 64
-	uint8_t body[RSN_BODY_SIZE];
+	u8 body[RSN_BODY_SIZE];
 } __packed;
 
 struct ErpParams_t {
-	uint8_t erp_info;
+	u8 erp_info;
 } __packed;
 
 struct rate_set16_t {
-	uint8_t size;
-	uint8_t body[16];
-	uint8_t rate_pad;
+	u8 size;
+	u8 body[16];
+	u8 rate_pad;
 } __packed;
 
 struct ap_info_t {
-	uint8_t bssid[6];	/* +00 */
-	uint8_t rssi;	/* +06 */
-	uint8_t sq;	/* +07 */
-	uint8_t noise;	/* +08 */
-	uint8_t pad0;	/* +09 */
+	u8 bssid[6];	/* +00 */
+	u8 rssi;	/* +06 */
+	u8 sq;	/* +07 */
+	u8 noise;	/* +08 */
+	u8 pad0;	/* +09 */
 	uint16_t beacon_period;	/* +10 */
 	uint16_t capability;	/* +12 */
 #define BSS_CAP_ESS             BIT(0)
@@ -295,21 +295,21 @@ struct ap_info_t {
 #define BSS_CAP_CHANNEL_AGILITY BIT(7)
 #define BSS_CAP_SHORT_SLOT_TIME BIT(10)
 #define BSS_CAP_DSSS_OFDM       BIT(13)
-	uint8_t frame_type;	/* +14 */
-	uint8_t ch_info;	/* +15 */
+	u8 frame_type;	/* +14 */
+	u8 ch_info;	/* +15 */
 #define FRAME_TYPE_BEACON	0x80
 #define FRAME_TYPE_PROBE_RESP	0x50
 	uint16_t body_size;	/* +16 */
-	uint8_t body[1024];	/* +18 */
+	u8 body[1024];	/* +18 */
 	/* +1032 */
 } __packed;
 
 struct link_ap_info_t {
-	uint8_t bssid[6];	/* +00 */
-	uint8_t rssi;	/* +06 */
-	uint8_t sq;	/* +07 */
-	uint8_t noise;	/* +08 */
-	uint8_t pad0;	/* +09 */
+	u8 bssid[6];	/* +00 */
+	u8 rssi;	/* +06 */
+	u8 sq;	/* +07 */
+	u8 noise;	/* +08 */
+	u8 pad0;	/* +09 */
 	uint16_t beacon_period;	/* +10 */
 	uint16_t capability;	/* +12 */
 	struct rate_set8_t rate_set;	/* +14 */
@@ -318,16 +318,16 @@ struct link_ap_info_t {
 	struct CfParms_t cf_parameter;	/* +30 */
 	struct IbssParms_t ibss_parameter;	/* +36 */
 	struct ErpParams_t erp_parameter;	/* +38 */
-	uint8_t pad1;	/* +39 */
+	u8 pad1;	/* +39 */
 	struct rate_set8_t ext_rate_set;	/* +40 */
-	uint8_t DTIM_period;	/* +50 */
-	uint8_t rsn_mode;	/* +51 */
+	u8 DTIM_period;	/* +50 */
+	u8 rsn_mode;	/* +51 */
 #define RSN_MODE_NONE	0
 #define RSN_MODE_WPA	1
 #define RSN_MODE_WPA2	2
 	struct {
-		uint8_t size;	/* +52 */
-		uint8_t body[128];	/* +53 */
+		u8 size;	/* +52 */
+		u8 body[128];	/* +53 */
 	} __packed rsn;
 } __packed;
 
@@ -400,7 +400,7 @@ struct hostif_infrastructure_set2_request_t {
 #define AUTH_TYPE_SHARED_KEY  1
 	struct channel_list_t channel_list;
 	uint16_t scan_type;
-	uint8_t bssid[ETH_ALEN];
+	u8 bssid[ETH_ALEN];
 } __packed;
 
 struct hostif_infrastructure_set_confirm_t {
@@ -431,7 +431,7 @@ struct hostif_adhoc_set2_request_t {
 				 * bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
 	uint16_t scan_type;
 	struct channel_list_t channel_list;
-	uint8_t bssid[ETH_ALEN];
+	u8 bssid[ETH_ALEN];
 } __packed;
 
 struct hostif_adhoc_set_confirm_t {
@@ -440,26 +440,26 @@ struct hostif_adhoc_set_confirm_t {
 } __packed;
 
 struct last_associate_t {
-	uint8_t type;
-	uint8_t status;
+	u8 type;
+	u8 status;
 } __packed;
 
 struct association_request_t {
-	uint8_t type;
+	u8 type;
 #define FRAME_TYPE_ASSOC_REQ	0x00
 #define FRAME_TYPE_REASSOC_REQ	0x20
-	uint8_t pad;
+	u8 pad;
 	uint16_t capability;
 	uint16_t listen_interval;
-	uint8_t ap_address[6];
+	u8 ap_address[6];
 	uint16_t reqIEs_size;
 } __packed;
 
 struct association_response_t {
-	uint8_t type;
+	u8 type;
 #define FRAME_TYPE_ASSOC_RESP	0x10
 #define FRAME_TYPE_REASSOC_RESP	0x30
-	uint8_t pad;
+	u8 pad;
 	uint16_t capability;
 	uint16_t status;
 	uint16_t association_id;
@@ -476,10 +476,10 @@ struct hostif_associate_indication_t {
 
 struct hostif_bss_scan_request_t {
 	struct hostif_hdr header;
-	uint8_t scan_type;
+	u8 scan_type;
 #define ACTIVE_SCAN  0
 #define PASSIVE_SCAN 1
-	uint8_t pad[3];
+	u8 pad[3];
 	uint32_t ch_time_min;
 	uint32_t ch_time_max;
 	struct channel_list_t channel_list;
@@ -502,10 +502,10 @@ struct hostif_phy_information_request_t {
 
 struct hostif_phy_information_confirm_t {
 	struct hostif_hdr header;
-	uint8_t rssi;
-	uint8_t sq;
-	uint8_t noise;
-	uint8_t link_speed;
+	u8 rssi;
+	u8 sq;
+	u8 noise;
+	u8 link_speed;
 	uint32_t tx_frame;
 	uint32_t rx_frame;
 	uint32_t tx_error;
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index d06dfe0f6732..2b4d6c1cb037 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -2767,7 +2767,7 @@ static int ks_wlan_set_wps_probe_req(struct net_device *dev,
 				     struct iw_request_info *info,
 				     struct iw_point *dwrq, char *extra)
 {
-	uint8_t *p = extra;
+	u8 *p = extra;
 	unsigned char len;
 	struct ks_wlan_private *priv =
 	    (struct ks_wlan_private *)netdev_priv(dev);
-- 
2.12.0

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

* [PATCH 2/3] Staging: ks7010: ks_hostif.*: Use preferred 'u16' kernel type over 'uint16_t'
  2017-03-12  2:29 [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t' Shiva Kerdel
@ 2017-03-12  2:30 ` Shiva Kerdel
  2017-03-12  2:30 ` [PATCH 3/3] Staging: ks7010: ks_hostif.*: Use preferred 'u32' kernel type over 'uint32_t' Shiva Kerdel
  2017-03-12  3:00 ` [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t' Tobin C. Harding
  2 siblings, 0 replies; 6+ messages in thread
From: Shiva Kerdel @ 2017-03-12  2:30 UTC (permalink / raw)
  To: gregkh
  Cc: wsa+renesas, p.hoefflin, karniksayli1995, sabitha.george, kdunne,
	me, bhumirks, mattkilgore12, georgiana.chelu93, goudapatilk,
	mihaela.muraru21, devel, linux-kernel, Shiva Kerdel

Fix prefer kernel type 'u16' over 'uint16_t' checks.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
---
 drivers/staging/ks7010/ks_hostif.c |  20 +++---
 drivers/staging/ks7010/ks_hostif.h | 134 ++++++++++++++++++-------------------
 2 files changed, 77 insertions(+), 77 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 0d6bbe61131c..2cbb04305f33 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -509,8 +509,8 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
 	struct net_device *dev = priv->net_dev;
 	uint32_t mib_status;
 	uint32_t mib_attribute;
-	uint16_t mib_val_size;
-	uint16_t mib_val_type;
+	u16 mib_val_size;
+	u16 mib_val_type;
 
 	DPRINTK(3, "\n");
 
@@ -901,7 +901,7 @@ void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv)
 static
 void hostif_infrastructure_set_confirm(struct ks_wlan_private *priv)
 {
-	uint16_t result_code;
+	u16 result_code;
 
 	DPRINTK(3, "\n");
 	result_code = get_WORD(priv);
@@ -1364,7 +1364,7 @@ static
 void hostif_ps_adhoc_set_request(struct ks_wlan_private *priv)
 {
 	struct hostif_ps_adhoc_set_request_t *pp;
-	uint16_t capability;
+	u16 capability;
 
 	DPRINTK(3, "\n");
 
@@ -1407,7 +1407,7 @@ static
 void hostif_infrastructure_set_request(struct ks_wlan_private *priv)
 {
 	struct hostif_infrastructure_set_request_t *pp;
-	uint16_t capability;
+	u16 capability;
 
 	DPRINTK(3, "ssid.size=%d\n", priv->reg.ssid.size);
 
@@ -1473,7 +1473,7 @@ void hostif_infrastructure_set_request(struct ks_wlan_private *priv)
 static void hostif_infrastructure_set2_request(struct ks_wlan_private *priv)
 {
 	struct hostif_infrastructure_set2_request_t *pp;
-	uint16_t capability;
+	u16 capability;
 
 	DPRINTK(2, "ssid.size=%d\n", priv->reg.ssid.size);
 
@@ -1542,7 +1542,7 @@ static
 void hostif_adhoc_set_request(struct ks_wlan_private *priv)
 {
 	struct hostif_adhoc_set_request_t *pp;
-	uint16_t capability;
+	u16 capability;
 
 	DPRINTK(3, "\n");
 
@@ -1587,7 +1587,7 @@ static
 void hostif_adhoc_set2_request(struct ks_wlan_private *priv)
 {
 	struct hostif_adhoc_set2_request_t *pp;
-	uint16_t capability;
+	u16 capability;
 
 	DPRINTK(3, "\n");
 
@@ -1919,7 +1919,7 @@ struct wpa_suite_t {
 
 struct rsn_mode_t {
 	uint32_t rsn_mode;
-	uint16_t rsn_capability;
+	u16 rsn_capability;
 } __packed;
 
 static
@@ -2382,7 +2382,7 @@ static
 void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
 {
 	struct pmk_cache_t {
-		uint16_t size;
+		u16 size;
 		struct {
 			u8 bssid[ETH_ALEN];
 			u8 pmkid[IW_PMKID_LEN];
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index be8ded44c1ac..5b2120293967 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -62,27 +62,27 @@
  */
 
 struct hostif_hdr {
-	uint16_t size;
-	uint16_t event;
+	u16 size;
+	u16 event;
 } __packed;
 
 struct hostif_data_request_t {
 	struct hostif_hdr header;
-	uint16_t auth_type;
+	u16 auth_type;
 #define TYPE_DATA 0x0000
 #define TYPE_AUTH 0x0001
-	uint16_t reserved;
+	u16 reserved;
 	u8 data[0];
 } __packed;
 
 struct hostif_data_indication_t {
 	struct hostif_hdr header;
-	uint16_t auth_type;
+	u16 auth_type;
 /* #define TYPE_DATA 0x0000 */
 #define TYPE_PMK1 0x0001
 #define TYPE_GMK1 0x0002
 #define TYPE_GMK2 0x0003
-	uint16_t reserved;
+	u16 reserved;
 	u8 data[0];
 } __packed;
 
@@ -147,8 +147,8 @@ struct hostif_mib_get_request_t {
 } __packed;
 
 struct hostif_mib_value_t {
-	uint16_t size;
-	uint16_t type;
+	u16 size;
+	u16 type;
 #define MIB_VALUE_TYPE_NULL     0
 #define MIB_VALUE_TYPE_INT      1
 #define MIB_VALUE_TYPE_BOOL     2
@@ -208,12 +208,12 @@ enum {
 
 struct hostif_power_mngmt_confirm_t {
 	struct hostif_hdr header;
-	uint16_t result_code;
+	u16 result_code;
 } __packed;
 
 struct hostif_start_request_t {
 	struct hostif_hdr header;
-	uint16_t mode;
+	u16 mode;
 #define MODE_PSEUDO_ADHOC   0
 #define MODE_INFRASTRUCTURE 1
 #define MODE_AP             2	/* not used */
@@ -222,7 +222,7 @@ struct hostif_start_request_t {
 
 struct hostif_start_confirm_t {
 	struct hostif_hdr header;
-	uint16_t result_code;
+	u16 result_code;
 } __packed;
 
 #define SSID_MAX_SIZE 32
@@ -240,7 +240,7 @@ struct rate_set8_t {
 } __packed;
 
 struct FhParms_t {
-	uint16_t dwellTime;
+	u16 dwellTime;
 	u8 hopSet;
 	u8 hopPattern;
 	u8 hopIndex;
@@ -253,12 +253,12 @@ struct DsParms_t {
 struct CfParms_t {
 	u8 count;
 	u8 period;
-	uint16_t maxDuration;
-	uint16_t durRemaining;
+	u16 maxDuration;
+	u16 durRemaining;
 } __packed;
 
 struct IbssParms_t {
-	uint16_t atimWindow;
+	u16 atimWindow;
 } __packed;
 
 struct rsn_t {
@@ -283,8 +283,8 @@ struct ap_info_t {
 	u8 sq;	/* +07 */
 	u8 noise;	/* +08 */
 	u8 pad0;	/* +09 */
-	uint16_t beacon_period;	/* +10 */
-	uint16_t capability;	/* +12 */
+	u16 beacon_period;	/* +10 */
+	u16 capability;	/* +12 */
 #define BSS_CAP_ESS             BIT(0)
 #define BSS_CAP_IBSS            BIT(1)
 #define BSS_CAP_CF_POLABLE      BIT(2)
@@ -299,7 +299,7 @@ struct ap_info_t {
 	u8 ch_info;	/* +15 */
 #define FRAME_TYPE_BEACON	0x80
 #define FRAME_TYPE_PROBE_RESP	0x50
-	uint16_t body_size;	/* +16 */
+	u16 body_size;	/* +16 */
 	u8 body[1024];	/* +18 */
 	/* +1032 */
 } __packed;
@@ -310,8 +310,8 @@ struct link_ap_info_t {
 	u8 sq;	/* +07 */
 	u8 noise;	/* +08 */
 	u8 pad0;	/* +09 */
-	uint16_t beacon_period;	/* +10 */
-	uint16_t capability;	/* +12 */
+	u16 beacon_period;	/* +10 */
+	u16 capability;	/* +12 */
 	struct rate_set8_t rate_set;	/* +14 */
 	struct FhParms_t fh_parameter;	/* +24 */
 	struct DsParms_t ds_parameter;	/* +29 */
@@ -333,7 +333,7 @@ struct link_ap_info_t {
 
 struct hostif_connect_indication_t {
 	struct hostif_hdr header;
-	uint16_t connect_code;
+	u16 connect_code;
 #define RESULT_CONNECT    0
 #define RESULT_DISCONNECT 1
 	struct link_ap_info_t link_ap_info;
@@ -345,98 +345,98 @@ struct hostif_stop_request_t {
 
 struct hostif_stop_confirm_t {
 	struct hostif_hdr header;
-	uint16_t result_code;
+	u16 result_code;
 } __packed;
 
 struct hostif_ps_adhoc_set_request_t {
 	struct hostif_hdr header;
-	uint16_t phy_type;
+	u16 phy_type;
 #define D_11B_ONLY_MODE		0
 #define D_11G_ONLY_MODE		1
 #define D_11BG_COMPATIBLE_MODE	2
 #define D_11A_ONLY_MODE		3
-	uint16_t cts_mode;
+	u16 cts_mode;
 #define CTS_MODE_FALSE	0
 #define CTS_MODE_TRUE	1
-	uint16_t channel;
+	u16 channel;
 	struct rate_set16_t rate_set;
-	uint16_t capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
+	u16 capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
 				 * bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
-	uint16_t scan_type;
+	u16 scan_type;
 } __packed;
 
 struct hostif_ps_adhoc_set_confirm_t {
 	struct hostif_hdr header;
-	uint16_t result_code;
+	u16 result_code;
 } __packed;
 
 struct hostif_infrastructure_set_request_t {
 	struct hostif_hdr header;
-	uint16_t phy_type;
-	uint16_t cts_mode;
+	u16 phy_type;
+	u16 cts_mode;
 	struct rate_set16_t rate_set;
 	struct ssid_t ssid;
-	uint16_t capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
+	u16 capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
 				 * bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
-	uint16_t beacon_lost_count;
-	uint16_t auth_type;
+	u16 beacon_lost_count;
+	u16 auth_type;
 #define AUTH_TYPE_OPEN_SYSTEM 0
 #define AUTH_TYPE_SHARED_KEY  1
 	struct channel_list_t channel_list;
-	uint16_t scan_type;
+	u16 scan_type;
 } __packed;
 
 struct hostif_infrastructure_set2_request_t {
 	struct hostif_hdr header;
-	uint16_t phy_type;
-	uint16_t cts_mode;
+	u16 phy_type;
+	u16 cts_mode;
 	struct rate_set16_t rate_set;
 	struct ssid_t ssid;
-	uint16_t capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
+	u16 capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
 				 * bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
-	uint16_t beacon_lost_count;
-	uint16_t auth_type;
+	u16 beacon_lost_count;
+	u16 auth_type;
 #define AUTH_TYPE_OPEN_SYSTEM 0
 #define AUTH_TYPE_SHARED_KEY  1
 	struct channel_list_t channel_list;
-	uint16_t scan_type;
+	u16 scan_type;
 	u8 bssid[ETH_ALEN];
 } __packed;
 
 struct hostif_infrastructure_set_confirm_t {
 	struct hostif_hdr header;
-	uint16_t result_code;
+	u16 result_code;
 } __packed;
 
 struct hostif_adhoc_set_request_t {
 	struct hostif_hdr header;
-	uint16_t phy_type;
-	uint16_t cts_mode;
-	uint16_t channel;
+	u16 phy_type;
+	u16 cts_mode;
+	u16 channel;
 	struct rate_set16_t rate_set;
 	struct ssid_t ssid;
-	uint16_t capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
+	u16 capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
 				 * bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
-	uint16_t scan_type;
+	u16 scan_type;
 } __packed;
 
 struct hostif_adhoc_set2_request_t {
 	struct hostif_hdr header;
-	uint16_t phy_type;
-	uint16_t cts_mode;
-	uint16_t reserved;
+	u16 phy_type;
+	u16 cts_mode;
+	u16 reserved;
 	struct rate_set16_t rate_set;
 	struct ssid_t ssid;
-	uint16_t capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
+	u16 capability;	/* bit5:preamble bit6:pbcc pbcc not supported always 0
 				 * bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
-	uint16_t scan_type;
+	u16 scan_type;
 	struct channel_list_t channel_list;
 	u8 bssid[ETH_ALEN];
 } __packed;
 
 struct hostif_adhoc_set_confirm_t {
 	struct hostif_hdr header;
-	uint16_t result_code;
+	u16 result_code;
 } __packed;
 
 struct last_associate_t {
@@ -449,10 +449,10 @@ struct association_request_t {
 #define FRAME_TYPE_ASSOC_REQ	0x00
 #define FRAME_TYPE_REASSOC_REQ	0x20
 	u8 pad;
-	uint16_t capability;
-	uint16_t listen_interval;
+	u16 capability;
+	u16 listen_interval;
 	u8 ap_address[6];
-	uint16_t reqIEs_size;
+	u16 reqIEs_size;
 } __packed;
 
 struct association_response_t {
@@ -460,10 +460,10 @@ struct association_response_t {
 #define FRAME_TYPE_ASSOC_RESP	0x10
 #define FRAME_TYPE_REASSOC_RESP	0x30
 	u8 pad;
-	uint16_t capability;
-	uint16_t status;
-	uint16_t association_id;
-	uint16_t respIEs_size;
+	u16 capability;
+	u16 status;
+	u16 association_id;
+	u16 respIEs_size;
 } __packed;
 
 struct hostif_associate_indication_t {
@@ -488,16 +488,16 @@ struct hostif_bss_scan_request_t {
 
 struct hostif_bss_scan_confirm_t {
 	struct hostif_hdr header;
-	uint16_t result_code;
-	uint16_t reserved;
+	u16 result_code;
+	u16 reserved;
 } __packed;
 
 struct hostif_phy_information_request_t {
 	struct hostif_hdr header;
-	uint16_t type;
+	u16 type;
 #define NORMAL_TYPE	0
 #define TIME_TYPE	1
-	uint16_t time;	/* unit 100ms */
+	u16 time;	/* unit 100ms */
 } __packed;
 
 struct hostif_phy_information_confirm_t {
@@ -521,18 +521,18 @@ struct hostif_sleep_request_t {
 
 struct hostif_sleep_confirm_t {
 	struct hostif_hdr header;
-	uint16_t result_code;
+	u16 result_code;
 } __packed;
 
 struct hostif_mic_failure_request_t {
 	struct hostif_hdr header;
-	uint16_t failure_count;
-	uint16_t timer;
+	u16 failure_count;
+	u16 timer;
 } __packed;
 
 struct hostif_mic_failure_confirm_t {
 	struct hostif_hdr header;
-	uint16_t result_code;
+	u16 result_code;
 } __packed;
 
 #define BASIC_RATE	0x80
-- 
2.12.0

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

* [PATCH 3/3] Staging: ks7010: ks_hostif.*: Use preferred 'u32' kernel type over 'uint32_t'
  2017-03-12  2:29 [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t' Shiva Kerdel
  2017-03-12  2:30 ` [PATCH 2/3] Staging: ks7010: ks_hostif.*: Use preferred 'u16' kernel type over 'uint16_t' Shiva Kerdel
@ 2017-03-12  2:30 ` Shiva Kerdel
  2017-03-12  3:00 ` [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t' Tobin C. Harding
  2 siblings, 0 replies; 6+ messages in thread
From: Shiva Kerdel @ 2017-03-12  2:30 UTC (permalink / raw)
  To: gregkh
  Cc: wsa+renesas, p.hoefflin, karniksayli1995, sabitha.george, kdunne,
	me, bhumirks, mattkilgore12, georgiana.chelu93, goudapatilk,
	mihaela.muraru21, devel, linux-kernel, Shiva Kerdel

Fix prefer kernel type 'u32' over 'uint32_t' checks.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
---
 drivers/staging/ks7010/ks_hostif.c | 18 +++++++++---------
 drivers/staging/ks7010/ks_hostif.h | 30 +++++++++++++++---------------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 2cbb04305f33..b1fff903bce6 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -507,8 +507,8 @@ static
 void hostif_mib_get_confirm(struct ks_wlan_private *priv)
 {
 	struct net_device *dev = priv->net_dev;
-	uint32_t mib_status;
-	uint32_t mib_attribute;
+	u32 mib_status;
+	u32 mib_attribute;
 	u16 mib_val_size;
 	u16 mib_val_type;
 
@@ -587,8 +587,8 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
 static
 void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 {
-	uint32_t mib_status;	/* +04 MIB Status */
-	uint32_t mib_attribute;	/* +08 MIB attribute */
+	u32 mib_status;	/* +04 MIB Status */
+	u32 mib_attribute;	/* +08 MIB attribute */
 
 	DPRINTK(3, "\n");
 
@@ -1864,7 +1864,7 @@ void hostif_receive(struct ks_wlan_private *priv, unsigned char *p,
 static
 void hostif_sme_set_wep(struct ks_wlan_private *priv, int type)
 {
-	uint32_t val;
+	u32 val;
 
 	switch (type) {
 	case SME_WEP_INDEX_REQUEST:
@@ -1918,7 +1918,7 @@ struct wpa_suite_t {
 } __packed;
 
 struct rsn_mode_t {
-	uint32_t rsn_mode;
+	u32 rsn_mode;
 	u16 rsn_capability;
 } __packed;
 
@@ -1927,7 +1927,7 @@ void hostif_sme_set_rsn(struct ks_wlan_private *priv, int type)
 {
 	struct wpa_suite_t wpa_suite;
 	struct rsn_mode_t rsn_mode;
-	uint32_t val;
+	u32 val;
 
 	memset(&wpa_suite, 0, sizeof(wpa_suite));
 
@@ -2323,7 +2323,7 @@ void hostif_sme_sleep_set(struct ks_wlan_private *priv)
 static
 void hostif_sme_set_key(struct ks_wlan_private *priv, int type)
 {
-	uint32_t val;
+	u32 val;
 
 	switch (type) {
 	case SME_SET_FLAG:
@@ -2413,7 +2413,7 @@ void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
 static
 void hostif_sme_execute(struct ks_wlan_private *priv, int event)
 {
-	uint32_t val;
+	u32 val;
 
 	DPRINTK(3, "event=%d\n", event);
 	switch (event) {
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 5b2120293967..02b483afff5a 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -143,7 +143,7 @@ struct channel_list_t {
 
 struct hostif_mib_get_request_t {
 	struct hostif_hdr header;
-	uint32_t mib_attribute;
+	u32 mib_attribute;
 } __packed;
 
 struct hostif_mib_value_t {
@@ -159,36 +159,36 @@ struct hostif_mib_value_t {
 
 struct hostif_mib_get_confirm_t {
 	struct hostif_hdr header;
-	uint32_t mib_status;
+	u32 mib_status;
 #define MIB_SUCCESS    0
 #define MIB_INVALID    1
 #define MIB_READ_ONLY  2
 #define MIB_WRITE_ONLY 3
-	uint32_t mib_attribute;
+	u32 mib_attribute;
 	struct hostif_mib_value_t mib_value;
 } __packed;
 
 struct hostif_mib_set_request_t {
 	struct hostif_hdr header;
-	uint32_t mib_attribute;
+	u32 mib_attribute;
 	struct hostif_mib_value_t mib_value;
 } __packed;
 
 struct hostif_mib_set_confirm_t {
 	struct hostif_hdr header;
-	uint32_t mib_status;
-	uint32_t mib_attribute;
+	u32 mib_status;
+	u32 mib_attribute;
 } __packed;
 
 struct hostif_power_mngmt_request_t {
 	struct hostif_hdr header;
-	uint32_t mode;
+	u32 mode;
 #define POWER_ACTIVE  1
 #define POWER_SAVE    2
-	uint32_t wake_up;
+	u32 wake_up;
 #define SLEEP_FALSE 0
 #define SLEEP_TRUE  1	/* not used */
-	uint32_t receiveDTIMs;
+	u32 receiveDTIMs;
 #define DTIM_FALSE 0
 #define DTIM_TRUE  1
 } __packed;
@@ -480,8 +480,8 @@ struct hostif_bss_scan_request_t {
 #define ACTIVE_SCAN  0
 #define PASSIVE_SCAN 1
 	u8 pad[3];
-	uint32_t ch_time_min;
-	uint32_t ch_time_max;
+	u32 ch_time_min;
+	u32 ch_time_max;
 	struct channel_list_t channel_list;
 	struct ssid_t ssid;
 } __packed;
@@ -506,10 +506,10 @@ struct hostif_phy_information_confirm_t {
 	u8 sq;
 	u8 noise;
 	u8 link_speed;
-	uint32_t tx_frame;
-	uint32_t rx_frame;
-	uint32_t tx_error;
-	uint32_t rx_error;
+	u32 tx_frame;
+	u32 rx_frame;
+	u32 tx_error;
+	u32 rx_error;
 } __packed;
 
 /* sleep mode */
-- 
2.12.0

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

* Re: [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t'
  2017-03-12  2:29 [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t' Shiva Kerdel
  2017-03-12  2:30 ` [PATCH 2/3] Staging: ks7010: ks_hostif.*: Use preferred 'u16' kernel type over 'uint16_t' Shiva Kerdel
  2017-03-12  2:30 ` [PATCH 3/3] Staging: ks7010: ks_hostif.*: Use preferred 'u32' kernel type over 'uint32_t' Shiva Kerdel
@ 2017-03-12  3:00 ` Tobin C. Harding
  2017-03-14 15:12   ` Shiva Kerdel
  2 siblings, 1 reply; 6+ messages in thread
From: Tobin C. Harding @ 2017-03-12  3:00 UTC (permalink / raw)
  To: Shiva Kerdel
  Cc: gregkh, wsa+renesas, p.hoefflin, karniksayli1995, sabitha.george,
	kdunne, bhumirks, mattkilgore12, georgiana.chelu93, goudapatilk,
	mihaela.muraru21, devel, linux-kernel

On Sun, Mar 12, 2017 at 03:29:59AM +0100, Shiva Kerdel wrote:
> Fix prefer kernel type 'u8' over 'uint8_t' checks.
> 
> Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
> ---
>  drivers/staging/ks7010/ks_hostif.c   |   4 +-
>  drivers/staging/ks7010/ks_hostif.h   | 114 +++++++++++++++++------------------
>  drivers/staging/ks7010/ks_wlan_net.c |   2 +-
>  3 files changed, 60 insertions(+), 60 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index 6522bc3d30d5..0d6bbe61131c 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -2384,8 +2384,8 @@ void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
>  	struct pmk_cache_t {
>  		uint16_t size;
>  		struct {
> -			uint8_t bssid[ETH_ALEN];
> -			uint8_t pmkid[IW_PMKID_LEN];
> +			u8 bssid[ETH_ALEN];
> +			u8 pmkid[IW_PMKID_LEN];
>  		} __packed list[PMK_LIST_MAX];
>  	} __packed pmkcache;
>  	struct pmk_t *pmk;
> diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
> index 35bfadf4665d..be8ded44c1ac 100644
> --- a/drivers/staging/ks7010/ks_hostif.h
> +++ b/drivers/staging/ks7010/ks_hostif.h
> @@ -72,7 +72,7 @@ struct hostif_data_request_t {
>  #define TYPE_DATA 0x0000
>  #define TYPE_AUTH 0x0001
>  	uint16_t reserved;
> -	uint8_t data[0];
> +	u8 data[0];
>  } __packed;
>  
>  struct hostif_data_indication_t {
> @@ -83,14 +83,14 @@ struct hostif_data_indication_t {
>  #define TYPE_GMK1 0x0002
>  #define TYPE_GMK2 0x0003
>  	uint16_t reserved;
> -	uint8_t data[0];
> +	u8 data[0];
>  } __packed;
>  
>  #define CHANNEL_LIST_MAX_SIZE 14
>  struct channel_list_t {
> -	uint8_t size;
> -	uint8_t body[CHANNEL_LIST_MAX_SIZE];
> -	uint8_t pad;
> +	u8 size;
> +	u8 body[CHANNEL_LIST_MAX_SIZE];
> +	u8 pad;
>  } __packed;
>  
>  /* MIB Attribute */
> @@ -154,7 +154,7 @@ struct hostif_mib_value_t {
>  #define MIB_VALUE_TYPE_BOOL     2
>  #define MIB_VALUE_TYPE_COUNT32  3
>  #define MIB_VALUE_TYPE_OSTRING  4
> -	uint8_t body[0];
> +	u8 body[0];
>  } __packed;
>  
>  struct hostif_mib_get_confirm_t {
> @@ -227,32 +227,32 @@ struct hostif_start_confirm_t {
>  
>  #define SSID_MAX_SIZE 32
>  struct ssid_t {
> -	uint8_t size;
> -	uint8_t body[SSID_MAX_SIZE];
> -	uint8_t ssid_pad;
> +	u8 size;
> +	u8 body[SSID_MAX_SIZE];
> +	u8 ssid_pad;
>  } __packed;
>  
>  #define RATE_SET_MAX_SIZE 16
>  struct rate_set8_t {
> -	uint8_t size;
> -	uint8_t body[8];
> -	uint8_t rate_pad;
> +	u8 size;
> +	u8 body[8];
> +	u8 rate_pad;
>  } __packed;
>  
>  struct FhParms_t {
>  	uint16_t dwellTime;
> -	uint8_t hopSet;
> -	uint8_t hopPattern;
> -	uint8_t hopIndex;
> +	u8 hopSet;
> +	u8 hopPattern;
> +	u8 hopIndex;
>  } __packed;
>  
>  struct DsParms_t {
> -	uint8_t channel;
> +	u8 channel;
>  } __packed;
>  
>  struct CfParms_t {
> -	uint8_t count;
> -	uint8_t period;
> +	u8 count;
> +	u8 period;
>  	uint16_t maxDuration;
>  	uint16_t durRemaining;
>  } __packed;
> @@ -262,27 +262,27 @@ struct IbssParms_t {
>  } __packed;
>  
>  struct rsn_t {
> -	uint8_t size;
> +	u8 size;
>  #define RSN_BODY_SIZE 64
> -	uint8_t body[RSN_BODY_SIZE];
> +	u8 body[RSN_BODY_SIZE];
>  } __packed;
>  
>  struct ErpParams_t {
> -	uint8_t erp_info;
> +	u8 erp_info;
>  } __packed;
>  
>  struct rate_set16_t {
> -	uint8_t size;
> -	uint8_t body[16];
> -	uint8_t rate_pad;
> +	u8 size;
> +	u8 body[16];
> +	u8 rate_pad;
>  } __packed;
>  
>  struct ap_info_t {
> -	uint8_t bssid[6];	/* +00 */
> -	uint8_t rssi;	/* +06 */
> -	uint8_t sq;	/* +07 */
> -	uint8_t noise;	/* +08 */
> -	uint8_t pad0;	/* +09 */
> +	u8 bssid[6];	/* +00 */
> +	u8 rssi;	/* +06 */
> +	u8 sq;	/* +07 */
> +	u8 noise;	/* +08 */
> +	u8 pad0;	/* +09 */
>  	uint16_t beacon_period;	/* +10 */
>  	uint16_t capability;	/* +12 */
>  #define BSS_CAP_ESS             BIT(0)
> @@ -295,21 +295,21 @@ struct ap_info_t {
>  #define BSS_CAP_CHANNEL_AGILITY BIT(7)
>  #define BSS_CAP_SHORT_SLOT_TIME BIT(10)
>  #define BSS_CAP_DSSS_OFDM       BIT(13)
> -	uint8_t frame_type;	/* +14 */
> -	uint8_t ch_info;	/* +15 */
> +	u8 frame_type;	/* +14 */
> +	u8 ch_info;	/* +15 */
>  #define FRAME_TYPE_BEACON	0x80
>  #define FRAME_TYPE_PROBE_RESP	0x50
>  	uint16_t body_size;	/* +16 */
> -	uint8_t body[1024];	/* +18 */
> +	u8 body[1024];	/* +18 */
>  	/* +1032 */
>  } __packed;
>  
>  struct link_ap_info_t {
> -	uint8_t bssid[6];	/* +00 */
> -	uint8_t rssi;	/* +06 */
> -	uint8_t sq;	/* +07 */
> -	uint8_t noise;	/* +08 */
> -	uint8_t pad0;	/* +09 */
> +	u8 bssid[6];	/* +00 */
> +	u8 rssi;	/* +06 */
> +	u8 sq;	/* +07 */
> +	u8 noise;	/* +08 */
> +	u8 pad0;	/* +09 */
>  	uint16_t beacon_period;	/* +10 */
>  	uint16_t capability;	/* +12 */
>  	struct rate_set8_t rate_set;	/* +14 */
> @@ -318,16 +318,16 @@ struct link_ap_info_t {
>  	struct CfParms_t cf_parameter;	/* +30 */
>  	struct IbssParms_t ibss_parameter;	/* +36 */
>  	struct ErpParams_t erp_parameter;	/* +38 */
> -	uint8_t pad1;	/* +39 */
> +	u8 pad1;	/* +39 */
>  	struct rate_set8_t ext_rate_set;	/* +40 */
> -	uint8_t DTIM_period;	/* +50 */
> -	uint8_t rsn_mode;	/* +51 */
> +	u8 DTIM_period;	/* +50 */
> +	u8 rsn_mode;	/* +51 */
>  #define RSN_MODE_NONE	0
>  #define RSN_MODE_WPA	1
>  #define RSN_MODE_WPA2	2
>  	struct {
> -		uint8_t size;	/* +52 */
> -		uint8_t body[128];	/* +53 */
> +		u8 size;	/* +52 */
> +		u8 body[128];	/* +53 */
>  	} __packed rsn;
>  } __packed;
>  
> @@ -400,7 +400,7 @@ struct hostif_infrastructure_set2_request_t {
>  #define AUTH_TYPE_SHARED_KEY  1
>  	struct channel_list_t channel_list;
>  	uint16_t scan_type;
> -	uint8_t bssid[ETH_ALEN];
> +	u8 bssid[ETH_ALEN];
>  } __packed;
>  
>  struct hostif_infrastructure_set_confirm_t {
> @@ -431,7 +431,7 @@ struct hostif_adhoc_set2_request_t {
>  				 * bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
>  	uint16_t scan_type;
>  	struct channel_list_t channel_list;
> -	uint8_t bssid[ETH_ALEN];
> +	u8 bssid[ETH_ALEN];
>  } __packed;
>  
>  struct hostif_adhoc_set_confirm_t {
> @@ -440,26 +440,26 @@ struct hostif_adhoc_set_confirm_t {
>  } __packed;
>  
>  struct last_associate_t {
> -	uint8_t type;
> -	uint8_t status;
> +	u8 type;
> +	u8 status;
>  } __packed;
>  
>  struct association_request_t {
> -	uint8_t type;
> +	u8 type;
>  #define FRAME_TYPE_ASSOC_REQ	0x00
>  #define FRAME_TYPE_REASSOC_REQ	0x20
> -	uint8_t pad;
> +	u8 pad;
>  	uint16_t capability;
>  	uint16_t listen_interval;
> -	uint8_t ap_address[6];
> +	u8 ap_address[6];
>  	uint16_t reqIEs_size;
>  } __packed;
>  
>  struct association_response_t {
> -	uint8_t type;
> +	u8 type;
>  #define FRAME_TYPE_ASSOC_RESP	0x10
>  #define FRAME_TYPE_REASSOC_RESP	0x30
> -	uint8_t pad;
> +	u8 pad;
>  	uint16_t capability;
>  	uint16_t status;
>  	uint16_t association_id;
> @@ -476,10 +476,10 @@ struct hostif_associate_indication_t {
>  
>  struct hostif_bss_scan_request_t {
>  	struct hostif_hdr header;
> -	uint8_t scan_type;
> +	u8 scan_type;
>  #define ACTIVE_SCAN  0
>  #define PASSIVE_SCAN 1
> -	uint8_t pad[3];
> +	u8 pad[3];
>  	uint32_t ch_time_min;
>  	uint32_t ch_time_max;
>  	struct channel_list_t channel_list;
> @@ -502,10 +502,10 @@ struct hostif_phy_information_request_t {
>  
>  struct hostif_phy_information_confirm_t {
>  	struct hostif_hdr header;
> -	uint8_t rssi;
> -	uint8_t sq;
> -	uint8_t noise;
> -	uint8_t link_speed;
> +	u8 rssi;
> +	u8 sq;
> +	u8 noise;
> +	u8 link_speed;
>  	uint32_t tx_frame;
>  	uint32_t rx_frame;
>  	uint32_t tx_error;
> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
> index d06dfe0f6732..2b4d6c1cb037 100644
> --- a/drivers/staging/ks7010/ks_wlan_net.c
> +++ b/drivers/staging/ks7010/ks_wlan_net.c
> @@ -2767,7 +2767,7 @@ static int ks_wlan_set_wps_probe_req(struct net_device *dev,
>  				     struct iw_request_info *info,
>  				     struct iw_point *dwrq, char *extra)
>  {
> -	uint8_t *p = extra;
> +	u8 *p = extra;
>  	unsigned char len;
>  	struct ks_wlan_private *priv =
>  	    (struct ks_wlan_private *)netdev_priv(dev);
> -- 
> 2.12.0
> 

Why did you only do these three files? uint8_t appears in other files
in ks7010/ also. Perhaps you could do all the files in one patch.

If you like you could do a patch set changing all the standard types
to kernel types. i.e one patch per type (uint8_t, uint16_t ...).

I have a patch set in flight that includes these type changes with
review asking me to do exactly  this. However, if you would like to do
it I will remove the type changes from my patch set and wait until yours is applied before
re-submitting.

Please let me know if you intend to do this.

Oh, and if you really want cudos you could add a bit more detail to
your git log, for example

Checkpatch emits warning ...

Change standard type uint8_t to kernel type u8.

Well done and good luck.

thanks,
Tobin.

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

* Re: [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t'
  2017-03-12  3:00 ` [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t' Tobin C. Harding
@ 2017-03-14 15:12   ` Shiva Kerdel
  2017-03-14 20:33     ` Tobin C. Harding
  0 siblings, 1 reply; 6+ messages in thread
From: Shiva Kerdel @ 2017-03-14 15:12 UTC (permalink / raw)
  To: Tobin C. Harding
  Cc: gregkh, wsa+renesas, p.hoefflin, karniksayli1995, sabitha.george,
	kdunne, bhumirks, mattkilgore12, georgiana.chelu93, goudapatilk,
	mihaela.muraru21, devel, linux-kernel

Hello Tobin,

I missed the other files because they did not show up using the checkpatch script.
Next time I will do a recursive search through the files before committing the changes to avoid this situation.

Before I could replay on your message, I got notified of my patches already been merged.
However, I am willing to check the other files if you like when I get home and change them too if it's not already done yet.

Finally it's hard to be descriptive about such changes since the title is very self explaining to me, but
I will try more informative about changes in the future.

Thanks,
S. Kerdel

On 03/12/17 04:00, Tobin C. Harding wrote:
> On Sun, Mar 12, 2017 at 03:29:59AM +0100, Shiva Kerdel wrote:
>> Fix prefer kernel type 'u8' over 'uint8_t' checks.
>>
>> Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
>> ---
>>   drivers/staging/ks7010/ks_hostif.c   |   4 +-
>>   drivers/staging/ks7010/ks_hostif.h   | 114 +++++++++++++++++------------------
>>   drivers/staging/ks7010/ks_wlan_net.c |   2 +-
>>   3 files changed, 60 insertions(+), 60 deletions(-)
>>
>> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
>> index 6522bc3d30d5..0d6bbe61131c 100644
>> --- a/drivers/staging/ks7010/ks_hostif.c
>> +++ b/drivers/staging/ks7010/ks_hostif.c
>> @@ -2384,8 +2384,8 @@ void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
>>   	struct pmk_cache_t {
>>   		uint16_t size;
>>   		struct {
>> -			uint8_t bssid[ETH_ALEN];
>> -			uint8_t pmkid[IW_PMKID_LEN];
>> +			u8 bssid[ETH_ALEN];
>> +			u8 pmkid[IW_PMKID_LEN];
>>   		} __packed list[PMK_LIST_MAX];
>>   	} __packed pmkcache;
>>   	struct pmk_t *pmk;
>> diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
>> index 35bfadf4665d..be8ded44c1ac 100644
>> --- a/drivers/staging/ks7010/ks_hostif.h
>> +++ b/drivers/staging/ks7010/ks_hostif.h
>> @@ -72,7 +72,7 @@ struct hostif_data_request_t {
>>   #define TYPE_DATA 0x0000
>>   #define TYPE_AUTH 0x0001
>>   	uint16_t reserved;
>> -	uint8_t data[0];
>> +	u8 data[0];
>>   } __packed;
>>   
>>   struct hostif_data_indication_t {
>> @@ -83,14 +83,14 @@ struct hostif_data_indication_t {
>>   #define TYPE_GMK1 0x0002
>>   #define TYPE_GMK2 0x0003
>>   	uint16_t reserved;
>> -	uint8_t data[0];
>> +	u8 data[0];
>>   } __packed;
>>   
>>   #define CHANNEL_LIST_MAX_SIZE 14
>>   struct channel_list_t {
>> -	uint8_t size;
>> -	uint8_t body[CHANNEL_LIST_MAX_SIZE];
>> -	uint8_t pad;
>> +	u8 size;
>> +	u8 body[CHANNEL_LIST_MAX_SIZE];
>> +	u8 pad;
>>   } __packed;
>>   
>>   /* MIB Attribute */
>> @@ -154,7 +154,7 @@ struct hostif_mib_value_t {
>>   #define MIB_VALUE_TYPE_BOOL     2
>>   #define MIB_VALUE_TYPE_COUNT32  3
>>   #define MIB_VALUE_TYPE_OSTRING  4
>> -	uint8_t body[0];
>> +	u8 body[0];
>>   } __packed;
>>   
>>   struct hostif_mib_get_confirm_t {
>> @@ -227,32 +227,32 @@ struct hostif_start_confirm_t {
>>   
>>   #define SSID_MAX_SIZE 32
>>   struct ssid_t {
>> -	uint8_t size;
>> -	uint8_t body[SSID_MAX_SIZE];
>> -	uint8_t ssid_pad;
>> +	u8 size;
>> +	u8 body[SSID_MAX_SIZE];
>> +	u8 ssid_pad;
>>   } __packed;
>>   
>>   #define RATE_SET_MAX_SIZE 16
>>   struct rate_set8_t {
>> -	uint8_t size;
>> -	uint8_t body[8];
>> -	uint8_t rate_pad;
>> +	u8 size;
>> +	u8 body[8];
>> +	u8 rate_pad;
>>   } __packed;
>>   
>>   struct FhParms_t {
>>   	uint16_t dwellTime;
>> -	uint8_t hopSet;
>> -	uint8_t hopPattern;
>> -	uint8_t hopIndex;
>> +	u8 hopSet;
>> +	u8 hopPattern;
>> +	u8 hopIndex;
>>   } __packed;
>>   
>>   struct DsParms_t {
>> -	uint8_t channel;
>> +	u8 channel;
>>   } __packed;
>>   
>>   struct CfParms_t {
>> -	uint8_t count;
>> -	uint8_t period;
>> +	u8 count;
>> +	u8 period;
>>   	uint16_t maxDuration;
>>   	uint16_t durRemaining;
>>   } __packed;
>> @@ -262,27 +262,27 @@ struct IbssParms_t {
>>   } __packed;
>>   
>>   struct rsn_t {
>> -	uint8_t size;
>> +	u8 size;
>>   #define RSN_BODY_SIZE 64
>> -	uint8_t body[RSN_BODY_SIZE];
>> +	u8 body[RSN_BODY_SIZE];
>>   } __packed;
>>   
>>   struct ErpParams_t {
>> -	uint8_t erp_info;
>> +	u8 erp_info;
>>   } __packed;
>>   
>>   struct rate_set16_t {
>> -	uint8_t size;
>> -	uint8_t body[16];
>> -	uint8_t rate_pad;
>> +	u8 size;
>> +	u8 body[16];
>> +	u8 rate_pad;
>>   } __packed;
>>   
>>   struct ap_info_t {
>> -	uint8_t bssid[6];	/* +00 */
>> -	uint8_t rssi;	/* +06 */
>> -	uint8_t sq;	/* +07 */
>> -	uint8_t noise;	/* +08 */
>> -	uint8_t pad0;	/* +09 */
>> +	u8 bssid[6];	/* +00 */
>> +	u8 rssi;	/* +06 */
>> +	u8 sq;	/* +07 */
>> +	u8 noise;	/* +08 */
>> +	u8 pad0;	/* +09 */
>>   	uint16_t beacon_period;	/* +10 */
>>   	uint16_t capability;	/* +12 */
>>   #define BSS_CAP_ESS             BIT(0)
>> @@ -295,21 +295,21 @@ struct ap_info_t {
>>   #define BSS_CAP_CHANNEL_AGILITY BIT(7)
>>   #define BSS_CAP_SHORT_SLOT_TIME BIT(10)
>>   #define BSS_CAP_DSSS_OFDM       BIT(13)
>> -	uint8_t frame_type;	/* +14 */
>> -	uint8_t ch_info;	/* +15 */
>> +	u8 frame_type;	/* +14 */
>> +	u8 ch_info;	/* +15 */
>>   #define FRAME_TYPE_BEACON	0x80
>>   #define FRAME_TYPE_PROBE_RESP	0x50
>>   	uint16_t body_size;	/* +16 */
>> -	uint8_t body[1024];	/* +18 */
>> +	u8 body[1024];	/* +18 */
>>   	/* +1032 */
>>   } __packed;
>>   
>>   struct link_ap_info_t {
>> -	uint8_t bssid[6];	/* +00 */
>> -	uint8_t rssi;	/* +06 */
>> -	uint8_t sq;	/* +07 */
>> -	uint8_t noise;	/* +08 */
>> -	uint8_t pad0;	/* +09 */
>> +	u8 bssid[6];	/* +00 */
>> +	u8 rssi;	/* +06 */
>> +	u8 sq;	/* +07 */
>> +	u8 noise;	/* +08 */
>> +	u8 pad0;	/* +09 */
>>   	uint16_t beacon_period;	/* +10 */
>>   	uint16_t capability;	/* +12 */
>>   	struct rate_set8_t rate_set;	/* +14 */
>> @@ -318,16 +318,16 @@ struct link_ap_info_t {
>>   	struct CfParms_t cf_parameter;	/* +30 */
>>   	struct IbssParms_t ibss_parameter;	/* +36 */
>>   	struct ErpParams_t erp_parameter;	/* +38 */
>> -	uint8_t pad1;	/* +39 */
>> +	u8 pad1;	/* +39 */
>>   	struct rate_set8_t ext_rate_set;	/* +40 */
>> -	uint8_t DTIM_period;	/* +50 */
>> -	uint8_t rsn_mode;	/* +51 */
>> +	u8 DTIM_period;	/* +50 */
>> +	u8 rsn_mode;	/* +51 */
>>   #define RSN_MODE_NONE	0
>>   #define RSN_MODE_WPA	1
>>   #define RSN_MODE_WPA2	2
>>   	struct {
>> -		uint8_t size;	/* +52 */
>> -		uint8_t body[128];	/* +53 */
>> +		u8 size;	/* +52 */
>> +		u8 body[128];	/* +53 */
>>   	} __packed rsn;
>>   } __packed;
>>   
>> @@ -400,7 +400,7 @@ struct hostif_infrastructure_set2_request_t {
>>   #define AUTH_TYPE_SHARED_KEY  1
>>   	struct channel_list_t channel_list;
>>   	uint16_t scan_type;
>> -	uint8_t bssid[ETH_ALEN];
>> +	u8 bssid[ETH_ALEN];
>>   } __packed;
>>   
>>   struct hostif_infrastructure_set_confirm_t {
>> @@ -431,7 +431,7 @@ struct hostif_adhoc_set2_request_t {
>>   				 * bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
>>   	uint16_t scan_type;
>>   	struct channel_list_t channel_list;
>> -	uint8_t bssid[ETH_ALEN];
>> +	u8 bssid[ETH_ALEN];
>>   } __packed;
>>   
>>   struct hostif_adhoc_set_confirm_t {
>> @@ -440,26 +440,26 @@ struct hostif_adhoc_set_confirm_t {
>>   } __packed;
>>   
>>   struct last_associate_t {
>> -	uint8_t type;
>> -	uint8_t status;
>> +	u8 type;
>> +	u8 status;
>>   } __packed;
>>   
>>   struct association_request_t {
>> -	uint8_t type;
>> +	u8 type;
>>   #define FRAME_TYPE_ASSOC_REQ	0x00
>>   #define FRAME_TYPE_REASSOC_REQ	0x20
>> -	uint8_t pad;
>> +	u8 pad;
>>   	uint16_t capability;
>>   	uint16_t listen_interval;
>> -	uint8_t ap_address[6];
>> +	u8 ap_address[6];
>>   	uint16_t reqIEs_size;
>>   } __packed;
>>   
>>   struct association_response_t {
>> -	uint8_t type;
>> +	u8 type;
>>   #define FRAME_TYPE_ASSOC_RESP	0x10
>>   #define FRAME_TYPE_REASSOC_RESP	0x30
>> -	uint8_t pad;
>> +	u8 pad;
>>   	uint16_t capability;
>>   	uint16_t status;
>>   	uint16_t association_id;
>> @@ -476,10 +476,10 @@ struct hostif_associate_indication_t {
>>   
>>   struct hostif_bss_scan_request_t {
>>   	struct hostif_hdr header;
>> -	uint8_t scan_type;
>> +	u8 scan_type;
>>   #define ACTIVE_SCAN  0
>>   #define PASSIVE_SCAN 1
>> -	uint8_t pad[3];
>> +	u8 pad[3];
>>   	uint32_t ch_time_min;
>>   	uint32_t ch_time_max;
>>   	struct channel_list_t channel_list;
>> @@ -502,10 +502,10 @@ struct hostif_phy_information_request_t {
>>   
>>   struct hostif_phy_information_confirm_t {
>>   	struct hostif_hdr header;
>> -	uint8_t rssi;
>> -	uint8_t sq;
>> -	uint8_t noise;
>> -	uint8_t link_speed;
>> +	u8 rssi;
>> +	u8 sq;
>> +	u8 noise;
>> +	u8 link_speed;
>>   	uint32_t tx_frame;
>>   	uint32_t rx_frame;
>>   	uint32_t tx_error;
>> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
>> index d06dfe0f6732..2b4d6c1cb037 100644
>> --- a/drivers/staging/ks7010/ks_wlan_net.c
>> +++ b/drivers/staging/ks7010/ks_wlan_net.c
>> @@ -2767,7 +2767,7 @@ static int ks_wlan_set_wps_probe_req(struct net_device *dev,
>>   				     struct iw_request_info *info,
>>   				     struct iw_point *dwrq, char *extra)
>>   {
>> -	uint8_t *p = extra;
>> +	u8 *p = extra;
>>   	unsigned char len;
>>   	struct ks_wlan_private *priv =
>>   	    (struct ks_wlan_private *)netdev_priv(dev);
>> -- 
>> 2.12.0
>>
> Why did you only do these three files? uint8_t appears in other files
> in ks7010/ also. Perhaps you could do all the files in one patch.
>
> If you like you could do a patch set changing all the standard types
> to kernel types. i.e one patch per type (uint8_t, uint16_t ...).
>
> I have a patch set in flight that includes these type changes with
> review asking me to do exactly  this. However, if you would like to do
> it I will remove the type changes from my patch set and wait until yours is applied before
> re-submitting.
>
> Please let me know if you intend to do this.
>
> Oh, and if you really want cudos you could add a bit more detail to
> your git log, for example
>
> Checkpatch emits warning ...
>
> Change standard type uint8_t to kernel type u8.
>
> Well done and good luck.
>
> thanks,
> Tobin.

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

* Re: [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t'
  2017-03-14 15:12   ` Shiva Kerdel
@ 2017-03-14 20:33     ` Tobin C. Harding
  0 siblings, 0 replies; 6+ messages in thread
From: Tobin C. Harding @ 2017-03-14 20:33 UTC (permalink / raw)
  To: Shiva Kerdel
  Cc: gregkh, wsa+renesas, p.hoefflin, karniksayli1995, sabitha.george,
	kdunne, bhumirks, mattkilgore12, georgiana.chelu93, goudapatilk,
	mihaela.muraru21, devel, linux-kernel

On Tue, Mar 14, 2017 at 04:12:31PM +0100, Shiva Kerdel wrote:
> Hello Tobin,
> 
> I missed the other files because they did not show up using the checkpatch script.
> Next time I will do a recursive search through the files before committing the changes to avoid this situation.
> 
> Before I could replay on your message, I got notified of my patches already been merged.

I saw that :)

> However, I am willing to check the other files if you like when I get home and change them too if it's not already done yet.

It's not a big issue, do it only if it pleases you.

> 
> Finally it's hard to be descriptive about such changes since the title is very self explaining to me, but

I know, I am finding writing the git log to be the most challenging
part of kernel development so far

Good luck,
Tobin. 

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

end of thread, other threads:[~2017-03-14 20:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-12  2:29 [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t' Shiva Kerdel
2017-03-12  2:30 ` [PATCH 2/3] Staging: ks7010: ks_hostif.*: Use preferred 'u16' kernel type over 'uint16_t' Shiva Kerdel
2017-03-12  2:30 ` [PATCH 3/3] Staging: ks7010: ks_hostif.*: Use preferred 'u32' kernel type over 'uint32_t' Shiva Kerdel
2017-03-12  3:00 ` [PATCH 1/3] Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t' Tobin C. Harding
2017-03-14 15:12   ` Shiva Kerdel
2017-03-14 20:33     ` Tobin C. Harding

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.