[PATCH 01/10] staging: wilc1000: remove ununsed variable and associated line
From: Hari Prasath Gujulan Elango This patch removes a unused variable 'u16RespLen' that is assigned a value that is never used. The line that does the assignment is also removed. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/coreconfigurator.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index ed6ac45..67cffc3c 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -1739,7 +1739,6 @@ s32 ParseResponse(u8 *resp, tstrWID *pstrWIDcfgResult) s32 ParseWriteResponse(u8 *pu8RespBuffer) { s32 s32Error = WILC_FAIL; - u16 u16RespLen = 0; u16 u16WIDtype = (u16)WID_NIL; /* Check whether the received frame is a valid response */ @@ -1748,9 +1747,6 @@ s32 ParseWriteResponse(u8 *pu8RespBuffer) return WILC_FAIL; } - /* Extract Response Length */ - u16RespLen = MAKE_WORD16(pu8RespBuffer[2], pu8RespBuffer[3]); - u16WIDtype = MAKE_WORD16(pu8RespBuffer[4], pu8RespBuffer[5]); /* Check for WID_STATUS ID and then check the length and status value */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/10] staging: wilc1000: remove redundant initialization of variable
From: Hari Prasath Gujulan Elango This patch removes the redundant initialization of the variable 'st' as it is reassigned a new value before its being used anywhere else. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/coreconfigurator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 67cffc3c..eb685fe 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -605,7 +605,7 @@ INLINE u16 get_cap_info(u8 *data) { u16 cap_info = 0; u16 index= MAC_HDR_LEN; - tenuFrmSubtype st = BEACON; + tenuFrmSubtype st; st = get_sub_type(data); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/10] staging: wilc1000: remove ununsed if..else.. code blocks
From: Hari Prasath Gujulan Elango This patch removes ununsed if..else... code blocks. Its actually some dead code. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/coreconfigurator.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index eb685fe..b069614 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -1568,14 +1568,6 @@ s32 further_process_response(u8 *resp, case WID_STR: WILC_memcpy(cfg_str, resp + idx, cfg_len); /* cfg_str[cfg_len] = '\0'; //mostafa: no need currently for NULL termination */ - if (process_wid_num) { - /*fprintf(out_file,"0x%4.4x = %s\n",g_wid_num, -* cfg_str);*/ - } else { - /*fprintf(out_file,"%s = %s\n",gastrWIDs[cnt].cfg_switch, -* cfg_str);*/ - } - if (pstrWIDresult->s32ValueSize >= cfg_len) { WILC_memcpy(pstrWIDresult->ps8WidVal, cfg_str, cfg_len); /* mostafa: no need currently for the extra NULL byte */ pstrWIDresult->s32ValueSize = cfg_len; @@ -1591,13 +1583,6 @@ s32 further_process_response(u8 *resp, WILC_strncpy(pstrWIDresult->ps8WidVal, cfg_str, WILC_strlen(cfg_str)); pstrWIDresult->ps8WidVal[WILC_strlen(cfg_str)] = '\0'; - if (process_wid_num) { - /*fprintf(out_file,"0x%4.4x = %s\n",g_wid_num, -* cfg_str);*/ - } else { - /*fprintf(out_file,"%s = %s\n",gastrWIDs[cnt].cfg_switch, -* cfg_str);*/ - } break; case WID_IP: @@ -1606,13 +1591,6 @@ s32 further_process_response(u8 *resp, MAKE_WORD16(resp[idx + 2], resp[idx + 3]) ); conv_int_to_ip(cfg_str, cfg_int); - if (process_wid_num) { - /*fprintf(out_file,"0x%4.4x = %s\n",g_wid_num, -* cfg_str);*/ - } else { - /*fprintf(out_file,"%s = %s\n",gastrWIDs[cnt].cfg_switch, -* cfg_str);*/ - } break; case WID_BIN_DATA: -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/10] staging: wilc1000: remove ununsed variable & corresponding lines
From: Hari Prasath Gujulan Elango This patch removes a couple of ununsed variable.The lines in which these variables are assigned are also removed as they are not necessary. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/linux_mon.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index f5296f5..9a38d76 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -237,14 +237,12 @@ static void mgmt_tx_complete(void *priv, int status) } static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len) { - linux_wlan_t *nic; struct tx_complete_mon_data *mgmt_tx = NULL; if (dev == NULL) { PRINT_D(HOSTAPD_DBG, "ERROR: dev == NULL\n"); return WILC_FAIL; } - nic = netdev_priv(dev); netif_stop_queue(dev); mgmt_tx = kmalloc(sizeof(struct tx_complete_mon_data), GFP_ATOMIC); @@ -298,7 +296,6 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len) static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb, struct net_device *dev) { - struct ieee80211_radiotap_header *rtap_hdr; u32 rtap_len, i, ret = 0; struct WILC_WFI_mon_priv *mon_priv; @@ -318,7 +315,6 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb, return WILC_FAIL; } - rtap_hdr = (struct ieee80211_radiotap_header *)skb->data; rtap_len = ieee80211_get_radiotap_len(skb->data); if (skb->len < rtap_len) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/10] staging: wilc1000: remove redundant assignment of variable
From: Hari Prasath Gujulan Elango This patch the removes the redundant assignement of the variable ret as its being overwritren before being used anywhere. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 3af91f7..d28c410 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1782,7 +1782,7 @@ static int wilc_wlan_stop(void) /**/ reg = ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 8) | (1 << 9) | (1 << 26) | (1 << 29) | (1 << 30) | (1 << 31)); /**/ /**/ - ret = p->hif_func.hif_write_reg(WILC_GLB_RESET_0, reg); /**/ + p->hif_func.hif_write_reg(WILC_GLB_RESET_0, reg); /**/ reg = ~(1 << 10); /**/ /**/ ret = p->hif_func.hif_write_reg(WILC_GLB_RESET_0, reg); /**/ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/10] staging: wilc1000: remove unused variable
From: Hari Prasath Gujulan Elango This patch removes a unused variable timeout and the associated code. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/linux_wlan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index b352c50..5a794df 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -868,7 +868,6 @@ static int linux_wlan_txq_task(void *vp) #define TX_BACKOFF_WEIGHT_MIN (0) #define TX_BACKOFF_WEIGHT_UNIT_MS (10) int backoff_weight = TX_BACKOFF_WEIGHT_MIN; - signed long timeout; #endif /* inform wilc1000_wlan_init that TXQ task is started. */ @@ -906,7 +905,6 @@ static int linux_wlan_txq_task(void *vp) } if (ret == WILC_TX_ERR_NO_BUF) { /* failed to allocate buffers in chip. */ - timeout = msecs_to_jiffies(TX_BACKOFF_WEIGHT_UNIT_MS << backoff_weight); do { /* Back off from sending packets for some time. */ /* schedule_timeout will allow RX task to run and free buffers.*/ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/10] staging: wilc1000: remove ununsed variable
From: Hari Prasath Gujulan Elango This patch removes ununsed variable 'ret'. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/wilc_wlan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index d28c410..def72fd 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -118,11 +118,10 @@ static void wilc_debug(uint32_t flag, char *fmt, ...) { char buf[256]; va_list args; - int len; if (flag & dbgflag) { va_start(args, fmt); - len = vsprintf(buf, fmt, args); + vsprintf(buf, fmt, args); va_end(args); if (g_wlan.os_func.os_debug) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/10] staging: wilc1000: remove ununsed variable & associated code
From: Hari Prasath Gujulan Elango This patch removes the ununsed variable 'priv' at multiple instances and all its associated code where its assigned a value. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 92064db..28b1764 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -144,9 +144,7 @@ bool g_wep_keys_saved = false; void clear_shadow_scan(void *pUserVoid) { - struct WILC_WFI_priv *priv; int i; - priv = (struct WILC_WFI_priv *)pUserVoid; if (op_ifcs == 0) { WILC_TimerDestroy(&hAgingTimer, NULL); PRINT_INFO(CORECONFIG_DBG, "destroy aging timer\n"); @@ -219,9 +217,7 @@ void refresh_scan(void *pUserVoid, uint8_t all, bool bDirectScan) void reset_shadow_found(void *pUserVoid) { - struct WILC_WFI_priv *priv; int i; - priv = (struct WILC_WFI_priv *)pUserVoid; for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { astrLastScannedNtwrksShadow[i].u8Found = 0; @@ -230,9 +226,7 @@ void reset_shadow_found(void *pUserVoid) void update_scan_time(void *pUserVoid) { - struct WILC_WFI_priv *priv; int i; - priv = (struct WILC_WFI_priv *)pUserVoid; for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { astrLastScannedNtwrksShadow[i].u32TimeRcvdInScan = jiffies; } @@ -240,11 +234,9 @@ void update_scan_time(void *pUserVoid) void remove_network_from_shadow(void *pUserVoid) { - struct WILC_WFI_priv *priv; unsigned long now = jiffies; int i, j; - priv = (struct WILC_WFI_priv *)pUserVoid; for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) { if (time_after(now, astrLastScannedNtwrksShadow[i].u32TimeRcvdInScan + (unsigned long)(SCAN_RESULT_EXPIRE))) { @@ -281,11 +273,9 @@ void clear_duringIP(void *pUserVoid) int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid) { - struct WILC_WFI_priv *priv; int8_t state = -1; int i; - priv = (struct WILC_WFI_priv *)pUserVoid; if (u32LastScannedNtwrksCountShadow == 0) { PRINT_D(CFG80211_DBG, "Starting Aging timer\n"); WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL); @@ -305,11 +295,9 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid) void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid, void *pJoinParams) { - struct WILC_WFI_priv *priv; int8_t ap_found = is_network_in_shadow(pstrNetworkInfo, pUserVoid); uint32_t ap_index = 0; uint8_t rssi_index = 0; - priv = (struct WILC_WFI_priv *)pUserVoid; if (u32LastScannedNtwrksCountShadow >= MAX_NUM_SCANNED_NETWORKS_SHADOW) { PRINT_D(CFG80211_DBG, "Shadow network reached its maximum limit\n"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/10] staging: wilc1000: remove unused variable msg_len
From: Hari Prasath Gujulan Elango This patch removes a ununsed variable msg_len and its associated code. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index 3cffe55..04d0327 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -513,7 +513,6 @@ static int wilc_wlan_cfg_indicate_rx(uint8_t *frame, int size, wilc_cfg_rsp_t *r int ret = 1; uint8_t msg_type; uint8_t msg_id; - uint16_t msg_len; #ifdef WILC_FULLY_HOSTING_AP u32 *ptru32Frame; bool bStatus = frame[2]; @@ -528,11 +527,6 @@ static int wilc_wlan_cfg_indicate_rx(uint8_t *frame, int size, wilc_cfg_rsp_t *r msg_type = frame[0]; msg_id = frame[1]; /* seq no */ -#ifdef BIG_ENDIAN - msg_len = (frame[2] << 8) | frame[3]; -#else - msg_len = (frame[3] << 8) | frame[2]; -#endif frame += 4; size -= 4; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/10] staging: wilc1000: use BIT macro
From: Hari Prasath Gujulan Elango This patch addresses the checkpatch warning advising the usage of the BIT macro for Bit shift operation. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/wilc_wlan_if.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 8ed51e3..8735a6a 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -43,8 +43,8 @@ / #define HIF_SDIO (0) -#define HIF_SPI(1 << 0) -#define HIF_SDIO_GPIO_IRQ (1 << 2) +#define HIF_SPIBIT(0) +#define HIF_SDIO_GPIO_IRQ BIT(2) / -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/6] Staging: comedi: daqboard2000: Simplify a trivial if-return sequence
On Friday 19 June 2015 07:38 PM, Sudip Mukherjee wrote: > On Fri, Jun 19, 2015 at 06:00:06AM +, Abdul, Hussain (H.) wrote: >> From: Abdul Hussain >> >> This patch simplify a trivial if-return sequence. Possibly combine with >> a preceding function call. >> >> Signed-off-by: Abdul Hussain >> --- > >> -return 0; >> +return subdev_8255_init(dev, s, daqboard2000_8255_cb, >> dioP2ExpansionIO8Bit); > this is introducing new checkpatch warning about line over 80 characters > > regards > sudip > Sudip, I addressed the above issue and resent the patch set v2. Thanks, Abdul ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: sm750fb: remove unused variables
From: Hari Prasath Gujulan Elango This patch removes unused variables as reported by cppcheck Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/sm750fb/ddk750_chip.c | 3 +-- drivers/staging/sm750fb/ddk750_mode.c | 3 +-- drivers/staging/sm750fb/ddk750_sii164.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c index f4975d2..e8ac6e6 100644 --- a/drivers/staging/sm750fb/ddk750_chip.c +++ b/drivers/staging/sm750fb/ddk750_chip.c @@ -103,7 +103,6 @@ unsigned int getChipClock(void) void setChipClock(unsigned int frequency) { pll_value_t pll; - unsigned int ulActualMxClk; #if 1 /* Cheok_0509: For SM750LE, the chip clock is fixed. Nothing to set. */ if (getChipType() == SM750LE) @@ -122,7 +121,7 @@ void setChipClock(unsigned int frequency) * Sometime, the chip cannot set up the exact clock required by User. * Return value from calcPllValue() gives the actual possible clock. */ - ulActualMxClk = calcPllValue(frequency, &pll); + calcPllValue(frequency, &pll); /* Master Clock Control: MXCLK_PLL */ POKE32(MXCLK_PLL_CTRL, formatPllReg(&pll)); diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c index 74313ff..e67e1e9 100644 --- a/drivers/staging/sm750fb/ddk750_mode.c +++ b/drivers/staging/sm750fb/ddk750_mode.c @@ -188,11 +188,10 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock) { pll_value_t pll; - unsigned int uiActualPixelClk; pll.inputFreq = DEFAULT_INPUT_CLOCK; pll.clockType = clock; - uiActualPixelClk = calcPllValue(parm->pixel_clock, &pll); + calcPllValue(parm->pixel_clock, &pll); if(getChipType() == SM750LE){ /* set graphic mode via IO method */ outb_p(0x88, 0x3d4); diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c index b6395b8..2ac3470 100644 --- a/drivers/staging/sm750fb/ddk750_sii164.c +++ b/drivers/staging/sm750fb/ddk750_sii164.c @@ -345,8 +345,7 @@ void sii164EnableHotPlugDetection( unsigned char enableHotPlug ) { -unsigned char detectReg; -detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); +i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); /* Depending on each DVI controller, need to enable the hot plug based on each individual chip design. */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] android/ion: fix coding style
Signed-off-by: zack.chang --- drivers/staging/android/ion/ion_chunk_heap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/ion/ion_chunk_heap.c b/drivers/staging/android/ion/ion_chunk_heap.c index 5474615..0813163 100644 --- a/drivers/staging/android/ion/ion_chunk_heap.c +++ b/drivers/staging/android/ion/ion_chunk_heap.c @@ -173,8 +173,8 @@ struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data) chunk_heap->heap.ops = &chunk_heap_ops; chunk_heap->heap.type = ION_HEAP_TYPE_CHUNK; chunk_heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE; - pr_debug("%s: base %lu size %zu align %ld\n", __func__, chunk_heap->base, - heap_data->size, heap_data->align); + pr_debug("%s: base %lu size %zu align %ld\n", __func__, + chunk_heap->base, heap_data->size, heap_data->align); return &chunk_heap->heap; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: wilc1000: modify type casting warning
This silences the warning but really the warnings indicate real bugs which need to be fixed. Silencing these warnings makes the bugs harder to find so it is a step in the wrong direction. Change SendConfigPkt() so that drvHandler is a pointer. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 0/6] Staging: comedi: Simplify a trivial if-return sequence
On 22/06/15 07:10, Abdul, Hussain (H.) wrote: This patch simplify a trivial if-return sequence. Possibly combine with a preceding function call. Abdul Hussain (6): staging: comedi: dmm32at: Simplify a trivial if-return sequence staging: comedi: fl512: Simplify a trivial if-return sequence staging: comedi: daqboard2000: Simplify a trivial if-return sequence staging: comedi: dac02: Simplify a trivial if-return sequence staging: comedi: ni_daq_dio24: Simplify a trivial if-return sequence staging: comedi: s626: Simplify a trivial if-return sequence drivers/staging/comedi/drivers/dac02.c| 6 +- drivers/staging/comedi/drivers/daqboard2000.c | 8 ++-- drivers/staging/comedi/drivers/dmm32at.c | 6 +- drivers/staging/comedi/drivers/fl512.c| 6 +- drivers/staging/comedi/drivers/ni_daq_dio24.c | 6 +- drivers/staging/comedi/drivers/s626.c | 6 +- 6 files changed, 7 insertions(+), 31 deletions(-) Looks good. Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] android/ion: fix coding style
On 06/22, zack.chang wrote: Nice, however there is to little information in the commit message of wha exactly has been fixed. I assume it is 'line over 80 chars', right? and this information shoule be wrien there. thanks - konrad > Signed-off-by: zack.chang > --- > drivers/staging/android/ion/ion_chunk_heap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/android/ion/ion_chunk_heap.c > b/drivers/staging/android/ion/ion_chunk_heap.c > index 5474615..0813163 100644 > --- a/drivers/staging/android/ion/ion_chunk_heap.c > +++ b/drivers/staging/android/ion/ion_chunk_heap.c > @@ -173,8 +173,8 @@ struct ion_heap *ion_chunk_heap_create(struct > ion_platform_heap *heap_data) > chunk_heap->heap.ops = &chunk_heap_ops; > chunk_heap->heap.type = ION_HEAP_TYPE_CHUNK; > chunk_heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE; > - pr_debug("%s: base %lu size %zu align %ld\n", __func__, > chunk_heap->base, > - heap_data->size, heap_data->align); > + pr_debug("%s: base %lu size %zu align %ld\n", __func__, > + chunk_heap->base, heap_data->size, heap_data->align); > > return &chunk_heap->heap; > > -- > 1.9.1 > > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: wilc1000: modify type casting warning
On Tue, Jun 16, 2015 at 06:06:43AM -0700, Greg KH wrote: > This shows you are doing something really wrong here, why not just fix > the function type to be a real pointer to a real structure? You are right, of course. > Or even better, just remove the parameter as I don't think they are > even used. I don't know how far you traced the code, you may be right. It eventually becomes driver_handler[] in wilc_wlan_cfg_commit() and we do this: drivers/staging/wilc1000/wilc_wlan.c 1883 cfg->wid_header[1] = seq_no;/* sequence number */ 1884 cfg->wid_header[2] = (uint8_t)total_len; 1885 cfg->wid_header[3] = (uint8_t)(total_len >> 8); 1886 cfg->wid_header[4] = (uint8_t)driver_handler; 1887 cfg->wid_header[5] = (uint8_t)(driver_handler >> 8); 1888 cfg->wid_header[6] = (uint8_t)(driver_handler >> 16); 1889 cfg->wid_header[7] = (uint8_t)(driver_handler >> 24); We put it in the header. 1890 p->cfg_seq_no = seq_no; 1891 1892 /** 1893 * Add to TX queue 1894 **/ 1895 1896 /*Edited by Amr - BugID_4720*/ 1897 if (!wilc_wlan_txq_add_cfg_pkt(&cfg->wid_header[0], total_len)) And I don't know what we do with it after this. 1898 return -1; 1899 1900 return 0; 1901 } regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging : Comedi : comedi_fops : Fixed the return error code
On 21/06/15 11:01, Santosh wrote: This patch fixes the checkpatch.pl warning: WARNING: ENOSYS means 'invalid syscall nr' and nothing else Regards, Santosh Pai 0001-staging-Comedi-comedi_fops-Fixed-the-return-error-co.patch Greg doesn't usually take patches in attachments. From 502464417255edb52a1db71146e2f33e67df87ce Mon Sep 17 00:00:00 2001 From: sanpai Date: Sun, 21 Jun 2015 15:05:00 +0530 Subject: [PATCH] staging : Comedi : comedi_fops : Fixed the return error code try_module_get fails when the reference count of the module is not allowed to be incremented ,and hence -EPERM is returned. Signed-off-by: sanpai --- drivers/staging/comedi/comedi_fops.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 985d94b..d6a37e9 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2606,7 +2606,7 @@ static int comedi_open(struct inode *inode, struct file *file) } if (dev->attached && dev->use_count == 0) { if (!try_module_get(dev->driver->module)) { - rc = -ENOSYS; + rc = -EPERM; Why -EPERM? I think either -ENODEV or -ENXIO would be better. goto out; } if (dev->open) { -- 1.7.9.5 -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: comedi: fix cast warning in comedi_compat32.c
On 20/06/15 15:38, Geliang Tang wrote: This patch fixes the following sparse warning: drivers/staging/comedi/comedi_compat32.c:205:16: warning: cast removes address space of expression Signed-off-by: Geliang Tang --- Changes in v2: - compat_ptr() is substituted by 'unsigned long'. --- drivers/staging/comedi/comedi_compat32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c index 2584824..894a50c 100644 --- a/drivers/staging/comedi/comedi_compat32.c +++ b/drivers/staging/comedi/comedi_compat32.c @@ -202,7 +202,7 @@ static int get_compat_cmd(struct comedi_cmd __user *cmd, err |= __get_user(temp.uint, &cmd32->stop_arg); err |= __put_user(temp.uint, &cmd->stop_arg); err |= __get_user(temp.uptr, &cmd32->chanlist); - err |= __put_user(compat_ptr(temp.uptr), &cmd->chanlist); + err |= __put_user((unsigned long)(temp.uptr), &cmd->chanlist); err |= __get_user(temp.uint, &cmd32->chanlist_len); err |= __put_user(temp.uint, &cmd->chanlist_len); err |= __get_user(temp.uptr, &cmd32->data); Now it removes the call to compat_ptr(), so it won't work. Your first patch was better, apart from exceeding the 80 character line limit. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: i2o: iop.c: Fix pointer declarations
On Sat, Jun 20, 2015 at 12:06:16PM -0700, Joseph Kogut wrote: > Kernel coding style dictates that pointer declarations > have the asterisk next to the data name. > > Signed-off-by: Joseph Kogut > --- > drivers/staging/i2o/iop.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) i2o has been removed from staging. Please update your tree. regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] drivers: staging: rtl8192u: Fix "space required before the open parenthesis '('" errors
On Sat, Jun 20, 2015 at 03:56:08PM -0500, Greg Donald wrote: > Fix checkpatch.pl "space required before the open parenthesis '('" errors > > Signed-off-by: Greg Donald > --- > .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c| 97 > ++ > 1 file changed, 44 insertions(+), 53 deletions(-) > > diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c > b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c > index c2588f8..df20979 100644 > --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c > +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c > @@ -127,8 +127,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString ) > static u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33}; // For > 11n EWC definition, 2007.07.17, by Emily > PHT_CAPABILITY_ELE pCapELE; > > - if(!memcmp(CapIE, EWC11NHTCap, sizeof(EWC11NHTCap))) > - { > + if (!memcmp(CapIE, EWC11NHTCap, sizeof(EWC11NHTCap))) { ^^^ this becomes a different kind of change than what is mentioned in your commit message. You are also adding space after ',' later in your patch. please do only one kind of change in one patch. regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging : Comedi : comedi_fops : Fixed the return error code
On Mon, Jun 22, 2015 at 10:37:43AM +0100, Ian Abbott wrote: > On 21/06/15 11:01, Santosh wrote: > >This patch fixes the checkpatch.pl warning: > > > >WARNING: ENOSYS means 'invalid syscall nr' and nothing else > > > >Regards, > > > >Santosh Pai > > > > > >0001-staging-Comedi-comedi_fops-Fixed-the-return-error-co.patch > > Greg doesn't usually take patches in attachments. > > > From 502464417255edb52a1db71146e2f33e67df87ce Mon Sep 17 00:00:00 2001 > >From: sanpai > >Date: Sun, 21 Jun 2015 15:05:00 +0530 > >Subject: [PATCH] staging : Comedi : comedi_fops : Fixed the return error code > > > > try_module_get fails when the reference count of the module is not > > allowed to be incremented ,and hence -EPERM is returned. > > > >Signed-off-by: sanpai And your Signed-off-by name is not matching with your email From: header name. Please use your real name in both places. I don't think "sanpai" is your real name. regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] drivers: staging: rtl8192u: Fix "space required before the open parenthesis '('" errors
Umm.. you have to fix more than one error if there's more than one error on or very near the same line you are already fixing, else checkpatch.pl complains that your patch has errors. Not to mention Greg KH has never complained: http://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/log/?qt=grep&q=gdonald On Mon, Jun 22, 2015 at 6:10 AM, Sudip Mukherjee wrote: > On Sat, Jun 20, 2015 at 03:56:08PM -0500, Greg Donald wrote: >> Fix checkpatch.pl "space required before the open parenthesis '('" errors >> >> Signed-off-by: Greg Donald >> --- >> .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c| 97 >> ++ >> 1 file changed, 44 insertions(+), 53 deletions(-) >> >> diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c >> b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c >> index c2588f8..df20979 100644 >> --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c >> +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c > >> @@ -127,8 +127,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString ) >> static u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33}; // For >> 11n EWC definition, 2007.07.17, by Emily >> PHT_CAPABILITY_ELE pCapELE; >> >> - if(!memcmp(CapIE, EWC11NHTCap, sizeof(EWC11NHTCap))) >> - { >> + if (!memcmp(CapIE, EWC11NHTCap, sizeof(EWC11NHTCap))) { > ^^^ > this becomes a different kind of change than what is mentioned in your > commit message. > You are also adding space after ',' later in your patch. > please do only one kind of change in one patch. > > regards > sudip -- Greg Donald ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] drivers: staging: rtl8712: remove unnecessary else statement
"else" statement after "if" is unnecessary, hence removed. Signed-off-by: Sunil Shahu --- drivers/staging/rtl8712/rtl871x_security.c | 35 ++ 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_security.c b/drivers/staging/rtl8712/rtl871x_security.c index bcd1a51..21465c9 100644 --- a/drivers/staging/rtl8712/rtl871x_security.c +++ b/drivers/staging/rtl8712/rtl871x_security.c @@ -124,28 +124,25 @@ static u8 crc32_reverseBit(u8 data) static void crc32_init(void) { + sint i, j; + u32 c = 0x1234; + u8 *p = (u8 *)&c, *p1; + u8 k; + if (bcrc32initialized == 1) return; - else { - sint i, j; - u32 c; - u8 *p = (u8 *)&c, *p1; - u8 k; - - c = 0x1234; - for (i = 0; i < 256; ++i) { - k = crc32_reverseBit((u8)i); - for (c = ((u32)k) << 24, j = 8; j > 0; --j) - c = c & 0x8000 ? (c << 1) ^ CRC32_POLY : - (c << 1); - p1 = (u8 *)&crc32_table[i]; - p1[0] = crc32_reverseBit(p[3]); - p1[1] = crc32_reverseBit(p[2]); - p1[2] = crc32_reverseBit(p[1]); - p1[3] = crc32_reverseBit(p[0]); - } - bcrc32initialized = 1; + + for (i = 0; i < 256; ++i) { + k = crc32_reverseBit((u8)i); + for (c = ((u32)k) << 24, j = 8; j > 0; --j) + c = c & 0x8000 ? (c << 1) ^ CRC32_POLY : (c << 1); + p1 = (u8 *)&crc32_table[i]; + p1[0] = crc32_reverseBit(p[3]); + p1[1] = crc32_reverseBit(p[2]); + p1[2] = crc32_reverseBit(p[1]); + p1[3] = crc32_reverseBit(p[0]); } + bcrc32initialized = 1; } static u32 getcrc32(u8 *buf, u32 len) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: ft1000-usb: fixed table alignment
On Sun, Jun 21, 2015 at 01:29:50PM +0200, Peter Karlsson wrote: > Fixed alignment to 8 bytes per line. > > Signed-off-by: Peter Karlsson > --- > drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 19 +-- > 1 file changed, 13 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c > b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c > index faac4e5..b917953 100644 > --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c > +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c > @@ -414,12 +414,19 @@ static long ft1000_ioctl(struct file *file, unsigned > int command, > unsigned long flags; I am little bit confused with this patch. It is not applying. On verification I am seeing struct timeval tv; is supposed to here. have you verified that the patch is applying? regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: comedi: don't split Author string
On 20/06/15 21:14, Luis de Bethencourt wrote: fixes checkpatch.pl WARNING: quoted string split across lines +MODULE_AUTHOR("David A. Schleef , " + "Frank Mori Hess "); total: 0 errors, 1 warnings, 114 lines checked Modules with multiple authors have a MODULE_AUTHOR line for each one. Signed-off-by: Luis de Bethencourt --- drivers/staging/comedi/drivers/das08_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index 93fab68..9c02b17 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c @@ -108,7 +108,7 @@ static struct pcmcia_driver das08_cs_driver = { }; module_comedi_pcmcia_driver(driver_das08_cs, das08_cs_driver); -MODULE_AUTHOR("David A. Schleef , " - "Frank Mori Hess "); +MODULE_AUTHOR("David A. Schleef "); +MODULE_AUTHOR("Frank Mori Hess "); MODULE_DESCRIPTION("Comedi driver for ComputerBoards DAS-08 PCMCIA boards"); MODULE_LICENSE("GPL"); Okay, it would be nice if the patch subject line mentioned the name of the module, but this is the only one in COMEDI with a split author line. Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: comedi: das08_cs: don't split Author string
fixes checkpatch.pl WARNING: quoted string split across lines +MODULE_AUTHOR("David A. Schleef , " + "Frank Mori Hess "); Modules with multiple authors have a MODULE_AUTHOR line for each one. Signed-off-by: Luis de Bethencourt Reviewed-by: Ian Abbott --- drivers/staging/comedi/drivers/das08_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index 93fab68..9c02b17 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c @@ -108,7 +108,7 @@ static struct pcmcia_driver das08_cs_driver = { }; module_comedi_pcmcia_driver(driver_das08_cs, das08_cs_driver); -MODULE_AUTHOR("David A. Schleef , " - "Frank Mori Hess "); +MODULE_AUTHOR("David A. Schleef "); +MODULE_AUTHOR("Frank Mori Hess "); MODULE_DESCRIPTION("Comedi driver for ComputerBoards DAS-08 PCMCIA boards"); MODULE_LICENSE("GPL"); -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 07/10] staging: wilc1000: remove ununsed variable
On Mon, Jun 22, 2015 at 07:05:04AM +, Gujulan Elango, Hari Prasath (H.) wrote: > From: Hari Prasath Gujulan Elango > > This patch removes ununsed variable 'ret'. ret or len? :) regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 07/10] staging: wilc1000: remove ununsed variable
On Mon, Jun 22, 2015 at 06:12:11PM +0530, Sudip Mukherjee wrote: > On Mon, Jun 22, 2015 at 07:05:04AM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > From: Hari Prasath Gujulan Elango > > > > This patch removes ununsed variable 'ret'. > ret or len? :) > > regards > sudip yes,it's len and not 'ret'. Thanks for the check.I will send a v2.Should I send v2 only for this patch ? I will better wait for review comments for my other patches and then send this one. Regards Hari Prasath ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 07/10] staging: wilc1000: remove ununsed variable
On Mon, Jun 22, 2015 at 12:46:26PM +, Gujulan Elango, Hari Prasath (H.) wrote: > On Mon, Jun 22, 2015 at 06:12:11PM +0530, Sudip Mukherjee wrote: > > On Mon, Jun 22, 2015 at 07:05:04AM +, Gujulan Elango, Hari Prasath (H.) > > wrote: > > > From: Hari Prasath Gujulan Elango > > > > > > This patch removes ununsed variable 'ret'. > > ret or len? :) > > > > regards > > sudip > > yes,it's len and not 'ret'. Thanks for the check.I will send a v2.Should > I send v2 only for this patch ? I will better wait for review comments > for my other patches and then send this one. if it is only this patch then better send v2 as a reply to your original patch. regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 07/10] staging: wilc1000: remove ununsed variable
From: Hari Prasath Gujulan Elango This patch removes ununsed variable 'len' Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/wilc1000/wilc_wlan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index d28c410..def72fd 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -118,11 +118,10 @@ static void wilc_debug(uint32_t flag, char *fmt, ...) { char buf[256]; va_list args; - int len; if (flag & dbgflag) { va_start(args, fmt); - len = vsprintf(buf, fmt, args); + vsprintf(buf, fmt, args); va_end(args); if (g_wlan.os_func.os_debug) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: ft1000-usb: fixed table alignment
On Mon, Jun 22, 2015 at 03:02:37PM +0200, Peter Karlsson wrote: > On 2015-06-22 06:29, Sudip Mukherjee wrote: > > which tree have you been using? > > Greg will have three staging tree, use staging-testing > > I have used linux-next tree :/ well, I am now confused why linux-next is not having this struct. at line 415 of drivers/staging/ft1000/ft1000-usb/ft1000_debug.c struct timeval tv; is there in staging-next. And today's linux-next has merged staging-next. Then how that struct timeval is not there in linux-next ? regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wilc1000: host_interface: add spaces around '='
Fix coding style error by placing spaces around '=' as suggested by checkpatch.pl script. Signed-off-by: Sunil Shahu --- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 6b10bbb..d1fe73d 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -7945,8 +7945,8 @@ s32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, u8 *u16ipadd, u8 idx) strHostIFmsg.u16MsgId = HOST_IF_MSG_GET_IPADDRESS; strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.au8IPAddr = u16ipadd; - strHostIFmsg.drvHandler=hWFIDrv; - strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.idx= idx; + strHostIFmsg.drvHandler = hWFIDrv; + strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.idx = idx; s32Error = WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL); if (s32Error) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3 6/6] drivers:pci:hv: New paravirtual PCI front-end for Hyper-V VMs
Small bug fixes and cleanups. Please re-indent pci_devices_present_work() especially. On Wed, Jun 17, 2015 at 05:14:58PM +, ja...@microsoft.com wrote: > From: Jake Oshins > > This patch supplies a new driver, hv_pcifront, which exposes new root PCI > buses. When a Hyper-V VM running Linux is offered a paravirtual PCI bus > in order to expose a device passed through on that bus, this drver > registers a new bus with the PCI driver. This new bus is bus "zero" > within a new PCI domain. This is done so that there's no overlap between > the emulated, or fully virtualized, PCI that may be in the VM and a real > PCIe device that will be exposed. > > This PCI front-end only supports PCIe devices which do not use I/O BARs and > which do not need a legacy INTx# interrupt (relying on MSI or MSI-X). > Multifunction devices are supported, but devices with Type 1 or Type 2 > config headers are not supported. (These are bridges to other PCI buses.) > > The content of this patch differs from the one sent previously in that it > incorporates feedback related to unused code (which has been removed) and > GPL license (which has been updated.) It also removes Kconfig lines that > had been copied from the Xen PCI front-end entry, but which shouldn't be > used here. > > Signed-off-by: Jake Oshins > --- > MAINTAINERS|1 + > drivers/pci/Kconfig|7 + > drivers/pci/host/Makefile |1 + > drivers/pci/host/hv_pcifront.c | 2101 > > 4 files changed, 2110 insertions(+) > create mode 100644 drivers/pci/host/hv_pcifront.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index d8afd29..ed8d991 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -4759,6 +4759,7 @@ F: arch/x86/kernel/cpu/mshyperv.c > F: drivers/hid/hid-hyperv.c > F: drivers/hv/ > F: drivers/input/serio/hyperv-keyboard.c > +F: drivers/pci/host/hv_pcifront.c > F: drivers/net/hyperv/ > F: drivers/scsi/storvsc_drv.c > F: drivers/video/fbdev/hyperv_fb.c > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig > index 7a8f1c5..3ee97a9 100644 > --- a/drivers/pci/Kconfig > +++ b/drivers/pci/Kconfig > @@ -114,4 +114,11 @@ config PCI_LABEL > def_bool y if (DMI || ACPI) > select NLS > > +config HYPERV_VPCI > +tristate "Hyper-V PCI Frontend" > +depends on PCI && X86 && HYPERV > +help > + The PCI device frontend driver allows the kernel to import > arbitrary > + PCI devices from a PCI backend to support PCI driver domains. > + > source "drivers/pci/host/Kconfig" > diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile > index f733b4e..7bf8442 100644 > --- a/drivers/pci/host/Makefile > +++ b/drivers/pci/host/Makefile > @@ -2,6 +2,7 @@ obj-$(CONFIG_PCIE_DW) += pcie-designware.o > obj-$(CONFIG_PCI_DRA7XX) += pci-dra7xx.o > obj-$(CONFIG_PCI_EXYNOS) += pci-exynos.o > obj-$(CONFIG_PCI_IMX6) += pci-imx6.o > +obj-$(CONFIG_HYPERV_VPCI) += hv_pcifront.o > obj-$(CONFIG_PCI_MVEBU) += pci-mvebu.o > obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o > obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o > diff --git a/drivers/pci/host/hv_pcifront.c b/drivers/pci/host/hv_pcifront.c > new file mode 100644 > index 000..14c37c2 > --- /dev/null > +++ b/drivers/pci/host/hv_pcifront.c > @@ -0,0 +1,2101 @@ > +/* > + * Copyright (c) Microsoft Corporation. > + * > + * Author: > + * Jake Oshins > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms of the GNU General Public License version 2 as published > + * by the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, but > + * WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or > + * NON INFRINGEMENT. See the GNU General Public License for more > + * details. > + * > + */ > + > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +/* > + * We begin with definitions supporting the Virtual PCI Express protocol > + * with the host. > + */ > + > + > +/* > + * Protocol versions. The low word is the minor version, the high word the > major > + * version. > + */ > + > +#define PCI_MAKE_VERSION(Major, Minor) ((__u32)(((Major) << 16) | (Minor))) > +#define PCI_MAJOR_VERSION(Version) ((__u32)(Version) >> 16) > +#define PCI_MINOR_VERSION(Version) ((__u32)(Version) & 0xff) > + > +enum { > + PCI_PROTOCOL_VERSION_1_1 = PCI_MAKE_VERSION(1, 1), > + PCI_PROTOCOL_VERSION_CURRENT = PCI_PROTOCOL_VERSION_1_1 > +}; > + > +#define PCI_CONFIG_MMIO_LENGTH 0x2000 > + > +/* > + * Message Types > + */ > + > +enum pci_message_type { > + /* > + * Version 1.1 > + */ > + PCI_ME
Re: [PATCH] staging: rtl8188eu: kill unused hal_data_8188e::fw_ractrl flag
On Thu, Jun 18, 2015 at 02:00:18PM +0530, Sudip Mukherjee wrote: > On Thu, Jun 18, 2015 at 08:31:59AM +0200, Jakub Sitnicki wrote: > > --- a/drivers/staging/rtl8188eu/hal/odm.c > > +++ b/drivers/staging/rtl8188eu/hal/odm.c > > @@ -1170,13 +1170,10 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct > > *pDM_Odm) > > } > > > > for (i = 0; i < sta_cnt; i++) { > > - if (PWDB_rssi[i] != (0)) { > > - if (pHalData->fw_ractrl) { > > - /* Report every sta's RSSI to FW */ > > - } else { > > - ODM_RA_SetRSSI_8188E( > > - &(pHalData->odmpriv), (PWDB_rssi[i]&0xFF), > > (u8)((PWDB_rssi[i]>>16) & 0xFF)); > > - } > > + if (PWDB_rssi[i] != 0) { > > + ODM_RA_SetRSSI_8188E(&pHalData->odmpriv, > > +PWDB_rssi[i] & 0xFF, > > +(PWDB_rssi[i] >> 16) & 0xFF); > and you are also removing an extra unneeded () and a typecast. These are minor related changes (on the same line). It could have been mentioned in the changelog but if not then it's not really worth worrying about because it's so small. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: sm750fb: convert pr_err to pr_info
On Thu, Jun 18, 2015 at 12:56:54PM +, Gujulan Elango, Hari Prasath (H.) wrote: > From: Hari Prasath Gujulan Elango > > This patch modifies few debug prints from pr_err() to pr_info() as they > fall under that category. > They should be dbg or removed. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] staging: comedi: fix cast warning in comedi_compat32.c
This patch fixes the following sparse warning: drivers/staging/comedi/comedi_compat32.c:205:16: warning: cast removes address space of expression Signed-off-by: Geliang Tang --- Changes in v3: - fix the 80 character line limit. Changes in v2: - compat_ptr() is substituted by 'unsigned long'. --- drivers/staging/comedi/comedi_compat32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c index 2584824..f356386 100644 --- a/drivers/staging/comedi/comedi_compat32.c +++ b/drivers/staging/comedi/comedi_compat32.c @@ -202,7 +202,8 @@ static int get_compat_cmd(struct comedi_cmd __user *cmd, err |= __get_user(temp.uint, &cmd32->stop_arg); err |= __put_user(temp.uint, &cmd->stop_arg); err |= __get_user(temp.uptr, &cmd32->chanlist); - err |= __put_user(compat_ptr(temp.uptr), &cmd->chanlist); + err |= __put_user((unsigned int __force *)compat_ptr(temp.uptr), + &cmd->chanlist); err |= __get_user(temp.uint, &cmd32->chanlist_len); err |= __put_user(temp.uint, &cmd->chanlist_len); err |= __get_user(temp.uptr, &cmd32->data); -- 2.3.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: comedi: fix cast warning in comedi_compat32.c
On Mon, Jun 22, 2015 at 10:43:38AM +0100, Ian Abbott wrote: > Now it removes the call to compat_ptr(), so it won't work. Your first patch > was better, apart from exceeding the 80 character line limit. Thank you. I revised the patch again. Geliang Tang (1): staging: comedi: fix cast warning in comedi_compat32.c drivers/staging/comedi/comedi_compat32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.3.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: comedi: fix cast warning in comedi_compat32.c
On 22/06/15 16:33, Geliang Tang wrote: This patch fixes the following sparse warning: drivers/staging/comedi/comedi_compat32.c:205:16: warning: cast removes address space of expression Signed-off-by: Geliang Tang --- Changes in v3: - fix the 80 character line limit. Changes in v2: - compat_ptr() is substituted by 'unsigned long'. --- drivers/staging/comedi/comedi_compat32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c index 2584824..f356386 100644 --- a/drivers/staging/comedi/comedi_compat32.c +++ b/drivers/staging/comedi/comedi_compat32.c @@ -202,7 +202,8 @@ static int get_compat_cmd(struct comedi_cmd __user *cmd, err |= __get_user(temp.uint, &cmd32->stop_arg); err |= __put_user(temp.uint, &cmd->stop_arg); err |= __get_user(temp.uptr, &cmd32->chanlist); - err |= __put_user(compat_ptr(temp.uptr), &cmd->chanlist); + err |= __put_user((unsigned int __force *)compat_ptr(temp.uptr), + &cmd->chanlist); err |= __get_user(temp.uint, &cmd32->chanlist_len); err |= __put_user(temp.uint, &cmd->chanlist_len); err |= __get_user(temp.uptr, &cmd32->data); Looks okay now apart from it being ugly, but that can't be helped since comedi uses that chanlist member for both user and kernel addresses! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: free memory allocated
You should have CC'd Mark on these. Use ./scripts/get_maintainer.pl regards, dan carpenter On Thu, Jun 18, 2015 at 01:27:28PM +, Gujulan Elango, Hari Prasath (H.) wrote: > From: Hari Prasath Gujulan Elango > > The memory allocated in dgnc_tty_register() for two objects is not freed > anywhere.This patch addresses this by freeing the memory in > dgnc_tty_uninit. > > Signed-off-by: Hari Prasath Gujulan Elango > --- > drivers/staging/dgnc/dgnc_tty.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c > index 5c5c4b7..fbfe79a 100644 > --- a/drivers/staging/dgnc/dgnc_tty.c > +++ b/drivers/staging/dgnc/dgnc_tty.c > @@ -422,8 +422,12 @@ void dgnc_tty_uninit(struct dgnc_board *brd) > > kfree(brd->SerialDriver.ttys); > brd->SerialDriver.ttys = NULL; > + kfree(brd->SerialDriver.termios); > + brd->SerialDriver.termios = NULL; > kfree(brd->PrintDriver.ttys); > brd->PrintDriver.ttys = NULL; > + kfree(brd->PrintDriver.termios); > + brd->PrintDriver.termios = NULL; > } > > /*=== > -- > 1.9.1 > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/5] staging: ft1000-usb: Fixed some issues with lines over 80 characters
On Thu, Jun 18, 2015 at 03:50:58PM +0200, Peter Karlsson wrote: > @@ -180,7 +180,8 @@ static u16 get_handshake(struct ft1000_usb *ft1000dev, > u16 expected_value) > } > > status = ft1000_read_dpram16(ft1000dev, > - DWNLD_MAG1_HANDSHAKE_LOC, (u8 > *)&handshake, 1); > + DWNLD_MAG1_HANDSHAKE_LOC, > + (u8 *)&handshake, 1); Do it like this: status = ft1000_read_dpram16(ft1000dev, DWNLD_MAG1_HANDSHAKE_LOC, (u8 *)&handshake, 1); regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/5] staging: ft1000-usb: Fixed some issues with lines over 80 characters
On Thu, Jun 18, 2015 at 03:50:59PM +0200, Peter Karlsson wrote: > Fix checkpatch warnings about lines over 80 characters. > > Signed-off-by: Peter Karlsson > --- > drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 15 --- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c > b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c > index 6108f1e..7a9c007 100644 > --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c > +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c > @@ -400,7 +400,8 @@ int dsp_reload(struct ft1000_usb *ft1000dev) > msleep(1000); > > status = > - ft1000_write_register(ft1000dev, HOST_INTF_BE, > FT1000_REG_SUP_CTRL); > + ft1000_write_register(ft1000dev, HOST_INTF_BE, > + FT1000_REG_SUP_CTRL); Make all these line up as well (like in other reply). status = ft1000_write_register(ft1000dev, HOST_INTF_BE, FT1000_REG_SUP_CTRL); [tab][tab][tab][tab][space][space][space][space][space][space][space]FT1000_REG_SUP_CTRL); regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] drivers: staging: rtl8712: remove unnecessary else statement
On Mon, Jun 22, 2015 at 04:58:41PM +0530, Sunil Shahu wrote: > "else" statement after "if" is unnecessary, hence removed. > > Signed-off-by: Sunil Shahu > --- > drivers/staging/rtl8712/rtl871x_security.c | 35 > ++ > 1 file changed, 16 insertions(+), 19 deletions(-) > > diff --git a/drivers/staging/rtl8712/rtl871x_security.c > b/drivers/staging/rtl8712/rtl871x_security.c > index bcd1a51..21465c9 100644 > --- a/drivers/staging/rtl8712/rtl871x_security.c > +++ b/drivers/staging/rtl8712/rtl871x_security.c > @@ -124,28 +124,25 @@ static u8 crc32_reverseBit(u8 data) > > static void crc32_init(void) > { > + sint i, j; > + u32 c = 0x1234; ^^ In another follow on patch you can get rid of this. It is nonsense and it isn't used. > + u8 *p = (u8 *)&c, *p1; > + u8 k; > + > if (bcrc32initialized == 1) > return; > - else { > - sint i, j; > - u32 c; > - u8 *p = (u8 *)&c, *p1; > - u8 k; > - > - c = 0x1234; > - for (i = 0; i < 256; ++i) { > - k = crc32_reverseBit((u8)i); > - for (c = ((u32)k) << 24, j = 8; j > 0; --j) > - c = c & 0x8000 ? (c << 1) ^ CRC32_POLY : > - (c << 1); > - p1 = (u8 *)&crc32_table[i]; > - p1[0] = crc32_reverseBit(p[3]); > - p1[1] = crc32_reverseBit(p[2]); > - p1[2] = crc32_reverseBit(p[1]); > - p1[3] = crc32_reverseBit(p[0]); > - } > - bcrc32initialized = 1; > + > + for (i = 0; i < 256; ++i) { > + k = crc32_reverseBit((u8)i); > + for (c = ((u32)k) << 24, j = 8; j > 0; --j) ^^ We always re-initialize c here. > + c = c & 0x8000 ? (c << 1) ^ CRC32_POLY : (c << 1); > + p1 = (u8 *)&crc32_table[i]; > + p1[0] = crc32_reverseBit(p[3]); > + p1[1] = crc32_reverseBit(p[2]); > + p1[2] = crc32_reverseBit(p[1]); > + p1[3] = crc32_reverseBit(p[0]); > } > + bcrc32initialized = 1; > } regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: sm750fb: use tabs for indentation
On Fri, Jun 19, 2015 at 05:50:50PM -0700, Juston Li wrote: > void sii164ClearInterrupt(void) > { > -unsigned char detectReg; > + unsigned char detectReg; > > -/* Clear the MDI interrupt */ > -detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); > -i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, detectReg | > SII164_DETECT_MONITOR_STATE_CLEAR); The patch accidentally deletes this write. > + /* Clear the MDI interrupt */ > + detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); > } regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [HPDD-discuss] [PATCH 01/12] staging: lustre: fid: Use !x to check for kzalloc failure
On Mon, Jun 22, 2015 at 05:27:03PM +, Simmons, James A. wrote: > > Is this change a hard requirement? Currently the lustre code standard in our > development tree is the opposite policy. Please follow the kernel coding style rules. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:rtl8723au:odm.c:Removing trailing whitespaces
"Joglekar, Tejas (T.)" writes: > From: Joglekar Tejas > > This patch removes the trailing whitespace error given > by checkpatch.pl > > Signed-off-by: Joglekar Tejas > --- > drivers/staging/rtl8723au/hal/odm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Looks straight forward. Acked-by: Jes Sorensen Jes > diff --git a/drivers/staging/rtl8723au/hal/odm.c > b/drivers/staging/rtl8723au/hal/odm.c > index f354f5e..6b9dbef 100644 > --- a/drivers/staging/rtl8723au/hal/odm.c > +++ b/drivers/staging/rtl8723au/hal/odm.c > @@ -985,7 +985,7 @@ void ODM_RF_Saving23a(struct dm_odm_t *pDM_Odm, u8 > bForceInNormal) > val32 = rtl8723au_read32(adapter, 0x874); > val32 |= pDM_PSTable->Reg874; > rtl8723au_write32(adapter, 0x874, val32); > - > + > val32 = rtl8723au_read32(adapter, 0xc70); > val32 |= pDM_PSTable->RegC70; > rtl8723au_write32(adapter, 0xc70, val32); ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: sm750fb: use tabs for indentation
On Mon, Jun 22, 2015 at 10:46 AM, Dan Carpenter wrote: > On Fri, Jun 19, 2015 at 05:50:50PM -0700, Juston Li wrote: >> void sii164ClearInterrupt(void) >> { >> -unsigned char detectReg; >> + unsigned char detectReg; >> >> -/* Clear the MDI interrupt */ >> -detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); >> -i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, detectReg | >> SII164_DETECT_MONITOR_STATE_CLEAR); > > The patch accidentally deletes this write. > >> + /* Clear the MDI interrupt */ >> + detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); >> } > > regards, > dan carpenter This was fixed and patch is now included in the patchset: [PATCH v2 00/19] staging: sm750fb: checkpatch.pl fixes Regards Juston ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ft1000: convert pack pragma to __packed__ attribute
Convert a Microsoft compiler specific directive "#pragma pack(1)" to a GCC equivalent __attribute__ ((__packed__)). Also, by doing this we save ourselves from trouble if any other struct definitions are added after the #pragma because it will be applied to all of the definitions following it. Signed-off-by: Giedrius Statkevičius --- drivers/staging/ft1000/ft1000-usb/ft1000_download.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c index 5def347..345c256 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c @@ -95,7 +95,6 @@ struct dsp_file_hdr { long nDspImages; /* Number of DSP images in file. */ }; -#pragma pack(1) struct dsp_image_info { long coff_date; /* Date/time when DSP Coff image was built. */ long begin_offset;/* Offset in file where image begins. */ @@ -105,7 +104,7 @@ struct dsp_image_info { long version; /* Embedded version # of DSP code. */ unsigned shortchecksum;/* DSP File checksum */ unsigned shortpad1; -}; +} __attribute__ ((__packed__)); /* checks if the doorbell register is cleared */ -- 2.4.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH v3 6/6] drivers:pci:hv: New paravirtual PCI front-end for Hyper-V VMs
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Monday, June 22, 2015 7:14 AM > To: Jake Oshins > Cc: gre...@linuxfoundation.org; KY Srinivasan; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; vkuzn...@redhat.com; Haiyang Zhang; Mike Ebersol > Subject: Re: [PATCH v3 6/6] drivers:pci:hv: New paravirtual PCI front-end for > Hyper-V VMs > > Small bug fixes and cleanups. Please re-indent > pci_devices_present_work() especially. > > > > regards, > dan carpenter Thanks for your review. I'll respond to all of it and resend. -- Jake Oshins ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 3/6] Staging: combine: daqboard2000: Simplify a trivial if-return sequence
--- a/drivers/staging/comedi/drivers/daqboard2000.c +++ b/drivers/staging/comedi/drivers/daqboard2000.c @@ -713,12 +713,8 @@ static int daqboard2000_auto_attach(struct comedi_device *dev, return result; s = &dev->subdevices[2]; - result = subdev_8255_init(dev, s, daqboard2000_8255_cb, - dioP2ExpansionIO8Bit); - if (result) - return result; - - return 0; + return subdev_8255_init(dev, s, daqboard2000_8255_cb, + dioP2ExpansionIO8Bit); } What do you think about horizontally aligning the parameters in the second line? They were previously. Regards, Markus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: ft1000: convert pack pragma to __packed__ attribute
On Mon, 2015-06-22 at 22:12 +0300, Giedrius Statkevičius wrote: > Convert a Microsoft compiler specific directive "#pragma pack(1)" to a > GCC equivalent __attribute__ ((__packed__)). Also, by doing this we save > ourselves from trouble if any other struct definitions are added after > the #pragma because it will be applied to all of the definitions > following it. [] > diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c > b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c [] > @@ -95,7 +95,6 @@ struct dsp_file_hdr { > long nDspImages; /* Number of DSP images in file. > */ > }; > > -#pragma pack(1) > struct dsp_image_info { > long coff_date; /* Date/time when DSP Coff image > was built. */ > long begin_offset;/* Offset in file where image > begins. */ > @@ -105,7 +104,7 @@ struct dsp_image_info { > long version; /* Embedded version # of DSP > code. */ > unsigned shortchecksum;/* DSP File checksum */ > unsigned shortpad1; > -}; > +} __attribute__ ((__packed__)); __packed ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging: wilc1000: wilc_wfi_netdevice.c: remove blank lines
Remove multiple blank lines. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/wilc_wfi_netdevice.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.c b/drivers/staging/wilc1000/wilc_wfi_netdevice.c index c2e92c0..af9b858 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.c +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.c @@ -12,11 +12,9 @@ #include "wilc_wfi_cfgoperations.h" #include "host_interface.h" - MODULE_AUTHOR("Mai Daftedar"); MODULE_LICENSE("Dual BSD/GPL"); - struct net_device *WILC_WFI_devs[2]; /* @@ -34,7 +32,6 @@ module_param(timeout, int, 0); static int use_napi; module_param(use_napi, int, 0); - /* * A structure representing an in-flight packet. */ @@ -45,12 +42,9 @@ struct WILC_WFI_packet { u8 data[ETH_DATA_LEN]; }; - - int pool_size = 8; module_param(pool_size, int, 0); - static void WILC_WFI_TxTimeout(struct net_device *dev); static void (*WILC_WFI_Interrupt)(int, void *, struct pt_regs *); @@ -252,7 +246,6 @@ int WILC_WFI_Open(struct net_device *dev) int WILC_WFI_Release(struct net_device *dev) { /* release ports, irq and such -- like fops->close */ - netif_stop_queue(dev); /* can't transmit any more */ return 0; @@ -512,7 +505,6 @@ void WILC_WFI_HwTx(char *buf, int len, struct net_device *dev) u32 *saddr, *daddr; struct WILC_WFI_packet *tx_buffer; - /* I am paranoid. Ain't I? */ if (len < sizeof(struct ethhdr) + sizeof(struct iphdr)) { PRINT_D(RX_DBG, "WILC_WFI: Hmm... packet too short (%i octets)\n", @@ -580,7 +572,6 @@ void WILC_WFI_HwTx(char *buf, int len, struct net_device *dev) (unsigned long) priv->stats.tx_packets); } else WILC_WFI_Interrupt(0, dev, NULL); - } /** @@ -785,7 +776,6 @@ void WILC_WFI_Init(struct net_device *dev) { struct WILC_WFI_priv *priv; - /* * Then, assign other fields in dev, using ether_setup() and some * hand assignments @@ -851,12 +841,6 @@ void WILC_WFI_Cleanup(void) void StartConfigSim(void); - - - - - - /** * @brief WILC_WFI_Stat * @detailsReturn statistics to the caller @@ -877,7 +861,6 @@ int WILC_WFI_InitModule(void) WILC_WFI_Interrupt = use_napi ? WILC_WFI_NapiInterrupt : WILC_WFI_RegularInterrupt; for (i = 0; i < 2; i++) { - /* Allocate the net devices */ WILC_WFI_devs[i] = alloc_netdev(sizeof(struct WILC_WFI_priv), "wlan%d", WILC_WFI_Init); @@ -900,7 +883,6 @@ int WILC_WFI_InitModule(void) ret = 0; } - /*init atmel driver */ priv[0] = netdev_priv(WILC_WFI_devs[0]); priv[1] = netdev_priv(WILC_WFI_devs[1]); @@ -921,7 +903,6 @@ out: } - module_init(WILC_WFI_InitModule); module_exit(WILC_WFI_Cleanup); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/4] staging: wilc1000: wilc_wfi_netdevice.c: remove unused codes
Remove if statement that has no any codes. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/wilc_wfi_netdevice.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.c b/drivers/staging/wilc1000/wilc_wfi_netdevice.c index 478cd2b..d5facb4 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.c +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.c @@ -906,9 +906,6 @@ int WILC_WFI_InitModule(void) priv[0] = netdev_priv(WILC_WFI_devs[0]); priv[1] = netdev_priv(WILC_WFI_devs[1]); - if (priv[1]->dev->ieee80211_ptr->wiphy->interface_modes && BIT(NL80211_IFTYPE_MONITOR)) { - - } priv[0]->bCfgScanning = false; priv[0]->u32RcvdChCount = 0; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/4] staging: wilc1000: wilc_wfi_netdevice.c: remove unused variable
Remove variable that is defined but never used. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/wilc_wfi_netdevice.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.c b/drivers/staging/wilc1000/wilc_wfi_netdevice.c index d5facb4..c2e92c0 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.c +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.c @@ -873,7 +873,6 @@ int WILC_WFI_InitModule(void) int result, i, ret = -ENOMEM; struct WILC_WFI_priv *priv[2], *netpriv; struct wireless_dev *wdev; - char buf[IFNAMSIZ]; WILC_WFI_Interrupt = use_napi ? WILC_WFI_NapiInterrupt : WILC_WFI_RegularInterrupt; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging: wilc1000: wilc_wfi_netdevice.c: remove commented codes
Remove commented codes. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/wilc_wfi_netdevice.c | 21 - 1 file changed, 21 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.c b/drivers/staging/wilc1000/wilc_wfi_netdevice.c index 170ca65..478cd2b 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.c +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.c @@ -325,7 +325,6 @@ void WILC_WFI_Rx(struct net_device *dev, struct WILC_WFI_packet *pkt) PRINT_INFO(RX_DBG, "In monitor device name %s\n", dev->name); priv = wiphy_priv(priv->dev->ieee80211_ptr->wiphy); PRINT_D(RX_DBG, "VALUE PASSED IN OF HRWD %p\n", priv->hWILCWFIDrv); - /* host_int_get_rssi(priv->hWILCWFIDrv, &(rssi)); */ if (INFO) { for (i = 14; i < skb->len; i++) PRINT_INFO(RX_DBG, "RXdata[%d] %02x\n", i, skb->data[i]); @@ -600,12 +599,6 @@ int WILC_WFI_Tx(struct sk_buff *skb, struct net_device *dev) char *data, shortpkt[ETH_ZLEN]; struct WILC_WFI_priv *priv = netdev_priv(dev); - /* priv = wiphy_priv(priv->dev->ieee80211_ptr->wiphy); */ - - /* if(priv->monitor_flag) */ - /* mac80211_hwsim_monitor_rx(skb); */ - - data = skb->data; len = skb->len; @@ -836,12 +829,6 @@ void WILC_WFI_Cleanup(void) int i; struct WILC_WFI_priv *priv[2]; - /*if(hwsim_mon!=NULL) -* { -* PRINT_D(RX_DBG, "Freeing monitor interface\n"); -* unregister_netdev(hwsim_mon); -* free_netdev(hwsim_mon); -* }*/ for (i = 0; i < 2; i++) { priv[i] = netdev_priv(WILC_WFI_devs[i]); @@ -897,7 +884,6 @@ int WILC_WFI_InitModule(void) WILC_WFI_Init); if (WILC_WFI_devs[i] == NULL) goto out; - /* priv[i] = netdev_priv(WILC_WFI_devs[i]); */ wdev = WILC_WFI_WiphyRegister(WILC_WFI_devs[i]); WILC_WFI_devs[i]->ieee80211_ptr = wdev; @@ -921,9 +907,6 @@ int WILC_WFI_InitModule(void) priv[1] = netdev_priv(WILC_WFI_devs[1]); if (priv[1]->dev->ieee80211_ptr->wiphy->interface_modes && BIT(NL80211_IFTYPE_MONITOR)) { - /* snprintf(buf, IFNAMSIZ, "mon.%s", priv[1]->dev->name); */ - /* WILC_WFI_init_mon_interface(); */ - /* priv[1]->monitor_flag = 1; */ } priv[0]->bCfgScanning = false; @@ -931,10 +914,6 @@ int WILC_WFI_InitModule(void) WILC_memset(priv[0]->au8AssociatedBss, 0xFF, ETH_ALEN); - - /* ret = host_int_init(&priv[0]->hWILCWFIDrv); */ - /*copy handle to the other driver*/ - /* priv[1]->hWILCWFIDrv = priv[0]->hWILCWFIDrv; */ if (ret) PRINT_ER("Error Init Driver\n"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
staging patch not in staging tree (was: Re: [PATCH 1/2] staging: ft1000-usb: fixed table alignment)
On Mon, Jun 22, 2015 at 07:06:49PM +0530, Sudip Mukherjee wrote: > On Mon, Jun 22, 2015 at 03:02:37PM +0200, Peter Karlsson wrote: > > On 2015-06-22 06:29, Sudip Mukherjee wrote: > > > which tree have you been using? > > > Greg will have three staging tree, use staging-testing > > > > I have used linux-next tree :/ > well, I am now confused why linux-next is not having this struct. > at line 415 of drivers/staging/ft1000/ft1000-usb/ft1000_debug.c > struct timeval tv; is there in staging-next. And today's linux-next > has merged staging-next. Then how that struct timeval is not there in > linux-next ? I was doing a bisect to see why the files are differing in staging-next and linux-next. And it turns out to be: 8b37bf430656 ("staging: ft1000: Replace timeval and time_t with time64_t") which didn't go through the staging tree. regards sudip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
lustre: LIBCFS_ALLOC
It seems that libcfs_kvzalloc doesn't use any particular threshold or switchingbetween kzalloc and vmalloc, so can be replaced by ths function too? thanks, julia ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6656: Fixed two lines over 80 characters long
The presence of comments originally caused the two lines to be over 80 characters long. The issue is fixed by moving the comments into a separate line. Signed-off-by: Arjun Krishna Babu --- drivers/staging/vt6656/rxtx.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 8116791..da075f4 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -45,8 +45,11 @@ #include "usbpipe.h" static const u16 vnt_time_stampoff[2][MAX_RATE] = { - {384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23},/* Long Preamble */ - {384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23},/* Short Preamble */ + /* Long Preamble */ + {384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23}, + + /* Short Preamble */ + {384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23}, }; static const u16 vnt_fb_opt0[2][5] = { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel