Re: [PATCH] staging: speakup: Fix coding style

2018-05-13 Thread Joe Perches
On Sun, 2018-05-13 at 11:38 +0200, Samuel Thibault wrote: [] > @@ -68,7 +68,7 @@ int spk_punc_level, spk_reading_punc; > char spk_str_caps_start[MAXVARLEN + 1] = "\0"; > char spk_str_caps_stop[MAXVARLEN + 1] = "\0"; > char spk_str_pause[MAXVARLEN + 1] = "\0"; > -bool spk_paused = 0; > +bool spk_

[PATCH] staging: speakup: Fix coding style

2018-05-13 Thread Samuel Thibault
Signed-off-by: Samuel Thibault --- drivers/staging/speakup/buffers.c |3 ++- drivers/staging/speakup/main.c|5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/drivers/staging/speakup/buffers.c +++ b/drivers/staging/speakup/buffers.c @@ -78,7 +78,8 @@ void synth_buffer_ad

[PATCH 16/23] staging: ks7010: use u16 as type for casting in hostif_ps_adhoc_set_request

2018-05-13 Thread Sergio Paracuellos
There is an assignment inside hostif_ps_adhoc_set_request function which is being used together with cpu_to_le16 using uint16_t as cast type. Replace it to use 'u16' instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH 02/23] staging: ks7010: remove no necessary blank line

2018-05-13 Thread Sergio Paracuellos
There was two blank lines between definitions and statements in ks7010_upload_firmware function. Remove one of them. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/stagi

[PATCH 22/23] staging: ks7010: use 'u16' for casts in assignments in hostif_sme_set_rsn

2018-05-13 Thread Sergio Paracuellos
There are some assignments inside hostif_sme_set_rsn function which are being used together with cpu_to_le16 using uint16_t as cast type. Replace all of them to use 'u16' instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 6 +++--- 1 file changed, 3 insertions(+)

[PATCH 13/23] staging: ks7010: avoid no needed cast in ks_wlan_cap

2018-05-13 Thread Sergio Paracuellos
In ks_wlan_cap there is a cast to uint16_t to use cpu_to_le16 with variable 'capability' which is already defined as u16. Avoid this cast to clean code. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[PATCH 23/23] staging: ks7010: replace cast type in assignment in hostif_sme_set_pmksa

2018-05-13 Thread Sergio Paracuellos
There is an assignment inside hostif_sme_set_pmksa function which is being used together with cpu_to_le16 using uint16_t as cast type. Replace it to use 'u16' instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 18/23] staging: ks7010: replace cast type in assignment in hostif_adhoc_set_request

2018-05-13 Thread Sergio Paracuellos
There is an assignment inside hostif_adhoc_set_request function which is being used together with cpu_to_le16 using uint16_t as cast type. Replace it to use 'u16' instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH 04/23] staging: ks7010: change cast from uint16_t to u16

2018-05-13 Thread Sergio Paracuellos
Header size and event fields of header are declared as __le16 and being casted using uint16_t in cpu_to_le16. Change cast to use preferred u16. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH 21/23] staging: ks7010: change two parameter types in hostif_mic_failure_request

2018-05-13 Thread Sergio Paracuellos
Parameters 'failure_count' and 'timer' was declared as unsigned short and then there was being casted to u16 inside cpu_to_le16 to make the assignation. Just declare them as 'u16' and avoid casting at all. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 7 +++ 1 fi

[PATCH 06/23] staging: ks7010: change uint8_t casts to u8 in ks_wlan_set_rate

2018-05-13 Thread Sergio Paracuellos
There are some casts to uint8_t in ks_wlan_set_rate function to assign values of the bitrate. Just change it to u8 which is the one defined for the field 'body' of the struct which is in use. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 8 1 file changed,

[PATCH 11/23] staging: ks7010: change some cast type from uint16_t to u16 in hostif_data_request

2018-05-13 Thread Sergio Paracuellos
There are some castings inside the function hostif_data_request which are being using with uint16_t type. Fields which have being assigned are declared as u16. So update casts types to u16 in all of them. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 14 +++--

[PATCH 12/23] staging: ks7010: change parameter type in hostif_mib_get_request

2018-05-13 Thread Sergio Paracuellos
Second parameter 'mib_attribute' in function hostif_mib_get_request is declared as unsigned long and inside the function a cast to uint32_t is being used. Just pass a u32 instead and avoid the casting. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 7 +++ 1 file c

[PATCH 00/23] staging: ks7010: some new cleanups

2018-05-13 Thread Sergio Paracuellos
The following series makes new cleanups for this driver. Some not used stuff has been deleted as well as some casts and other minor changes with types have been introduced. Sergio Paracuellos (23): staging: ks7010: remove not used definition WPA_CAPABILITY_PREAUTH staging: ks7010: remove no ne

[PATCH 10/23] staging: ks7010: use u16 as type for casting in hostif_data_indication_wpa

2018-05-13 Thread Sergio Paracuellos
Field 'counter' in mic_failure struct is being assigned casting value using uint16_t. Replace with u16 which is the correct type of the field and the preferred one. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 14/23] staging: ks7010: use u16 as cast type in hostif_start_request

2018-05-13 Thread Sergio Paracuellos
Use u16 as cast type in hostif_start_request function replacing uint16_t which was being used. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010

[PATCH 08/23] staging: ks7010: replace uint8_t with u8 in ks_wlan_set_rx_gain

2018-05-13 Thread Sergio Paracuellos
In function ks_wlan_set_rx_gain a cast to uint8_t is being used to assign reception gain. 'rx_gain' field is defined as u8 so replace the cast to the correct type Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 17/23] staging: ks7010: replace cast type in assignments in hostif_infrastructure_set_request

2018-05-13 Thread Sergio Paracuellos
There are some assignments inside hostif_infrastructure_set_request function which are being used together with cpu_to_le16 using uint16_t as cast type. Replace all of them to use 'u16' instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2

[PATCH 03/23] staging: ks7010: replace unsigned char type with u8

2018-05-13 Thread Sergio Paracuellos
Variable 'byte' in ks7010_upload_firmware function is declared as unsigned char and is only being used to read hardware registers which are expected in sdio_read_byteb function as u8. Change 'byte' variable type to u8 which is preferred. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks70

[PATCH 09/23] staging: ks7010: replace not standard uint type to unsigned int

2018-05-13 Thread Sergio Paracuellos
The field 'wakeup_count' in 'ks_wlan_private' struct is declared as 'uint' which is not a standard type. Replace in favour of 'unsigned int' which it is. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri

[PATCH 19/23] staging: ks7010: replace cast types in assignments in hostif_phy_information_request

2018-05-13 Thread Sergio Paracuellos
There are some assignments inside hostif_phy_information_request function which are being used together with cpu_to_le16 using uint16_t as cast type. Replace all of them to use 'u16' instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 8 1 file changed, 4

[PATCH 20/23] staging: ks7010: replace uint* type into the u* ones in hostif_bss_scan_request

2018-05-13 Thread Sergio Paracuellos
In function hostif_bss_scan_request parameters 'scan_ssid' and 'scan_ssid_len' are declared as uint8_t. Change them to be 'u8' instead which is preferred. Also update two casts inside the same function to use 'u32' instead of 'uint32_t'. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks70

[PATCH 01/23] staging: ks7010: remove not used definition WPA_CAPABILITY_PREAUTH

2018-05-13 Thread Sergio Paracuellos
The WPA_CAPABILITY_PREAUTH definition is not being used at all so just remove it. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/eap_packet.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/ks7010/eap_packet.h b/drivers/staging/ks7010/eap_packet.h index ded85d

[PATCH 05/23] staging: ks7010: change parameter type in ks_wlan_hw_rx function

2018-05-13 Thread Sergio Paracuellos
The parameter 'size' in function ks_wlan_hw_rx is declared as uint16_t and can be declared as size_t which makes more sense. It is being passed to hif_align_size function which also expects a size_t as parameter so just change its type. Also update two casts in calls to this function. Signed-off-b

[PATCH 07/23] staging: ks7010: replace uint8_t with u8 in ks_wlan_set_tx_gain

2018-05-13 Thread Sergio Paracuellos
In function ks_wlan_set_tx_gain a cast to uint8_t is being used to assign transmission gain. 'tx_gain' field is defined as u8 so replace the cast to the correct type. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 15/23] staging: ks7010: replace casts to use type u16 in init_request

2018-05-13 Thread Sergio Paracuellos
There are soem assignments inside init_request function which are being used together with cpu_to_le16 using uint16_t as cast type. Replace all of them to use 'u16' instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 de

Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0

2018-05-13 Thread Stephen Hemminger
On Sat, 12 May 2018 02:30:33 -0700 k...@linuxonhyperv.com wrote: > int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep) > { > + struct vmbus_channel_message_header *hdr; > union hv_connection_id conn_id; > int ret = 0; > int retries = 0; > u32 usec = 1; >