[PATCH] staging: fbtft: fix sparse warning
fix the following sparse warning: drivers/staging/fbtft/fbtft-io.c:74:29: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-io.c:74:29:expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/staging/fbtft/fbtft-io.c:74:29:got restricted __be64 [usertype] Signed-off-by: Jandy Gou <gouqings...@goodix.com> --- drivers/staging/fbtft/fbtft-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-io.c b/drivers/staging/fbtft/fbtft-io.c index d868405..ffb9a3b 100644 --- a/drivers/staging/fbtft/fbtft-io.c +++ b/drivers/staging/fbtft/fbtft-io.c @@ -71,7 +71,7 @@ int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len) src++; } tmp |= ((*src & 0x0100) ? 1 : 0); - *(u64 *)dst = cpu_to_be64(tmp); + *(__be64 *)dst = cpu_to_be64(tmp); dst += 8; *dst++ = (u8)(*src++ & 0x00FF); added++; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: fbtft: fix sparse warning
fix the sparse warning: drivers/staging/fbtft/fbtft-io.c:74:29: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-io.c:74:29:expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/staging/fbtft/fbtft-io.c:74:29:got restricted __be64 [usertype] drivers/staging/fbtft/fbtft-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] fix the sparse warning: drivers/staging/fbtft/fbtft-io.c:74:29: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-io.c:74:29: expected unsigned long long
Signed-off-by: Jandy Gou <gouqings...@goodix.com> --- drivers/staging/fbtft/fbtft-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-io.c b/drivers/staging/fbtft/fbtft-io.c index d868405..ffb9a3b 100644 --- a/drivers/staging/fbtft/fbtft-io.c +++ b/drivers/staging/fbtft/fbtft-io.c @@ -71,7 +71,7 @@ int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len) src++; } tmp |= ((*src & 0x0100) ? 1 : 0); - *(u64 *)dst = cpu_to_be64(tmp); + *(__be64 *)dst = cpu_to_be64(tmp); dst += 8; *dst++ = (u8)(*src++ & 0x00FF); added++; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] fix the sparse warning: drivers/staging/fbtft/fbtft-io.c:74:29: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-io.c:74:29: expected unsigned long long
Signed-off-by: Jandy Gou <gouqings...@goodix.com> --- drivers/staging/fbtft/fbtft-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-io.c b/drivers/staging/fbtft/fbtft-io.c index d868405..ffb9a3b 100644 --- a/drivers/staging/fbtft/fbtft-io.c +++ b/drivers/staging/fbtft/fbtft-io.c @@ -71,7 +71,7 @@ int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len) src++; } tmp |= ((*src & 0x0100) ? 1 : 0); - *(u64 *)dst = cpu_to_be64(tmp); + *(__be64 *)dst = cpu_to_be64(tmp); dst += 8; *dst++ = (u8)(*src++ & 0x00FF); added++; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: r8723au: This patch tries to fix some byte order issues that is found by sparse check.
make C=1 M=drivers/staging/rtl8723au/ drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:96:38: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:100:27: warning: cast to restricted __le32 Signed-off-by: Jandy Gou <qingsong@ck-telecom.com> --- drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c index 1662c03c..fff652c 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c @@ -56,8 +56,8 @@ int FillH2CCmd(struct rtw_adapter *padapter, u8 ElementID, u32 CmdLen, u32 msgbox_addr; u32 msgbox_ex_addr; struct hal_data_8723a *pHalData; - u32 h2c_cmd = 0; - u16 h2c_cmd_ex = 0; + __le32 h2c_cmd = 0; + __le16 h2c_cmd_ex = 0; int ret = _FAIL; padapter = GET_PRIMARY_ADAPTER(padapter); @@ -91,14 +91,12 @@ int FillH2CCmd(struct rtw_adapter *padapter, u8 ElementID, u32 CmdLen, *(u8 *)(_cmd) |= ElementID; - if (h2c_cmd & BIT(7)) { + if (le32_to_cpu(h2c_cmd) & BIT(7)) { msgbox_ex_addr = REG_HMEBOX_EXT_0 + (h2c_box_num * EX_MESSAGE_BOX_SIZE); - h2c_cmd_ex = le16_to_cpu(h2c_cmd_ex); - rtl8723au_write16(padapter, msgbox_ex_addr, h2c_cmd_ex); + rtl8723au_write16(padapter, msgbox_ex_addr, le16_to_cpu(h2c_cmd_ex)); } msgbox_addr = REG_HMEBOX_0 + (h2c_box_num * MESSAGE_BOX_SIZE); - h2c_cmd = le32_to_cpu(h2c_cmd); - rtl8723au_write32(padapter, msgbox_addr, h2c_cmd); + rtl8723au_write32(padapter, msgbox_addr, le32_to_cpu(h2c_cmd)); bcmd_down = true; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: r8723au: This patch tries to fix some byte order issues that is found by sparse check.
make C=1 M=drivers/staging/rtl8723au/ drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:96:38: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:100:27: warning: cast to restricted __le32 Signed-off-by: Jandy Gou <qingsong@ck-telecom.com> --- drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c index 1662c03c..d82fd8a 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c @@ -93,11 +93,11 @@ int FillH2CCmd(struct rtw_adapter *padapter, u8 ElementID, u32 CmdLen, if (h2c_cmd & BIT(7)) { msgbox_ex_addr = REG_HMEBOX_EXT_0 + (h2c_box_num * EX_MESSAGE_BOX_SIZE); - h2c_cmd_ex = le16_to_cpu(h2c_cmd_ex); + le16_to_cpus(_cmd_ex); rtl8723au_write16(padapter, msgbox_ex_addr, h2c_cmd_ex); } msgbox_addr = REG_HMEBOX_0 + (h2c_box_num * MESSAGE_BOX_SIZE); - h2c_cmd = le32_to_cpu(h2c_cmd); + le32_to_cpus(_cmd); rtl8723au_write32(padapter, msgbox_addr, h2c_cmd); bcmd_down = true; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: This patch fixes the following sparse warning:
drivers/staging/lustre/lustre/osc/osc_cache.c:622:19: warning: symbol 'osc_extent_find' was not declared. Should it be static? drivers/staging/lustre/lustre/osc/osc_cache.c:1423:6: warning: symbol 'osc_unreserve_grant' was not declared. Should it be static? Signed-off-by: Jandy Gou <qingsong@ck-telecom.com> --- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index b1d1a87f..62cfca6 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -619,7 +619,7 @@ static inline int overlapped(struct osc_extent *ex1, struct osc_extent *ex2) * Find or create an extent which includes @index, core function to manage * extent tree. */ -struct osc_extent *osc_extent_find(const struct lu_env *env, +static struct osc_extent *osc_extent_find(const struct lu_env *env, struct osc_object *obj, pgoff_t index, int *grants) @@ -1420,7 +1420,7 @@ static void __osc_unreserve_grant(struct client_obd *cli, } } -void osc_unreserve_grant(struct client_obd *cli, +static void osc_unreserve_grant(struct client_obd *cli, unsigned int reserved, unsigned int unused) { client_obd_list_lock(>cl_loi_list_lock); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging:rtl8192u: fixes the following sparse warning:
drivers/staging/rtl8192u/r8192U_core.c:3212:6: warning: symbol 'rtl819x_watchdog_wqcallback' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3276:6: warning: symbol 'watch_dog_timer_callback' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3282:5: warning: symbol '_rtl8192_up' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c::5: warning: symbol 'rtl8192_close' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3406:6: warning: symbol 'rtl8192_restart' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4618:6: warning: symbol 'rtl8192_irq_rx_tasklet' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4736:6: warning: symbol 'rtl8192_cancel_deferred_work' was not declared. Should it be static? Signed-off-by: Jandy Gou <qingsong@ck-telecom.com> --- drivers/staging/rtl8192u/r8192U_core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index a4795af..1343322 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -3209,7 +3209,7 @@ static void rtl819x_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum, } -void rtl819x_watchdog_wqcallback(struct work_struct *work) +static void rtl819x_watchdog_wqcallback(struct work_struct *work) { struct delayed_work *dwork = container_of(work, struct delayed_work, work); struct r8192_priv *priv = container_of(dwork, struct r8192_priv, watch_dog_wq); @@ -3273,13 +3273,13 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work) } -void watch_dog_timer_callback(unsigned long data) +static void watch_dog_timer_callback(unsigned long data) { struct r8192_priv *priv = ieee80211_priv((struct net_device *) data); queue_delayed_work(priv->priv_wq, >watch_dog_wq, 0); mod_timer(>watch_dog_timer, jiffies + MSECS(IEEE80211_WATCH_DOG_TIME)); } -int _rtl8192_up(struct net_device *dev) +static int _rtl8192_up(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); int init_status = 0; @@ -3330,7 +3330,7 @@ int rtl8192_up(struct net_device *dev) } -int rtl8192_close(struct net_device *dev) +static int rtl8192_close(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); int ret; @@ -3403,7 +3403,7 @@ void rtl8192_commit(struct net_device *dev) } -void rtl8192_restart(struct work_struct *work) +static void rtl8192_restart(struct work_struct *work) { struct r8192_priv *priv = container_of(work, struct r8192_priv, reset_wq); struct net_device *dev = priv->ieee80211->dev; @@ -4615,7 +4615,7 @@ static void rtl8192_rx_cmd(struct sk_buff *skb) } } -void rtl8192_irq_rx_tasklet(struct r8192_priv *priv) +static void rtl8192_irq_rx_tasklet(struct r8192_priv *priv) { struct sk_buff *skb; struct rtl8192_rx_info *info; @@ -4733,7 +4733,7 @@ fail: } //detach all the work and timer structure declared or inititialize in r8192U_init function. -void rtl8192_cancel_deferred_work(struct r8192_priv *priv) +static void rtl8192_cancel_deferred_work(struct r8192_priv *priv) { cancel_work_sync(>reset_wq); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: Fix coding style errors
Signed-off-by: Jandy Gou qingsong@ck-telecom.com --- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h index 0d8fa3a..185da2c 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h @@ -721,7 +721,7 @@ kiblnd_nid2peerlist (lnet_nid_t nid) unsigned int hash = ((unsigned int)nid) % kiblnd_data.kib_peer_hash_size; - return (kiblnd_data.kib_peers [hash]); + return (kiblnd_data.kib_peers[hash]); } static inline int @@ -887,7 +887,7 @@ kiblnd_rd_consume_frag(kib_rdma_desc_t *rd, int index, __u32 nob) rd-rd_frags[index].rf_addr += nob; rd-rd_frags[index].rf_nob -= nob; } else { - index ++; + index++; } return index; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Fix coding style error
Fix the following two coding style errors: ERROR: space prohibited before that '++' (ctx:WxO) #890: FILE: drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:890: + index ++; ERROR: space prohibited before open square bracket '[' #724: FILE: drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:724: + return (kiblnd_data.kib_peers [hash]); Jandy Gou (1): staging: lustre: Fix coding style errors drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: android: timed_gpio.c: fix coding style errors
remove extra space and replace tab to space after a variable Signed-off-by: Jandy Gou qingsong@ck-telecom.com --- drivers/staging/android/timed_gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c index 938a35c..ce11726 100644 --- a/drivers/staging/android/timed_gpio.c +++ b/drivers/staging/android/timed_gpio.c @@ -61,9 +61,9 @@ static int gpio_get_time(struct timed_output_dev *dev) static void gpio_enable(struct timed_output_dev *dev, int value) { - struct timed_gpio_data *data = + struct timed_gpio_data *data = container_of(dev, struct timed_gpio_data, dev); - unsigned long flags; + unsigned long flags; spin_lock_irqsave(data-lock, flags); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: android: timed_gpio.c: fix coding style errors
remove extra space replace tab to space after a variable Jandy Gou (1): Staging: android: timed_gpio.c: fix coding style errors drivers/staging/android/timed_gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel