Re: [PATCH v3 3/7] x86/hyper-v: reenlightenment notifications support
Hi Vitaly, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/auto-latest] [also build test WARNING on v4.15-rc8 next-20180118] [cannot apply to tip/x86/core kvm/linux-next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Vitaly-Kuznetsov/x86-kvm-hyperv-stable-clocksorce-for-L2-guests-when-running-nested-KVM-on-Hyper-V/20180119-160814 config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from include/linux/kasan.h:17:0, from include/linux/slab.h:129, from include/linux/irq.h:26, from arch/x86/include/asm/hardirq.h:6, from include/linux/hardirq.h:9, from include/linux/interrupt.h:13, from arch/x86/include/asm/mshyperv.h:8, from arch/x86//entry/vdso/vdso32/../vclock_gettime.c:20, from arch/x86//entry/vdso/vdso32/vclock_gettime.c:33: arch/x86/include/asm/pgtable.h: In function 'clone_pgd_range': arch/x86/include/asm/pgtable.h:1129:9: error: implicit declaration of function 'kernel_to_user_pgdp'; did you mean 'u64_to_user_ptr'? [-Werror=implicit-function-declaration] memcpy(kernel_to_user_pgdp(dst), kernel_to_user_pgdp(src), ^~~ u64_to_user_ptr arch/x86/include/asm/pgtable.h:1129:9: warning: passing argument 1 of 'memcpy' makes pointer from integer without a cast [-Wint-conversion] In file included from arch/x86/include/asm/page_32.h:35:0, from arch/x86/include/asm/page.h:14, from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:38, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:81, from include/linux/spinlock.h:51, from include/linux/seqlock.h:36, from include/linux/time.h:6, from include/uapi/linux/timex.h:56, from include/linux/timex.h:56, from include/linux/clocksource.h:13, from arch/x86/include/asm/vgtod.h:6, from arch/x86//entry/vdso/vdso32/../vclock_gettime.c:15, from arch/x86//entry/vdso/vdso32/vclock_gettime.c:33: include/linux/string.h:332:24: note: expected 'void *' but argument is of type 'int' __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size) ^~ In file included from include/linux/kasan.h:17:0, from include/linux/slab.h:129, from include/linux/irq.h:26, from arch/x86/include/asm/hardirq.h:6, from include/linux/hardirq.h:9, from include/linux/interrupt.h:13, from arch/x86/include/asm/mshyperv.h:8, from arch/x86//entry/vdso/vdso32/../vclock_gettime.c:20, from arch/x86//entry/vdso/vdso32/vclock_gettime.c:33: arch/x86/include/asm/pgtable.h:1129:35: warning: passing argument 2 of 'memcpy' makes pointer from integer without a cast [-Wint-conversion] memcpy(kernel_to_user_pgdp(dst), kernel_to_user_pgdp(src), ^~~ In file included from arch/x86/include/asm/page_32.h:35:0, from arch/x86/include/asm/page.h:14, from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:38, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:81, from include/linux/spinlock.h:51, from include/linux/seqlock.h:36, from include/linux/time.h:6, from include/uapi/linux/timex.h:56, from include/linux/timex.h:56, from include/linux/clocksource.h:13, from arch/x86/include/asm/vgtod.h:6, from arch/x86//entry/vdso/vdso32/../vclock_gettime.c:15, from arch/x86//entry/vdso/vdso32/vclock_gettime.c:33: include/linux/string.h:332:24: note: expected 'const void *' but argument is of type 'int' __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size) ^~ In file included from arch/x86/include/asm/paravirt_types.h:45:0, from arch/x86/include/asm/ptrace.h:92, from arch/x86/include/asm/math
Re: [PATCH v3 3/7] x86/hyper-v: reenlightenment notifications support
kbuild test robot writes: > Hi Vitaly, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on tip/auto-latest] > [also build test WARNING on v4.15-rc8 next-20180118] > [cannot apply to tip/x86/core kvm/linux-next] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Vitaly-Kuznetsov/x86-kvm-hyperv-stable-clocksorce-for-L2-guests-when-running-nested-KVM-on-Hyper-V/20180119-160814 > config: x86_64-allmodconfig (attached as .config) > compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > All warnings (new ones prefixed by >>): > >In file included from include/linux/kasan.h:17:0, > from include/linux/slab.h:129, > from include/linux/irq.h:26, > from arch/x86/include/asm/hardirq.h:6, > from include/linux/hardirq.h:9, > from include/linux/interrupt.h:13, > from arch/x86/include/asm/mshyperv.h:8, > from arch/x86//entry/vdso/vdso32/../vclock_gettime.c:20, > from arch/x86//entry/vdso/vdso32/vclock_gettime.c:33: >arch/x86/include/asm/pgtable.h: In function 'clone_pgd_range': >arch/x86/include/asm/pgtable.h:1129:9: error: implicit declaration of > function 'kernel_to_user_pgdp'; did you mean 'u64_to_user_ptr'? > [-Werror=implicit-function-declaration] > memcpy(kernel_to_user_pgdp(dst), kernel_to_user_pgdp(src), > ^~~ Sorry but I'm failing to see how this (and all the rest) is related to my patch ... [snip] -- Vitaly ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3 3/7] x86/hyper-v: reenlightenment notifications support
Hi Vitaly, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/auto-latest] [also build test WARNING on v4.15-rc8 next-20180118] [cannot apply to tip/x86/core kvm/linux-next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Vitaly-Kuznetsov/x86-kvm-hyperv-stable-clocksorce-for-L2-guests-when-running-nested-KVM-on-Hyper-V/20180119-160814 config: x86_64-randconfig-s5-01191733 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from arch/x86/include/asm/string.h:3:0, from include/linux/string.h:19, from arch/x86/include/asm/page_32.h:35, from arch/x86/include/asm/page.h:14, from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:38, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:81, from include/linux/spinlock.h:51, from include/linux/seqlock.h:36, from include/linux/time.h:6, from include/uapi/linux/timex.h:56, from include/linux/timex.h:56, from include/linux/clocksource.h:13, from arch/x86/include/asm/vgtod.h:6, from arch/x86//entry/vdso/vdso32/../vclock_gettime.c:15, from arch/x86//entry/vdso/vdso32/vclock_gettime.c:33: arch/x86/include/asm/pgtable.h: In function 'clone_pgd_range': arch/x86/include/asm/pgtable.h:1129:9: error: implicit declaration of function 'kernel_to_user_pgdp'; did you mean 'u64_to_user_ptr'? [-Werror=implicit-function-declaration] memcpy(kernel_to_user_pgdp(dst), kernel_to_user_pgdp(src), ^ arch/x86/include/asm/string_32.h:183:42: note: in definition of macro 'memcpy' #define memcpy(t, f, n) __builtin_memcpy(t, f, n) ^ >> arch/x86/include/asm/pgtable.h:1129:9: warning: passing argument 1 of >> '__builtin_memcpy' makes pointer from integer without a cast >> [-Wint-conversion] memcpy(kernel_to_user_pgdp(dst), kernel_to_user_pgdp(src), ^ arch/x86/include/asm/string_32.h:183:42: note: in definition of macro 'memcpy' #define memcpy(t, f, n) __builtin_memcpy(t, f, n) ^ arch/x86/include/asm/pgtable.h:1129:9: note: expected 'void *' but argument is of type 'int' memcpy(kernel_to_user_pgdp(dst), kernel_to_user_pgdp(src), ^ arch/x86/include/asm/string_32.h:183:42: note: in definition of macro 'memcpy' #define memcpy(t, f, n) __builtin_memcpy(t, f, n) ^ arch/x86/include/asm/pgtable.h:1129:35: warning: passing argument 2 of '__builtin_memcpy' makes pointer from integer without a cast [-Wint-conversion] memcpy(kernel_to_user_pgdp(dst), kernel_to_user_pgdp(src), ^ arch/x86/include/asm/string_32.h:183:45: note: in definition of macro 'memcpy' #define memcpy(t, f, n) __builtin_memcpy(t, f, n) ^ arch/x86/include/asm/pgtable.h:1129:35: note: expected 'const void *' but argument is of type 'int' memcpy(kernel_to_user_pgdp(dst), kernel_to_user_pgdp(src), ^ arch/x86/include/asm/string_32.h:183:45: note: in definition of macro 'memcpy' #define memcpy(t, f, n) __builtin_memcpy(t, f, n) ^ cc1: some warnings being treated as errors vim +/__builtin_memcpy +1129 arch/x86/include/asm/pgtable.h 1501899a arch/x86/include/asm/pgtable.h Dan Williams2017-11-29 85958b46 include/asm-x86/pgtable.h Jeremy Fitzhardinge 2008-03-17 1112 /* 85958b46 include/asm-x86/pgtable.h Jeremy Fitzhardinge 2008-03-17 1113 * clone_pgd_range(pgd_t *dst, pgd_t *src, int count); 85958b46 include/asm-x86/pgtable.h Jeremy Fitzhardinge 2008-03-17 1114 * 85958b46 include/asm-x86/pgtable.h Jeremy Fitzhardinge 2008-03-17 1115 * dst - pointer to pgd range anwhere on a pgd page 85958b46 include/asm-x86/pgtable.h Jeremy Fitzhardinge 2008-03-17 1116 * src - "" 85958b46 include/asm-x86/pgtable.h Jeremy Fitzhardinge 2008-03-17 1117 * count - the number of pgds to copy. 85958b46 include/asm-x86/pgtable.h Jeremy Fitzhardinge 2008-03-17 1118 * 85958b46 include/asm-x86/pgtable.h Jeremy Fitzhardinge 2008-03-17
Re: [PATCH v3 7/7] x86/kvm: support Hyper-V reenlightenment
Hi Vitaly, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/auto-latest] [also build test WARNING on v4.15-rc8 next-20180118] [cannot apply to tip/x86/core kvm/linux-next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Vitaly-Kuznetsov/x86-kvm-hyperv-stable-clocksorce-for-L2-guests-when-running-nested-KVM-on-Hyper-V/20180119-160814 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) arch/x86/kvm/x86.c:2120:38: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const @@ got d const @@ arch/x86/kvm/x86.c:2120:38: expected void const arch/x86/kvm/x86.c:2120:38: got unsigned char COPYING CREDITS Documentation Kbuild Kconfig MAINTAINERS Makefile README arch block certs crypto drivers firmware fs include init ipc kernel lib mm net samples scripts security sound tools usr virt >> arch/x86/kvm/x86.c:5936:6: sparse: symbol 'kvm_hyperv_tsc_notifier' was not >> declared. Should it be arch/x86/kvm/x86.c:7585:5: sparse: symbol 'kvm_valid_sregs' was not declared. Should it be arch/x86/kvm/x86.c:8401:16: sparse: incompatible types in comparison expression (different address spaces) arch/x86/include/asm/paravirt.h:782:9: sparse: context imbalance in 'vcpu_enter_guest' - unexpected unlock Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[RFC PATCH] x86/kvm: kvm_hyperv_tsc_notifier() can be static
Fixes: ce386b0e39a0 ("x86/kvm: support Hyper-V reenlightenment") Signed-off-by: Fengguang Wu --- x86.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 94f28e6..27e590a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5933,7 +5933,7 @@ static void tsc_khz_changed(void *data) __this_cpu_write(cpu_tsc_khz, khz); } -void kvm_hyperv_tsc_notifier(void) +static void kvm_hyperv_tsc_notifier(void) { #ifdef CONFIG_X86_64 struct kvm *kvm; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 09/14] staging: wilc1000: rename pstrHostIFconnectAttr argument to avoid camelCase
On 18.01.2018 15:17, Ajay Singh wrote: > fix "Avoid camelCase" issue found by checkpatch.pl script. > > Signed-off-by: Ajay Singh > --- > drivers/staging/wilc1000/host_interface.c | 104 > ++ > 1 file changed, 49 insertions(+), 55 deletions(-) > > diff --git a/drivers/staging/wilc1000/host_interface.c > b/drivers/staging/wilc1000/host_interface.c > index e3931bc..4ddd1a8 100644 > --- a/drivers/staging/wilc1000/host_interface.c > +++ b/drivers/staging/wilc1000/host_interface.c > @@ -903,7 +903,7 @@ static s32 Handle_ScanDone(struct wilc_vif *vif, > > u8 wilc_connected_ssid[6] = {0}; > static s32 Handle_Connect(struct wilc_vif *vif, > - struct connect_attr *pstrHostIFconnectAttr) > + struct connect_attr *attr) > { > s32 result = 0; > struct wid wid_list[8]; > @@ -912,45 +912,41 @@ static s32 Handle_Connect(struct wilc_vif *vif, > struct join_bss_param *ptstrJoinBssParam; > struct host_if_drv *hif_drv = vif->hif_drv; > > - if (memcmp(pstrHostIFconnectAttr->bssid, wilc_connected_ssid, ETH_ALEN) > == 0) { > + if (memcmp(attr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) { > result = 0; > netdev_err(vif->ndev, "Discard connect request\n"); > return result; > } > > - ptstrJoinBssParam = pstrHostIFconnectAttr->params; > + ptstrJoinBssParam = attr->params; > if (!ptstrJoinBssParam) { > netdev_err(vif->ndev, "Required BSSID not found\n"); > result = -ENOENT; > goto ERRORHANDLER; > } > > - if (pstrHostIFconnectAttr->bssid) { > + if (attr->bssid) { > hif_drv->usr_conn_req.bssid = kmalloc(6, GFP_KERNEL); > - memcpy(hif_drv->usr_conn_req.bssid, > pstrHostIFconnectAttr->bssid, 6); > + memcpy(hif_drv->usr_conn_req.bssid, attr->bssid, 6); > } > > - hif_drv->usr_conn_req.ssid_len = pstrHostIFconnectAttr->ssid_len; > - if (pstrHostIFconnectAttr->ssid) { > - hif_drv->usr_conn_req.ssid = > kmalloc(pstrHostIFconnectAttr->ssid_len + 1, GFP_KERNEL); > - memcpy(hif_drv->usr_conn_req.ssid, > -pstrHostIFconnectAttr->ssid, > -pstrHostIFconnectAttr->ssid_len); > - hif_drv->usr_conn_req.ssid[pstrHostIFconnectAttr->ssid_len] = > '\0'; > + hif_drv->usr_conn_req.ssid_len = attr->ssid_len; > + if (attr->ssid) { > + hif_drv->usr_conn_req.ssid = kmalloc(attr->ssid_len + 1, > GFP_KERNEL); > + memcpy(hif_drv->usr_conn_req.ssid, attr->ssid, attr->ssid_len); > + hif_drv->usr_conn_req.ssid[attr->ssid_len] = '\0'; > } > > - hif_drv->usr_conn_req.ies_len = pstrHostIFconnectAttr->ies_len; > - if (pstrHostIFconnectAttr->ies) { > - hif_drv->usr_conn_req.ies = > kmalloc(pstrHostIFconnectAttr->ies_len, GFP_KERNEL); > - memcpy(hif_drv->usr_conn_req.ies, > -pstrHostIFconnectAttr->ies, > -pstrHostIFconnectAttr->ies_len); > + hif_drv->usr_conn_req.ies_len = attr->ies_len; > + if (attr->ies) { > + hif_drv->usr_conn_req.ies = kmalloc(attr->ies_len, GFP_KERNEL); > + memcpy(hif_drv->usr_conn_req.ies, attr->ies, attr->ies_len); > } > > - hif_drv->usr_conn_req.security = pstrHostIFconnectAttr->security; > - hif_drv->usr_conn_req.auth_type = pstrHostIFconnectAttr->auth_type; > - hif_drv->usr_conn_req.conn_result = pstrHostIFconnectAttr->result; > - hif_drv->usr_conn_req.arg = pstrHostIFconnectAttr->arg; > + hif_drv->usr_conn_req.security = attr->security; > + hif_drv->usr_conn_req.auth_type = attr->auth_type; > + hif_drv->usr_conn_req.conn_result = attr->result; > + hif_drv->usr_conn_req.arg = attr->arg; > > wid_list[wid_cnt].id = WID_SUCCESS_FRAME_COUNT; > wid_list[wid_cnt].type = WID_INT; > @@ -977,7 +973,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, > wid_list[wid_cnt].size = hif_drv->usr_conn_req.ies_len; > wid_cnt++; > > - if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { > + if (memcmp("DIRECT-", attr->ssid, 7)) { > info_element_size = hif_drv->usr_conn_req.ies_len; > info_element = kmalloc(info_element_size, GFP_KERNEL); > memcpy(info_element, hif_drv->usr_conn_req.ies, > @@ -990,7 +986,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, > wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.security; > wid_cnt++; > > - if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) > + if (memcmp("DIRECT-", attr->ssid, 7)) > mode_11i = hif_drv->usr_conn_req.security; > > wid_list[wid_cnt].id = (u16)WID_AUTH_TYPE; > @@ -999,7 +995,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, > wid_list[wid_cnt].val = (
Re: [PATCH 04/14] staging: wilc1000: rename host_int_ParseJoinBssParam() and it's variable using camelCase
It is hard to review this. Anyway, Reviewed-by: Claudiu Beznea On 18.01.2018 15:17, Ajay Singh wrote: > fix "Avoid CamelCase:" issue reported by checkpatch.pl script > Rename host_int_ParseJoinBssParam() & its variables name using > camelCase. > > Signed-off-by: Ajay Singh > --- > drivers/staging/wilc1000/host_interface.c | 230 > +++--- > 1 file changed, 115 insertions(+), 115 deletions(-) > > diff --git a/drivers/staging/wilc1000/host_interface.c > b/drivers/staging/wilc1000/host_interface.c > index 358354b..9f6365a 100644 > --- a/drivers/staging/wilc1000/host_interface.c > +++ b/drivers/staging/wilc1000/host_interface.c > @@ -265,7 +265,7 @@ static struct wilc_vif *join_req_vif; > #define FLUSHED_JOIN_REQ 1 > #define FLUSHED_BYTE_POS 79 > > -static void *host_int_ParseJoinBssParam(struct network_info > *ptstrNetworkInfo); > +static void *host_parse_join_bss_param(struct network_info *info); > static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx); > static s32 Handle_ScanDone(struct wilc_vif *vif, enum scan_event enuEvent); > static void host_if_work(struct work_struct *work); > @@ -1288,7 +1288,7 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif, > hif_drv->usr_scan_req.rcvd_ch_cnt++; > > pstrNetworkInfo->new_network = true; > - pJoinParams = > host_int_ParseJoinBssParam(pstrNetworkInfo); > + pJoinParams = > host_parse_join_bss_param(pstrNetworkInfo); > > > hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo, > > hif_drv->usr_scan_req.arg, > @@ -3870,152 +3870,152 @@ int wilc_setup_multicast_filter(struct wilc_vif > *vif, bool enabled, > return result; > } > > -static void *host_int_ParseJoinBssParam(struct network_info > *ptstrNetworkInfo) I would use host_int_parse_join_bss_param() of at least hif_parse_join_bss_param, if any. > +static void *host_parse_join_bss_param(struct network_info *info) > { > - struct join_bss_param *pNewJoinBssParam = NULL; > - u8 *pu8IEs; > - u16 u16IEsLen; > + struct join_bss_param *param = NULL; > + u8 *ies; > + u16 ies_len; > u16 index = 0; > - u8 suppRatesNo = 0; > - u8 extSuppRatesNo; > - u16 jumpOffset; > - u8 pcipherCount; > - u8 authCount; > - u8 pcipherTotalCount = 0; > - u8 authTotalCount = 0; > + u8 rates_no = 0; > + u8 ext_rates_no; > + u16 offset; > + u8 pcipher_cnt; > + u8 auth_cnt; > + u8 pcipher_total_cnt = 0; > + u8 auth_total_cnt = 0; > u8 i, j; > > - pu8IEs = ptstrNetworkInfo->ies; > - u16IEsLen = ptstrNetworkInfo->ies_len; > - > - pNewJoinBssParam = kzalloc(sizeof(*pNewJoinBssParam), GFP_KERNEL); > - if (pNewJoinBssParam) { > - pNewJoinBssParam->dtim_period = ptstrNetworkInfo->dtim_period; > - pNewJoinBssParam->beacon_period = > ptstrNetworkInfo->beacon_period; > - pNewJoinBssParam->cap_info = ptstrNetworkInfo->cap_info; > - memcpy(pNewJoinBssParam->bssid, ptstrNetworkInfo->bssid, 6); > - memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->ssid, > -ptstrNetworkInfo->ssid_len + 1); > - pNewJoinBssParam->ssid_len = ptstrNetworkInfo->ssid_len; > - memset(pNewJoinBssParam->rsn_pcip_policy, 0xFF, 3); > - memset(pNewJoinBssParam->rsn_auth_policy, 0xFF, 3); > - > - while (index < u16IEsLen) { > - if (pu8IEs[index] == SUPP_RATES_IE) { > - suppRatesNo = pu8IEs[index + 1]; > - pNewJoinBssParam->supp_rates[0] = suppRatesNo; > + ies = info->ies; > + ies_len = info->ies_len; > + > + param = kzalloc(sizeof(*param), GFP_KERNEL); > + if (param) { > + param->dtim_period = info->dtim_period; > + param->beacon_period = info->beacon_period; > + param->cap_info = info->cap_info; > + memcpy(param->bssid, info->bssid, 6); > + memcpy((u8 *)param->ssid, info->ssid, > +info->ssid_len + 1); > + param->ssid_len = info->ssid_len; > + memset(param->rsn_pcip_policy, 0xFF, 3); > + memset(param->rsn_auth_policy, 0xFF, 3); > + > + while (index < ies_len) { > + if (ies[index] == SUPP_RATES_IE) { > + rates_no = ies[index + 1]; > + param->supp_rates[0] = rates_no; > index += 2; > > - for (i = 0; i < suppRatesNo; i++) > - pNewJoinBssParam->supp_rates[i + 1] = > pu8IEs[index + i]; > + for (i = 0; i < rates_no; i++) > +
Re: [PATCH 10/14] staging: wilc1000: rename ptstrJoinBssParam variable to avoid camelCase
On 18.01.2018 15:17, Ajay Singh wrote: > fix "Avoid camelCase" issue reported by checkpatch.pl script. > > Signed-off-by: Ajay Singh > --- > drivers/staging/wilc1000/host_interface.c | 78 > +++ > 1 file changed, 39 insertions(+), 39 deletions(-) > > diff --git a/drivers/staging/wilc1000/host_interface.c > b/drivers/staging/wilc1000/host_interface.c > index 4ddd1a8..cc27b5a 100644 > --- a/drivers/staging/wilc1000/host_interface.c > +++ b/drivers/staging/wilc1000/host_interface.c > @@ -909,7 +909,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, > struct wid wid_list[8]; > u32 wid_cnt = 0, dummyval = 0; > u8 *cur_byte = NULL; > - struct join_bss_param *ptstrJoinBssParam; > + struct join_bss_param *j_bss_param; I would choose either join_bss_param or bss_param for the name. > struct host_if_drv *hif_drv = vif->hif_drv; > > if (memcmp(attr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) { > @@ -918,8 +918,8 @@ static s32 Handle_Connect(struct wilc_vif *vif, > return result; > } > > - ptstrJoinBssParam = attr->params; > - if (!ptstrJoinBssParam) { > + j_bss_param = attr->params; > + if (!j_bss_param) { > netdev_err(vif->ndev, "Required BSSID not found\n"); > result = -ENOENT; > goto ERRORHANDLER; > @@ -1027,8 +1027,8 @@ static s32 Handle_Connect(struct wilc_vif *vif, > netdev_err(vif->ndev, "Channel out of range\n"); > *(cur_byte++) = 0xFF; > } > - *(cur_byte++) = (ptstrJoinBssParam->cap_info) & 0xFF; > - *(cur_byte++) = ((ptstrJoinBssParam->cap_info) >> 8) & 0xFF; > + *(cur_byte++) = (j_bss_param->cap_info) & 0xFF; > + *(cur_byte++) = ((j_bss_param->cap_info) >> 8) & 0xFF; > > if (attr->bssid) > memcpy(cur_byte, attr->bssid, 6); > @@ -1038,57 +1038,57 @@ static s32 Handle_Connect(struct wilc_vif *vif, > memcpy(cur_byte, attr->bssid, 6); > cur_byte += 6; > > - *(cur_byte++) = (ptstrJoinBssParam->beacon_period) & 0xFF; > - *(cur_byte++) = ((ptstrJoinBssParam->beacon_period) >> 8) & 0xFF; > - *(cur_byte++) = ptstrJoinBssParam->dtim_period; > + *(cur_byte++) = (j_bss_param->beacon_period) & 0xFF; > + *(cur_byte++) = ((j_bss_param->beacon_period) >> 8) & 0xFF; > + *(cur_byte++) = j_bss_param->dtim_period; > > - memcpy(cur_byte, ptstrJoinBssParam->supp_rates, MAX_RATES_SUPPORTED + > 1); > + memcpy(cur_byte, j_bss_param->supp_rates, MAX_RATES_SUPPORTED + 1); > cur_byte += (MAX_RATES_SUPPORTED + 1); > > - *(cur_byte++) = ptstrJoinBssParam->wmm_cap; > - *(cur_byte++) = ptstrJoinBssParam->uapsd_cap; > + *(cur_byte++) = j_bss_param->wmm_cap; > + *(cur_byte++) = j_bss_param->uapsd_cap; > > - *(cur_byte++) = ptstrJoinBssParam->ht_capable; > - hif_drv->usr_conn_req.ht_capable = ptstrJoinBssParam->ht_capable; > + *(cur_byte++) = j_bss_param->ht_capable; > + hif_drv->usr_conn_req.ht_capable = j_bss_param->ht_capable; > > - *(cur_byte++) = ptstrJoinBssParam->rsn_found; > - *(cur_byte++) = ptstrJoinBssParam->rsn_grp_policy; > - *(cur_byte++) = ptstrJoinBssParam->mode_802_11i; > + *(cur_byte++) = j_bss_param->rsn_found; > + *(cur_byte++) = j_bss_param->rsn_grp_policy; > + *(cur_byte++) = j_bss_param->mode_802_11i; > > - memcpy(cur_byte, ptstrJoinBssParam->rsn_pcip_policy, > sizeof(ptstrJoinBssParam->rsn_pcip_policy)); > - cur_byte += sizeof(ptstrJoinBssParam->rsn_pcip_policy); > + memcpy(cur_byte, j_bss_param->rsn_pcip_policy, > sizeof(j_bss_param->rsn_pcip_policy));> +cur_byte += > sizeof(j_bss_param->rsn_pcip_policy); > > - memcpy(cur_byte, ptstrJoinBssParam->rsn_auth_policy, > sizeof(ptstrJoinBssParam->rsn_auth_policy)); > - cur_byte += sizeof(ptstrJoinBssParam->rsn_auth_policy); > + memcpy(cur_byte, j_bss_param->rsn_auth_policy, > sizeof(j_bss_param->rsn_auth_policy)); > + cur_byte += sizeof(j_bss_param->rsn_auth_policy); > > - memcpy(cur_byte, ptstrJoinBssParam->rsn_cap, > sizeof(ptstrJoinBssParam->rsn_cap)); > - cur_byte += sizeof(ptstrJoinBssParam->rsn_cap); > + memcpy(cur_byte, j_bss_param->rsn_cap, sizeof(j_bss_param->rsn_cap)); > + cur_byte += sizeof(j_bss_param->rsn_cap); > > *(cur_byte++) = REAL_JOIN_REQ; > - *(cur_byte++) = ptstrJoinBssParam->noa_enabled; > + *(cur_byte++) = j_bss_param->noa_enabled; > > - if (ptstrJoinBssParam->noa_enabled) { > - *(cur_byte++) = (ptstrJoinBssParam->tsf) & 0xFF; > - *(cur_byte++) = ((ptstrJoinBssParam->tsf) >> 8) & 0xFF; > - *(cur_byte++) = ((ptstrJoinBssParam->tsf) >> 16) & 0xFF; > - *(cur_byte++) = ((ptstrJoinBssParam->tsf) >> 24) & 0xFF; > + if (j_bss_param->noa_enabled) { > + *(cur_byte++) = (j_bss_param->tsf) & 0xFF; > + *(cur_byte++) = ((j_
Re: [PATCH 05/14] staging: wilc1000: rename camelCase used in Handle_DelAllSta() and its variable
On 18.01.2018 15:17, Ajay Singh wrote: > fix "Avoid camelCase" issue reported by checkpatch.pl script. > > Signed-off-by: Ajay Singh > --- > drivers/staging/wilc1000/host_interface.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/drivers/staging/wilc1000/host_interface.c > b/drivers/staging/wilc1000/host_interface.c > index 9f6365a..1ac079a 100644 > --- a/drivers/staging/wilc1000/host_interface.c > +++ b/drivers/staging/wilc1000/host_interface.c > @@ -2123,34 +2123,34 @@ static void Handle_AddStation(struct wilc_vif *vif, > kfree(wid.val); > } > > -static void Handle_DelAllSta(struct wilc_vif *vif, > - struct del_all_sta *pstrDelAllStaParam) > +static void handle_del_all_sta(struct wilc_vif *vif, > +struct del_all_sta *param) > { > s32 result = 0; > struct wid wid; > - u8 *pu8CurrByte; > + u8 *curr_byte; > u8 i; > - u8 au8Zero_Buff[6] = {0}; > + u8 zero_buff[6] = {0}; > > wid.id = (u16)WID_DEL_ALL_STA; > wid.type = WID_STR; > - wid.size = (pstrDelAllStaParam->assoc_sta * ETH_ALEN) + 1; > + wid.size = (param->assoc_sta * ETH_ALEN) + 1; > > - wid.val = kmalloc((pstrDelAllStaParam->assoc_sta * ETH_ALEN) + 1, > GFP_KERNEL); > + wid.val = kmalloc((param->assoc_sta * ETH_ALEN) + 1, GFP_KERNEL); > if (!wid.val) > goto ERRORHANDLER; > > - pu8CurrByte = wid.val; > + curr_byte = wid.val; > > - *(pu8CurrByte++) = pstrDelAllStaParam->assoc_sta; > + *(curr_byte++) = param->assoc_sta; > > for (i = 0; i < MAX_NUM_STA; i++) { > - if (memcmp(pstrDelAllStaParam->del_all_sta[i], au8Zero_Buff, > ETH_ALEN)) > - memcpy(pu8CurrByte, pstrDelAllStaParam->del_all_sta[i], > ETH_ALEN);> + if (memcmp(param->del_all_sta[i], zero_buff, > ETH_ALEN)) For future, you could use is_zero_ether_addr() if you ensure pstrDelAllStaParam->del_all_sta[i] is alligned to u16. > + memcpy(curr_byte, param->del_all_sta[i], ETH_ALEN); > else > continue; > > - pu8CurrByte += ETH_ALEN; > + curr_byte += ETH_ALEN; > } > > result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1, > @@ -2626,7 +2626,7 @@ static void host_if_work(struct work_struct *work) > break; > > case HOST_IF_MSG_DEL_ALL_STA: > - Handle_DelAllSta(msg->vif, &msg->body.del_all_sta_info); > + handle_del_all_sta(msg->vif, &msg->body.del_all_sta_info); > break; > > case HOST_IF_MSG_SET_TX_POWER: > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/14] fix to remove unnecessary parenthesis,typedef and avoid camelCase
All series Reviewed-by: Claudiu Beznea with the inline comments. Ajay, one general remark, please use Capital letters when beginning new sentences (I'm talking about commit descriptions). Thanks, Claudiu Beznea On 18.01.2018 15:16, Ajay Singh wrote: > This patch series contains changes to fix issues reported by checkpatch.pl > script. > > > Ajay Singh (14): > staging: wilc1000: remove unnecessary use of parentheses > staging: wilc1000: removed unnecessary defined enums typedef > staging: wilc1000: fix alignments to match open parenthesis > staging: wilc1000: rename host_int_ParseJoinBssParam() and it's > variable using camelCase > staging: wilc1000: rename camelCase used in Handle_DelAllSta() and its > variable > staging: wilc1000: rename strWIDList variable to wid_list to avoid > camelCase > staging: wilc1000: rename u32WidsCount variable to avoid camelCase > staging: wilc1000: rename pu8CurrByte variable to avoid camelCase > staging: wilc1000: rename pstrHostIFconnectAttr argument to avoid > camelCase > staging: wilc1000: rename ptstrJoinBssParam variable to avoid > camelCase > staging: wilc1000: rename strConnectInfo variable to avoid camelCase > staging: wilc1000: rename Handle_ScanDone() to avoid camelCase > staging: wilc1000: rename Handle_Connect() to avoid camelCase > staging: wilc1000: rename Handle_ConnectTimeout() and Handle_Key() > > drivers/staging/wilc1000/coreconfigurator.c | 2 +- > drivers/staging/wilc1000/host_interface.c | 936 > +++--- > drivers/staging/wilc1000/linux_wlan.c | 10 +- > drivers/staging/wilc1000/wilc_sdio.c | 4 +- > drivers/staging/wilc1000/wilc_spi.c | 20 +- > drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 64 +- > drivers/staging/wilc1000/wilc_wlan.c | 2 +- > drivers/staging/wilc1000/wilc_wlan_cfg.c | 6 +- > drivers/staging/wilc1000/wilc_wlan_if.h | 72 +- > 9 files changed, 555 insertions(+), 561 deletions(-) > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 04/14] staging: wilc1000: rename host_int_ParseJoinBssParam() and it's variable using camelCase
On Fri, Jan 19, 2018 at 01:20:00PM +0200, Claudiu Beznea wrote: > It is hard to review this. Anyway, Reviewed-by: Claudiu Beznea > > I have a script I use. It's sort of hacky, but it's a time saver. I've attached it. To review this one, I do `cat | rename_rev.pl -a` regards, dan carpenter #!/usr/bin/perl # This is a tool to help review variable rename patches. The goal is # to strip out the automatic sed renames and the white space changes # and leaves the interesting code changes. # # Example 1: A patch renames openInfo to open_info: # cat diff | rename_review.pl openInfo open_info # # Example 2: A patch swaps the first two arguments to some_func(): # cat diff | rename_review.pl \ #-e 's/some_func\((.*?),(.*?),/some_func\($2, $1,/' # # Example 3: A patch removes the xkcd_ prefix from some but not all the # variables. Instead of trying to figure out which variables were renamed # just remove the prefix from them all: # cat diff | rename_review.pl -ea 's/xkcd_//g' # # Example 4: A patch renames 20 CamelCase variables. To review this let's # just ignore all case changes and all '_' chars. # cat diff | rename_review -ea 'tr/[A-Z]/[a-z]/' -ea 's/_//g' # # The other arguments are: # -nc removes comments # -ns removes '\' chars if they are at the end of the line. use strict; use File::Temp qw/ :mktemp /; sub usage() { print "usage: cat diff | $0 old new old new old new...\n"; print " or: cat diff | $0 -e 's/old/new/g'\n"; print " -a : auto"; print " -e : execute on old lines\n"; print " -ea: execute on all lines\n"; print " -nc: no comments\n"; print " -nb: no unneeded braces\n"; print " -ns: no slashes at the end of a line\n"; print " -pull: for function pull. deletes context.\n"; print " -r : NULL, bool"; exit(1); } my @subs; my @strict_subs; my @cmds; my $strip_comments; my $strip_braces; my $strip_slashes; my $pull_context; my $auto; sub filter($) { my $line = shift(); my $old = 0; if ($line =~ /^-/) { $old = 1; } # remove the first char $line =~ s/^[ +-]//; if ($strip_comments) { $line =~ s/\/\*.*?\*\///g; $line =~ s/\/\/.*//; } foreach my $cmd (@cmds) { if ($old || $cmd->[0] =~ /^-ea$/) { eval "\$line =~ $cmd->[1]"; } } foreach my $sub (@subs) { if ($old) { $line =~ s/$sub->[0]/$sub->[1]/g; } } foreach my $sub (@strict_subs) { if ($old) { $line =~ s/\b$sub->[0]\b/$sub->[1]/g; } } # remove the newline so we can move curly braces here if we want. $line =~ s/\n//; return $line; } while (my $param1 = shift()) { if ($param1 =~ /^-a$/) { $auto = 1; next; } if ($param1 =~ /^-nc$/) { $strip_comments = 1; next; } if ($param1 =~ /^-nb$/) { $strip_braces = 1; next; } if ($param1 =~ /^-ns$/) { $strip_slashes = 1; next; } if ($param1 =~ /^-pull$/) { $pull_context = 1; next; } my $param2 = shift(); if ($param2 =~ /^$/) { usage(); } if ($param1 =~ /^-e(a|)$/) { push @cmds, [$param1, $param2]; next; } if ($param1 =~ /^-r$/) { if ($param2 =~ /bool/) { push @cmds, ["-e", "s/== true//"]; push @cmds, ["-e", "s/true ==//"]; push @cmds, ["-e", "s/([a-zA-Z\-\>\._]+) == false/!\$1/"]; next; } elsif ($param2 =~ /NULL/) { push @cmds, ["-e", "s/ != NULL//"]; push @cmds, ["-e", "s/([a-zA-Z\-\>\._0-9]+) == NULL/!\$1/"]; next; } elsif ($param2 =~ /BIT/) { push @cmds, ["-e", 's/1[uU]* *<< *(\d+)/BIT($1)/']; push @cmds, ["-e", 's/\(1 *<< *(\w+)\)/BIT($1)/']; push @cmds, ["-e", 's/\(BIT\((.*?)\)\)/BIT($1)/']; next; } usage(); } push @subs, [$param1, $param2]; } my ($oldfh, $oldfile) = mkstemp("/tmp/oldX"); my ($newfh, $newfile) = mkstemp("/tmp/newX"); my @input = ; # auto works on the observation that the - line comes before the + line when we # rename variables. Take the first - line. Find the first + line. Find the # one word difference. Test that the old word never occurs in the new text. if ($auto) { my %c_keywords = ( auto => 1, break => 1, case => 1, char => 1, const => 1, continue => 1, default => 1, do => 1, double => 1, else => 1, enum => 1, extern => 1, float => 1, for => 1, goto => 1, if => 1, int => 1,
Re: [PATCH 04/14] staging: wilc1000: rename host_int_ParseJoinBssParam() and it's variable using camelCase
On 19.01.2018 14:44, Dan Carpenter wrote: > On Fri, Jan 19, 2018 at 01:20:00PM +0200, Claudiu Beznea wrote: >> It is hard to review this. Anyway, Reviewed-by: Claudiu Beznea >> >> > > I have a script I use. It's sort of hacky, but it's a time saver. I've > attached it. > > To review this one, I do `cat | rename_rev.pl -a` Good do have it! Thanks, Claudiu Beznea > > regards, > dan carpenter > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 0/4] Remove checkpatch warnings
This patchset removes some warnings generated by checkpatch for cleanup of the rtl8723bs driver. Also some additional cleanups are introduced in the *[1/4] and *[3/4] patches to make the code according to the kernel coding style. Changes in v2 -Rebase and resend all patches. Changes in v3 -Edit the commit message in patch *[2/4] and remove dead code from the patch *[3/4]. Shreeya Patel (4): Staging: rtl8723bs: Replace true with x and false with !x Staging: rtl8723bs: Change names to conform to the kernel code Staging: rtl8723bs: Remove dead code Staging: rtl8723bs: Use !x instead of NULL comparison drivers/staging/rtl8723bs/hal/sdio_ops.c | 733 +++ 1 file changed, 358 insertions(+), 375 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/4] Staging: rtl8723bs: Replace true with x and false with !x
Replace true and false keywords with "x" and "!x" respectively to follow the kernel coding style. Signed-off-by: Shreeya Patel --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index 93ac083..aa52c31 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -191,8 +191,8 @@ static u32 sdio_read32(struct intf_hdl *pintfhdl, u32 addr) rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); if ( ((deviceId == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) || - (false == bMacPwrCtrlOn) || - (true == adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) + (!bMacPwrCtrlOn) || + (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) ) { err = sd_cmd52_read(pintfhdl, ftaddr, 4, (u8 *)&le_tmp); #ifdef SDIO_DEBUG_IO @@ -248,8 +248,8 @@ static s32 sdio_readN(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pbuf) rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); if ( ((deviceId == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) || - (false == bMacPwrCtrlOn) || - (true == adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) + (!bMacPwrCtrlOn) || + (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) ) return sd_cmd52_read(pintfhdl, ftaddr, cnt, pbuf); @@ -352,8 +352,8 @@ static s32 sdio_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pbuf) rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); if ( ((deviceId == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) || - (false == bMacPwrCtrlOn) || - (true == adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) + (!bMacPwrCtrlOn) || + (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) ) return sd_cmd52_write(pintfhdl, ftaddr, cnt, pbuf); @@ -513,7 +513,7 @@ static u32 sdio_write_port( padapter = pintfhdl->padapter; psdio = &adapter_to_dvobj(padapter)->intf_data; - if (padapter->hw_init_completed == false) { + if (!padapter->hw_init_completed) { DBG_871X("%s [addr = 0x%x cnt =%d] padapter->hw_init_completed == false\n", __func__, addr, cnt); return _FAIL; } @@ -577,7 +577,7 @@ static s32 _sdio_local_read( HalSdioGetCmdAddr8723BSdio(padapter, SDIO_LOCAL_DEVICE_ID, addr, &addr); rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); - if (false == bMacPwrCtrlOn) + if (!bMacPwrCtrlOn) return _sd_cmd52_read(pintfhdl, addr, cnt, pbuf); n = RND4(cnt); @@ -616,8 +616,8 @@ s32 sdio_local_read( rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); if ( - (false == bMacPwrCtrlOn) || - (true == adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) + (!bMacPwrCtrlOn) || + (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) ) return sd_cmd52_read(pintfhdl, addr, cnt, pbuf); @@ -662,8 +662,8 @@ s32 sdio_local_write( rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); if ( - (false == bMacPwrCtrlOn) || - (true == adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) + (!bMacPwrCtrlOn) || + (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) ) return sd_cmd52_write(pintfhdl, addr, cnt, pbuf); @@ -843,8 +843,7 @@ void ClearInterrupt8723BSdio(struct adapter *padapter) struct hal_com_data *pHalData; u8 *clear; - - if (true == padapter->bSurpriseRemoved) + if (padapter->bSurpriseRemoved) return; pHalData = GET_HAL_DATA(padapter); @@ -1161,8 +1160,7 @@ void sd_int_hdl(struct adapter *padapter) if ( - (padapter->bDriverStopped == true) || - (padapter->bSurpriseRemoved == true) + (padapter->bDriverStopped) || (padapter->bSurpriseRemoved) ) return; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PROJECT FUNDING..
Good day, Well We are investment Research Company and we undertake the services of assisting prospective companies and individuals to satisfactorily meet the needs of their capital investment abroad,I'm contacting you because We are currently expanding our global presence by investing in projects especially in the Area of Agriculture, Real Estate, Oil and Gas, Transportation, Energy.etc I was consulted and mandated by a client of mine to source for a reliable entrepreneur to assist invest funds totaling more than $5,000,000.00 (FIVE DOLLAR) in viable and lucrative business or sector Please kindly get back to me for more details Regards Albert ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/4] Staging: rtl8723bs: Change names to conform to the kernel code
Change names of some variables and functions to conform to the kernel coding style. The changes include some removal of CamelCase warnings and renaming the variable and field names that encode their type (eg the pointers seem to start with p). Signed-off-by: Shreeya Patel --- Changes in v3 -Edit the commit message. drivers/staging/rtl8723bs/hal/sdio_ops.c | 714 +++ 1 file changed, 357 insertions(+), 357 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index aa52c31..00b20c0 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -28,35 +28,35 @@ /* Creadted by Roger, 2011.01.31. */ /* */ static void HalSdioGetCmdAddr8723BSdio( - struct adapter *padapter, - u8 DeviceID, - u32 Addr, - u32 *pCmdAddr + struct adapter *adapter, + u8 device_id, + u32 addr, + u32 *cmdaddr ) { - switch (DeviceID) { + switch (device_id) { case SDIO_LOCAL_DEVICE_ID: - *pCmdAddr = ((SDIO_LOCAL_DEVICE_ID << 13) | (Addr & SDIO_LOCAL_MSK)); + *cmdaddr = ((SDIO_LOCAL_DEVICE_ID << 13) | (addr & SDIO_LOCAL_MSK)); break; case WLAN_IOREG_DEVICE_ID: - *pCmdAddr = ((WLAN_IOREG_DEVICE_ID << 13) | (Addr & WLAN_IOREG_MSK)); + *cmdaddr = ((WLAN_IOREG_DEVICE_ID << 13) | (addr & WLAN_IOREG_MSK)); break; case WLAN_TX_HIQ_DEVICE_ID: - *pCmdAddr = ((WLAN_TX_HIQ_DEVICE_ID << 13) | (Addr & WLAN_FIFO_MSK)); + *cmdaddr = ((WLAN_TX_HIQ_DEVICE_ID << 13) | (addr & WLAN_FIFO_MSK)); break; case WLAN_TX_MIQ_DEVICE_ID: - *pCmdAddr = ((WLAN_TX_MIQ_DEVICE_ID << 13) | (Addr & WLAN_FIFO_MSK)); + *cmdaddr = ((WLAN_TX_MIQ_DEVICE_ID << 13) | (addr & WLAN_FIFO_MSK)); break; case WLAN_TX_LOQ_DEVICE_ID: - *pCmdAddr = ((WLAN_TX_LOQ_DEVICE_ID << 13) | (Addr & WLAN_FIFO_MSK)); + *cmdaddr = ((WLAN_TX_LOQ_DEVICE_ID << 13) | (addr & WLAN_FIFO_MSK)); break; case WLAN_RX0FF_DEVICE_ID: - *pCmdAddr = ((WLAN_RX0FF_DEVICE_ID << 13) | (Addr & WLAN_RX0FF_MSK)); + *cmdaddr = ((WLAN_RX0FF_DEVICE_ID << 13) | (addr & WLAN_RX0FF_MSK)); break; default: @@ -66,64 +66,64 @@ static void HalSdioGetCmdAddr8723BSdio( static u8 get_deviceid(u32 addr) { - u8 devideId; - u16 pseudoId; + u8 devide_id; + u16 pseudo_id; - pseudoId = (u16)(addr >> 16); - switch (pseudoId) { + pseudo_id = (u16)(addr >> 16); + switch (pseudo_id) { case 0x1025: - devideId = SDIO_LOCAL_DEVICE_ID; + devide_id = SDIO_LOCAL_DEVICE_ID; break; case 0x1026: - devideId = WLAN_IOREG_DEVICE_ID; + devide_id = WLAN_IOREG_DEVICE_ID; break; /* case 0x1027: */ -/* devideId = SDIO_FIRMWARE_FIFO; */ +/* devide_id = SDIO_FIRMWARE_FIFO; */ /* break; */ case 0x1031: - devideId = WLAN_TX_HIQ_DEVICE_ID; + devide_id = WLAN_TX_HIQ_DEVICE_ID; break; case 0x1032: - devideId = WLAN_TX_MIQ_DEVICE_ID; + devide_id = WLAN_TX_MIQ_DEVICE_ID; break; case 0x1033: - devideId = WLAN_TX_LOQ_DEVICE_ID; + devide_id = WLAN_TX_LOQ_DEVICE_ID; break; case 0x1034: - devideId = WLAN_RX0FF_DEVICE_ID; + devide_id = WLAN_RX0FF_DEVICE_ID; break; default: -/* devideId = (u8)((addr >> 13) & 0xF); */ - devideId = WLAN_IOREG_DEVICE_ID; +/* devide_id = (u8)((addr >> 13) & 0xF); */ + devide_id = WLAN_IOREG_DEVICE_ID; break; } - return devideId; + return devide_id; } /* * Ref: *HalSdioGetCmdAddr8723BSdio() */ -static u32 _cvrt2ftaddr(const u32 addr, u8 *pdeviceId, u16 *poffset) +static u32 _cvrt2ftaddr(const u32 addr, u8 *pdevice_id, u16 *poffset) { - u8 deviceId; + u8 device_id; u16 offset; u32 ftaddr; - deviceId = get_deviceid(addr); + device_id = get_deviceid(addr); offset = 0; - switch (deviceId) { + switch (device_id) { case SDIO_LOCAL_DEVICE_ID: offset = addr & SDIO_LOCAL_MSK; break; @@ -140,44 +140,44 @@ static u32 _cvrt2ftaddr(const u32 addr, u8 *pdeviceId, u16 *poffset) case WLAN_IOREG_DEVICE_ID: default: - deviceId = WLAN_IOREG_DEVICE_ID; + device_id = WLAN_IOREG_DEVICE_ID; offset = addr
[PATCH v3 3/4] Staging: rtl8723bs: Remove dead code
"oldmem==NULL;" The above bug under the ifdef code would have caused a GCC warning if it were ever compiled. Hence, remove the dead ifdefed code from the file. Signed-off-by: Shreeya Patel --- Changes in v3 -Remove dead code. drivers/staging/rtl8723bs/hal/sdio_ops.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index 00b20c0..43800a1 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -453,21 +453,6 @@ static u32 sdio_read_port( cnt = _RND(cnt, psdio->block_transfer_len); /* cnt = sdio_align_size(cnt); */ - if (oldcnt != cnt) { -#ifdef SDIO_DYNAMIC_ALLOC_MEM - oldmem = mem; - mem = rtw_malloc(cnt); - if (mem == NULL) { - DBG_8192C(KERN_WARNING "%s: allocate memory %d bytes fail!\n", __func__, cnt); - mem = oldmem; - oldmem == NULL; - } -#else - /* in this case, caller should gurante the buffer is big enough */ - /* to receive data after alignment */ -#endif - } - err = _sd_read(intfhdl, addr, cnt, mem); #ifdef SDIO_DYNAMIC_ALLOC_MEM -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 4/4] Staging: rtl8723bs: Use !x instead of NULL comparison
If "x" is compared to NULL, use "!x" instead of it, so as to follow the kernel coding style. Signed-off-by: Shreeya Patel --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index 43800a1..b27942c 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -215,7 +215,7 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr) u8 *tmpbuf; tmpbuf = rtw_malloc(8); - if (NULL == tmpbuf) { + if (!tmpbuf) { DBG_8192C(KERN_ERR "%s: Allocate memory FAIL!(size =8) addr = 0x%x\n", __func__, addr); return SDIO_ERR_VAL32; } @@ -264,7 +264,7 @@ static s32 sdio_readN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf) ftaddr &= ~(u16)0x3; n = cnt + shift; tmpbuf = rtw_malloc(n); - if (NULL == tmpbuf) + if (!tmpbuf) return -1; err = sd_read(intfhdl, ftaddr, n, tmpbuf); @@ -367,7 +367,7 @@ static s32 sdio_writeN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf) ftaddr &= ~(u16)0x3; n = cnt + shift; tmpbuf = rtw_malloc(n); - if (NULL == tmpbuf) + if (!tmpbuf) return -1; err = sd_read(intfhdl, ftaddr, 4, tmpbuf); if (err) { @@ -730,7 +730,7 @@ static s32 ReadInterrupt8723BSdio(struct adapter *adapter, u32 *phisr) u8 val8, hisr_len; - if (phisr == NULL) + if (!phisr) return false; himr = GET_HAL_DATA(adapter)->sdio_himr; @@ -954,13 +954,13 @@ static struct recv_buf *sd_recv_rxfifo(struct adapter *adapter, u32 size) /* 3 1. alloc recvbuf */ recv_priv = &adapter->recvpriv; recvbuf = rtw_dequeue_recvbuf(&recv_priv->free_recv_buf_queue); - if (recvbuf == NULL) { + if (!recvbuf) { DBG_871X_LEVEL(_drv_err_, "%s: alloc recvbuf FAIL!\n", __func__); return NULL; } /* 3 2. alloc skb */ - if (recvbuf->pskb == NULL) { + if (!recvbuf->pskb) { SIZE_PTR tmpaddr = 0; SIZE_PTR alignment = 0; @@ -974,7 +974,7 @@ static struct recv_buf *sd_recv_rxfifo(struct adapter *adapter, u32 size) skb_reserve(recvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment)); } - if (recvbuf->pskb == NULL) { + if (!recvbuf->pskb) { DBG_871X("%s: alloc_skb fail! read =%d\n", __func__, readsize); return NULL; } @@ -1232,7 +1232,7 @@ u8 RecvOnePkt(struct adapter *adapter, u32 size) DBG_871X("+%s: size: %d+\n", __func__, size); - if (adapter == NULL) { + if (!adapter) { DBG_871X(KERN_ERR "%s: adapter is NULL!\n", __func__); return false; } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: android: ion: Zero CMA allocated memory
Since the CMA API is now used directly the allocated memory is no longer automatically zeroed. Explicitly zero CMA allocated memory to ensure that no data is exposed to userspace. Change-Id: I08e143707a0d31610821a7f16826c262bf3c1999 Signed-off-by: Liam Mark --- drivers/staging/android/ion/ion_cma_heap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c index 86196ff..91a9878 100644 --- a/drivers/staging/android/ion/ion_cma_heap.c +++ b/drivers/staging/android/ion/ion_cma_heap.c @@ -51,6 +51,8 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer, if (!pages) return -ENOMEM; + memset(page_address(pages), 0, size); + table = kmalloc(sizeof(*table), GFP_KERNEL); if (!table) goto err; -- 1.8.5.2 Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: android: ion: Zero CMA allocated memory
On Fri, Jan 19, 2018 at 11:16:47AM -0800, Liam Mark wrote: > Since the CMA API is now used directly the allocated memory is no longer > automatically zeroed. > > Explicitly zero CMA allocated memory to ensure that no data is exposed > to userspace. > > Change-Id: I08e143707a0d31610821a7f16826c262bf3c1999 How do I use this Gerrit tag? I type it into https://android-review.googlesource.com/ somewhere? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next] hv_netvsc: Use the num_online_cpus() for channel limit
From: Haiyang Zhang Since we no longer localize channel/CPU affiliation within one NUMA node, num_online_cpus() is used as the number of channel cap, instead of the number of processors in a NUMA node. This patch allows a bigger range for tuning the number of channels. Signed-off-by: Haiyang Zhang --- drivers/net/hyperv/rndis_filter.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index 91a67c5297f7..c3ca191fea7f 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -1221,7 +1221,6 @@ struct netvsc_device *rndis_filter_device_add(struct hv_device *dev, struct ndis_recv_scale_cap rsscap; u32 rsscap_size = sizeof(struct ndis_recv_scale_cap); u32 mtu, size; - const struct cpumask *node_cpu_mask; u32 num_possible_rss_qs; int i, ret; @@ -1290,14 +1289,8 @@ struct netvsc_device *rndis_filter_device_add(struct hv_device *dev, if (ret || rsscap.num_recv_que < 2) goto out; - /* -* We will limit the VRSS channels to the number CPUs in the NUMA node -* the primary channel is currently bound to. -* -* This also guarantees that num_possible_rss_qs <= num_online_cpus -*/ - node_cpu_mask = cpumask_of_node(cpu_to_node(dev->channel->target_cpu)); - num_possible_rss_qs = min_t(u32, cpumask_weight(node_cpu_mask), + /* This guarantees that num_possible_rss_qs <= num_online_cpus */ + num_possible_rss_qs = min_t(u32, num_online_cpus(), rsscap.num_recv_que); net_device->max_chn = min_t(u32, VRSS_CHANNEL_MAX, num_possible_rss_qs); -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next] hv_netvsc: Use the num_online_cpus() for channel limit
From: Haiyang Zhang Since we no longer localize channel/CPU affiliation within one NUMA node, num_online_cpus() is used as the number of channel cap, instead of the number of processors in a NUMA node. This patch allows a bigger range for tuning the number of channels. Signed-off-by: Haiyang Zhang --- drivers/net/hyperv/rndis_filter.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index 91a67c5297f7..c3ca191fea7f 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -1221,7 +1221,6 @@ struct netvsc_device *rndis_filter_device_add(struct hv_device *dev, struct ndis_recv_scale_cap rsscap; u32 rsscap_size = sizeof(struct ndis_recv_scale_cap); u32 mtu, size; - const struct cpumask *node_cpu_mask; u32 num_possible_rss_qs; int i, ret; @@ -1290,14 +1289,8 @@ struct netvsc_device *rndis_filter_device_add(struct hv_device *dev, if (ret || rsscap.num_recv_que < 2) goto out; - /* -* We will limit the VRSS channels to the number CPUs in the NUMA node -* the primary channel is currently bound to. -* -* This also guarantees that num_possible_rss_qs <= num_online_cpus -*/ - node_cpu_mask = cpumask_of_node(cpu_to_node(dev->channel->target_cpu)); - num_possible_rss_qs = min_t(u32, cpumask_weight(node_cpu_mask), + /* This guarantees that num_possible_rss_qs <= num_online_cpus */ + num_possible_rss_qs = min_t(u32, num_online_cpus(), rsscap.num_recv_que); net_device->max_chn = min_t(u32, VRSS_CHANNEL_MAX, num_possible_rss_qs); -- 2.15.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: lustre: Fix comment style
On Thu, 2018-01-18 at 16:51 +0100, Fabian Huegel wrote: > Most multi-line comments started on the first line, but the preferred > linux kernel style is to start multi-line comments on the second line. > Some comments became less readable after the change, so we changed them > to single-line comments. [] > diff --git a/drivers/staging/lustre/lustre/include/obd_class.h > b/drivers/staging/lustre/lustre/include/obd_class.h > > @@ -182,7 +179,8 @@ struct config_llog_data { > struct obd_export *cld_mgcexp; > struct mutexcld_lock; > int cld_type; > - unsigned intcld_stopping:1, /* we were told to stop > + unsigned intcld_stopping:1, /* > + * we were told to stop >* watching >*/ > cld_lostlock:1; /* lock not requeued */ probably better for both of these to be bool instead of bitfield. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3 3/7] x86/hyper-v: reenlightenment notifications support
On Fri, 19 Jan 2018, Vitaly Kuznetsov wrote: > kbuild test robot writes: > > > Hi Vitaly, > > > > Thank you for the patch! Perhaps something to improve: > > > > [auto build test WARNING on tip/auto-latest] > > [also build test WARNING on v4.15-rc8 next-20180118] > > [cannot apply to tip/x86/core kvm/linux-next] > > [if your patch is applied to the wrong git tree, please drop us a note to > > help improve the system] > > > > url: > > https://github.com/0day-ci/linux/commits/Vitaly-Kuznetsov/x86-kvm-hyperv-stable-clocksorce-for-L2-guests-when-running-nested-KVM-on-Hyper-V/20180119-160814 > > config: x86_64-allmodconfig (attached as .config) > > compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 > > reproduce: > > # save the attached .config to linux build tree > > make ARCH=x86_64 > > > > All warnings (new ones prefixed by >>): > > > >In file included from include/linux/kasan.h:17:0, > > from include/linux/slab.h:129, > > from include/linux/irq.h:26, > > from arch/x86/include/asm/hardirq.h:6, > > from include/linux/hardirq.h:9, > > from include/linux/interrupt.h:13, > > from arch/x86/include/asm/mshyperv.h:8, > > from arch/x86//entry/vdso/vdso32/../vclock_gettime.c:20, > > from arch/x86//entry/vdso/vdso32/vclock_gettime.c:33: > >arch/x86/include/asm/pgtable.h: In function 'clone_pgd_range': > >arch/x86/include/asm/pgtable.h:1129:9: error: implicit declaration of > > function 'kernel_to_user_pgdp'; did you mean 'u64_to_user_ptr'? > > [-Werror=implicit-function-declaration] > > memcpy(kernel_to_user_pgdp(dst), kernel_to_user_pgdp(src), > > ^~~ > > Sorry but I'm failing to see how this (and all the rest) is related to > my patch ... You added '#include ' to mshyperv.h which is included in vclock_gettime.c and pulls in other stuff which fails to expand Thanks, tglx ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: lnet: prefer kcalloc over kzalloc with multiply
Use kcalloc for allocating an array instead of kzalloc with multiply. kcalloc is the preferred API. Issue reported by checkpatch.pl Signed-off-by: Sumit Pundir --- drivers/staging/lustre/lnet/lnet/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/config.c b/drivers/staging/lustre/lnet/lnet/config.c index 1516ac6..0aea268 100644 --- a/drivers/staging/lustre/lnet/lnet/config.c +++ b/drivers/staging/lustre/lnet/lnet/config.c @@ -1146,7 +1146,7 @@ lnet_ipaddr_enumerate(__u32 **ipaddrsp) if (nif <= 0) return nif; - ipaddrs = kzalloc(nif * sizeof(*ipaddrs), GFP_KERNEL); + ipaddrs = kcalloc(nif, sizeof(*ipaddrs), GFP_KERNEL); if (!ipaddrs) { CERROR("Can't allocate ipaddrs[%d]\n", nif); lnet_ipif_free_enumeration(ifnames, nif); @@ -1179,7 +1179,7 @@ lnet_ipaddr_enumerate(__u32 **ipaddrsp) *ipaddrsp = ipaddrs; } else { if (nip > 0) { - ipaddrs2 = kzalloc(nip * sizeof(*ipaddrs2), + ipaddrs2 = kcalloc(nip, sizeof(*ipaddrs2), GFP_KERNEL); if (!ipaddrs2) { CERROR("Can't allocate ipaddrs[%d]\n", nip); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel