[PATCH] nfc: fdp: fix NULL pointer dereference
We are checking phy after dereferencing it. We can print the debug information after checking it. If phy is NULL then we will get a good stack trace to tell us that we are in this irq handler. Signed-off-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> --- drivers/nfc/fdp/i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/fdp/i2c.c b/drivers/nfc/fdp/i2c.c index 5e797d5..712936f 100644 --- a/drivers/nfc/fdp/i2c.c +++ b/drivers/nfc/fdp/i2c.c @@ -210,14 +210,14 @@ static irqreturn_t fdp_nci_i2c_irq_thread_fn(int irq, void *phy_id) struct sk_buff *skb; int r; - client = phy->i2c_dev; - dev_dbg(>dev, "%s\n", __func__); - if (!phy || irq != phy->i2c_dev->irq) { WARN_ON_ONCE(1); return IRQ_NONE; } + client = phy->i2c_dev; + dev_dbg(>dev, "%s\n", __func__); + r = fdp_nci_i2c_read(phy, ); if (r == -EREMOTEIO) -- 1.9.1
Re: [PATCH v2 1/1] drivers: staging: rtl8723au: hal: Remove pointless test
On Sun, Sep 04, 2016 at 01:01:20PM +0200, Matthias Beyer wrote: > This patch removes the pointless `else if` test. > > Signed-off-by: Matthias Beyer> Reported-by: David Binderman > --- looks like Greg has already applied your first patch. db0c12744f8d ("drivers: staging: rtl8723au: hal: Remove pointless test") regards sudip
Re: ath9k gpio request
On Saturday 04 June 2016 08:07 PM, Kalle Valo wrote: (Fixing top posting) "Pan, Miaoqing" <miaoq...@qti.qualcomm.com> writes: --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h @@ -1122,8 +1122,8 @@ enum { #define AR9300_NUM_GPIO 16 #define AR9330_NUM_GPIO 16 #define AR9340_NUM_GPIO 23 -#define AR9462_NUM_GPIO 10 -#define AR9485_NUM_GPIO 12 +#define AR9462_NUM_GPIO 14 +#define AR9485_NUM_GPIO 11 #define AR9531_NUM_GPIO 18 #define AR9550_NUM_GPIO 24 #define AR9561_NUM_GPIO 23 @@ -1139,8 +1139,8 @@ enum { #define AR9300_GPIO_MASK0xF4FF #define AR9330_GPIO_MASK0xF4FF #define AR9340_GPIO_MASK0x000F -#define AR9462_GPIO_MASK0x03FF -#define AR9485_GPIO_MASK0x0FFF +#define AR9462_GPIO_MASK0x3FFF +#define AR9485_GPIO_MASK0x07FF #define AR9531_GPIO_MASK0x000F #define AR9550_GPIO_MASK0x000F #define AR9561_GPIO_MASK0x000F solves the problem. Tested-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> Done, https://patchwork.kernel.org/patch/9151847/ But the patch 9151847 is different from what Sudip tested above? Why? And if you modify something _after_ the reporter has tested the patch clearly document what you changed and why. I do not want find hidden changes like this, even more so when the patch is going to a 4.7-rc release. Sudip, could you also test patch 9151847, please? You can download the patch from the patchwork link above. This is also ok. Please add my Tested-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> and maybe a Reported-by tag is also appropriate in this case. Regards Sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: ath9k gpio request
On Thursday 02 June 2016 01:32 PM, Pan, Miaoqing wrote: Seems there are something wrong in the datasheet, try --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h @@ -1122,8 +1122,8 @@ enum { #define AR9300_NUM_GPIO 16 #define AR9330_NUM_GPIO 16 #define AR9340_NUM_GPIO 23 -#define AR9462_NUM_GPIO 10 -#define AR9485_NUM_GPIO 12 +#define AR9462_NUM_GPIO 14 +#define AR9485_NUM_GPIO 11 #define AR9531_NUM_GPIO 18 #define AR9550_NUM_GPIO 24 #define AR9561_NUM_GPIO 23 @@ -1139,8 +1139,8 @@ enum { #define AR9300_GPIO_MASK0xF4FF #define AR9330_GPIO_MASK0xF4FF #define AR9340_GPIO_MASK0x000F -#define AR9462_GPIO_MASK0x03FF -#define AR9485_GPIO_MASK0x0FFF +#define AR9462_GPIO_MASK0x3FFF +#define AR9485_GPIO_MASK0x07FF #define AR9531_GPIO_MASK0x000F #define AR9550_GPIO_MASK0x000F #define AR9561_GPIO_MASK0x000F solves the problem. Tested-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> Regards Sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: ath9k gpio request
On Wednesday 01 June 2016 12:24 PM, Pan, Miaoqing wrote: which chip ? And what's the GPIO number ? lspci -v reports: 09:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01) Subsystem: Foxconn International, Inc. Device e052 Flags: bus master, fast devsel, latency 0, IRQ 19 Memory at c050 (64-bit, non-prefetchable) [size=512K] Expansion ROM at c058 [disabled] [size=64K] Capabilities: [40] Power Management version 2 Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+ Capabilities: [70] Express Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [140] Virtual Channel Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00 Kernel driver in use: ath9k Any easy way to find out the gpio number or i can modify the module to find that out. Regards Sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: linux-next: Tree for May 30
On Monday 30 May 2016 08:52 AM, Stephen Rothwell wrote: Hi all, Changes since 20160527: Hi All, I have just built and booted with next-20160530 and my dmesg is full of warnings from ath9k. Last kernel tested was v4.6 and there was no problem with that. The traces are like: Call Trace: [] dump_stack+0x63/0x87 [] __warn+0xd1/0xf0 [] warn_slowpath_null+0x1d/0x20 [] ath9k_hw_gpio_request+0x6f/0x320 [ath9k_hw] [] ath9k_hw_reset+0xfe4/0x12e0 [ath9k_hw] [] ath_reset_internal+0x104/0x1f0 [ath9k] [] ath_reset+0x3d/0x60 [ath9k] [] ath_chanctx_set_channel+0x1b6/0x300 [ath9k] [] ath9k_config+0xc6/0x1f0 [ath9k] [] ? mutex_lock+0x12/0x2f [] ieee80211_hw_config+0x63/0x350 [mac80211] [] ieee80211_scan_work+0x161/0x480 [mac80211] [] process_one_work+0x153/0x3f0 [] worker_thread+0x12b/0x4b0 [] ? rescuer_thread+0x340/0x340 [] kthread+0xc9/0xe0 [] ret_from_fork+0x1f/0x40 [] ? kthread_park+0x60/0x60 ---[ end trace 27eb5094a52869ea ]--- Call Trace: [] dump_stack+0x63/0x87 [] __warn+0xd1/0xf0 [] warn_slowpath_null+0x1d/0x20 [] ath9k_hw_gpio_get+0x1a9/0x1b0 [ath9k_hw] [] ath9k_rfkill_poll_state+0x34/0x60 [ath9k] [] ieee80211_rfkill_poll+0x33/0x40 [mac80211] [] cfg80211_rfkill_poll+0x2a/0xc0 [cfg80211] [] rfkill_poll+0x24/0x50 [] process_one_work+0x153/0x3f0 [] worker_thread+0x12b/0x4b0 [] ? rescuer_thread+0x340/0x340 [] kthread+0xc9/0xe0 [] ret_from_fork+0x1f/0x40 [] ? kthread_park+0x60/0x60 ---[ end trace 27eb5094a5286a3d ]--- If it is a known problem then great.. else i can debug and see what the problem is. There are only few patches added for GPIO, so should not be a problem to find out what is causing the error. Regards Sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] staging: wilc1000: fix double unlock
The semaphore was being released twice, once at the beginning of the thread and then again when the thread is about to close. The semaphore is acquired immediately after creating the thread so we should be releasing it when the thread ends. Signed-off-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> --- drivers/staging/wilc1000/linux_wlan.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index a858552..5643a3d 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -313,7 +313,6 @@ static int linux_wlan_txq_task(void *vp) vif = netdev_priv(dev); wl = vif->wilc; - up(>txq_thread_started); while (1) { down(>txq_event); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] staging: wilc1000: remove unused variables
These variables were havnig the pointer returned by wiphy_priv() but they were never used. Signed-off-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> --- drivers/staging/wilc1000/linux_wlan.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 5643a3d..8cc8e8d 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -865,7 +865,6 @@ int wilc_mac_open(struct net_device *ndev) unsigned char mac_add[ETH_ALEN] = {0}; int ret = 0; int i = 0; - struct wilc_priv *priv; struct wilc *wl; vif = netdev_priv(ndev); @@ -876,7 +875,6 @@ int wilc_mac_open(struct net_device *ndev) return -ENODEV; } - priv = wiphy_priv(vif->ndev->ieee80211_ptr->wiphy); netdev_dbg(ndev, "MAC OPEN[%p]\n", ndev); ret = wilc_init_host_int(ndev); @@ -953,14 +951,10 @@ static struct net_device_stats *mac_stats(struct net_device *dev) static void wilc_set_multicast_list(struct net_device *dev) { struct netdev_hw_addr *ha; - struct wilc_priv *priv; - struct host_if_drv *hif_drv; struct wilc_vif *vif; int i = 0; - priv = wiphy_priv(dev->ieee80211_ptr->wiphy); vif = netdev_priv(dev); - hif_drv = (struct host_if_drv *)priv->hif_drv; if (dev->flags & IFF_PROMISC) return; @@ -1114,7 +1108,6 @@ static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) s8 rssi; u32 size = 0, length = 0; struct wilc_vif *vif; - struct wilc_priv *priv; s32 ret = 0; struct wilc *wilc; @@ -1138,7 +1131,6 @@ static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) return PTR_ERR(buff); if (strncasecmp(buff, "RSSI", length) == 0) { - priv = wiphy_priv(vif->ndev->ieee80211_ptr->wiphy); ret = wilc_get_rssi(vif, ); netdev_info(ndev, "RSSI :%d\n", rssi); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] mwifiex: fix possible NULL dereference
On Tuesday 12 April 2016 05:20 PM, Arend van Spriel wrote: On 12-04-16 13:46, Sudip Mukherjee wrote: From: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> We have a check for card just after dereferencing it. So if it is NULL we have already dereferenced it before its check. Lets dereference it after checking card for NULL. And you are changing the scope of the pdev variable. yes, and since all usage of pdev is inside the "if" block so it should not matter. regards sudip Regards, Arend Signed-off-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> --- drivers/net/wireless/marvell/mwifiex/pcie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index edf8b07..d4db9db 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -2884,10 +2884,11 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; const struct mwifiex_pcie_card_reg *reg; - struct pci_dev *pdev = card->dev; int i; if (card) { + struct pci_dev *pdev = card->dev; + if (card->msix_enable) { for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++) synchronize_irq(card->msix_entries[i].vector); -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] mwifiex: fix possible NULL dereference
From: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> We have a check for card just after dereferencing it. So if it is NULL we have already dereferenced it before its check. Lets dereference it after checking card for NULL. Signed-off-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> --- drivers/net/wireless/marvell/mwifiex/pcie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index edf8b07..d4db9db 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -2884,10 +2884,11 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; const struct mwifiex_pcie_card_reg *reg; - struct pci_dev *pdev = card->dev; int i; if (card) { + struct pci_dev *pdev = card->dev; + if (card->msix_enable) { for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++) synchronize_irq(card->msix_entries[i].vector); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] mwifiex: fix possible NULL dereference
From: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> We have a check for card just after dereferencing it. So if it is NULL we have already dereferenced it before its check. Lets dereference it after checking card for NULL. Signed-off-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> --- drivers/net/wireless/marvell/mwifiex/pcie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index edf8b07..84562d0 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -2884,10 +2884,11 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; const struct mwifiex_pcie_card_reg *reg; - struct pci_dev *pdev = card->dev; + struct pci_dev *pdev; int i; if (card) { + pdev = card->dev; if (card->msix_enable) { for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++) synchronize_irq(card->msix_entries[i].vector); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] b43: Fix memory leaks in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init
From: Jia-Ju Bai <baijiaju1...@163.com> The memory allocated by kzalloc in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init is not freed. This patch fixes the bug by adding kfree in b43_ssb_remove, b43_bcma_remove and error handling code of b43_bcma_probe. Thanks Michael for his suggestion. Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> Acked-by: Michael Büsch <m...@bues.ch> Signed-off-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> --- drivers/net/wireless/broadcom/b43/main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c index 72380af..b0603e7 100644 --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c @@ -5680,11 +5680,12 @@ static int b43_bcma_probe(struct bcma_device *core) INIT_WORK(>firmware_load, b43_request_firmware); schedule_work(>firmware_load); -bcma_out: return err; bcma_err_wireless_exit: ieee80211_free_hw(wl->hw); +bcma_out: + kfree(dev); return err; } @@ -5712,8 +5713,8 @@ static void b43_bcma_remove(struct bcma_device *core) b43_rng_exit(wl); b43_leds_unregister(wl); - ieee80211_free_hw(wl->hw); + kfree(wldev->dev); } static struct bcma_driver b43_bcma_driver = { @@ -5796,6 +5797,7 @@ static void b43_ssb_remove(struct ssb_device *sdev) b43_leds_unregister(wl); b43_wireless_exit(dev, wl); + kfree(dev); } static struct ssb_driver b43_ssb_driver = { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [v2, resend] b43: Fix memory leaks in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init
On Sat, Jan 16, 2016 at 09:08:10PM +0800, Jia-Ju Bai wrote: > The memory allocated by kzalloc in b43_bus_dev_ssb_init and > b43_bus_dev_bcma_init is not freed. > This patch fixes the bug by adding kfree in b43_ssb_remove, > b43_bcma_remove and error handling code of b43_bcma_probe. > > Thanks Michael for his suggestion. > > Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com> The patch did not apply cleanly. I had to edit the patch to point to drivers/net/wireless/broadcom/b43/main.c For CONFIG_B43_SSB part- Tested-by: Sudip Mukherjee <sudip.mukher...@codethink.co.uk> regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] b43: fix memory leak
On Thursday 10 March 2016 11:13 PM, Michael Büsch wrote: On Fri, 19 Feb 2016 20:37:18 +0530 Sudip Mukherjee <sudipm.mukher...@gmail.com> wrote: https://patchwork.kernel.org/patch/8049041/ I have an old laptop running on 800Mhz CPU. It has "Broadcom BCM4311 [14e4:4311] (rev 01)". I will try to test it on this weekend. Any news on this one? No. Sorry. I was trying to install ubuntu 14.04 in it, but for some reason the usb stick is not moving past the boot screen. Give me two more days and I will let you all know by this Saturday. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] b43: fix memory leak
On Friday 19 February 2016 01:14 PM, Kalle Valo wrote: Michael Büsch <m...@bues.ch> writes: On Thu, 18 Feb 2016 18:04:36 +0530 Sudip Mukherjee <sudipm.mukher...@gmail.com> wrote: From: Sudip Mukherjee <su...@vectorindia.org> On error we jumped to the label bcma_out and returned the error code but we missed freeing dev. Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> --- drivers/net/wireless/broadcom/b43/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c index c279211..78f670a 100644 --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c @@ -5671,6 +5671,7 @@ static int b43_bcma_probe(struct bcma_device *core) wl = b43_wireless_init(dev); if (IS_ERR(wl)) { err = PTR_ERR(wl); + kfree(dev); goto bcma_out; } We recently had a patch that fixes this, among more leaks. Subject: [PATCH v2 resend] b43: Fix memory leaks in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init Please test that patch instead, so we can finally apply it. It needs to be tested on both ssb and bcma. Come on. This isn't too hard. :) Please somebody with any hardware test it. (I currently don't have any b43 hardware) And the patch can be downloaded from patchwork: https://patchwork.kernel.org/patch/8049041/ I have an old laptop running on 800Mhz CPU. It has "Broadcom BCM4311 [14e4:4311] (rev 01)". I will try to test it on this weekend. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] b43: fix memory leak
From: Sudip Mukherjee <su...@vectorindia.org> On error we jumped to the label bcma_out and returned the error code but we missed freeing dev. Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> --- drivers/net/wireless/broadcom/b43/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c index c279211..78f670a 100644 --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c @@ -5671,6 +5671,7 @@ static int b43_bcma_probe(struct bcma_device *core) wl = b43_wireless_init(dev); if (IS_ERR(wl)) { err = PTR_ERR(wl); + kfree(dev); goto bcma_out; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c
On Wed, Feb 03, 2016 at 02:21:46PM +0900, Byeoungwook Kim wrote: > Conditional codes in rtl_addr_delay() were improved in readability and > performance by using switch codes. > > Reviewed-by: Julian Calaby> Signed-off-by: Byeoungwook Kim > Signed-off-by: Fengguang Wu How you are using Signed-off-by: of Fengguang Wu? did i missed seeing any mail from Fengguang in your previous versions? regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND,01/10] net: wireless: ath: Remove unnecessary semicolon
On Wed, Oct 28, 2015 at 12:32:36AM +0530, punit vara wrote: > This patch is to the htt_rx.c that removes unneeded semicolon which is > reported by coccicheck. > > Here semicolon just create empty statement so please remote it. s/remote/remove Instead of "net: wireless: ath: Remove unnecessary semicolon" the subject should be "ath10k: Remove unnecessary semicolon" and please combine this patch and the next patch as they are similar change to the same driver. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: net: wireless: rt2x00: Fixed Spacing issues
On Sat, Oct 17, 2015 at 09:04:39PM +0100, Paul Mcquade wrote: > Removed empty spaces before/after parenthesis > > Signed-off-by: Paul McQuade> Acked-by: Helmut Schaa > > --- > drivers/net/wireless/rt2x00/rt61pci.h | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) This patch and your other patches related to rt2x00 will not apply anymore as the driver has moved to drivers/net/wireless/ralink/rt2x00 can you please send them again after rebasing against current tree.. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [v2,2/3] net: wireless: b43: Coding Style
On Mon, Oct 19, 2015 at 05:02:22PM +0100, Paul Mcquade wrote: > Fixed Pointer Coding Style > > Signed-off-by: Paul McQuade> Acked-by: Michael Buesch Please fix the From: name like i just replied in another of your patch and this patch will not apply anymore as the driver has moved to a new location drivers/net/wireless/broadcom/b43/ can you please rebase it against the current tree and send. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [1/3] net: wireless: rsi: Coding Spaces
On Sun, Oct 18, 2015 at 12:01:36AM +0100, Paul Mcquade wrote: > Removed space before that ',' > > Signed-off-by: Paul McQuadeThe From: name and Signed-off-by: name should be same else some of the stats generating tools will break. It should be Paul McQuade, not Paul Mcquade. Maybe you have modified your .gitconfig recently. And in the subject net: wireless: is not required. Can you please send v2.. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mac80211: fix memory leak
On Mon, Feb 01, 2016 at 11:28:37AM +0200, Kalle Valo wrote: > Sudip Mukherjee <sudipm.mukher...@gmail.com> writes: > > > On Mon, Feb 01, 2016 at 11:03:35AM +1100, Julian Calaby wrote: > >> Hi Sudip, > >> > >> On Fri, Jan 29, 2016 at 8:49 PM, Sudip Mukherjee > >> <sudipm.mukher...@gmail.com> wrote: > >> > On error we jumped to the error label and returned the error code but we > >> > missed releasing sinfo. > >> > > >> > Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> > >> > >> Should the From: and Signed-off-by: email addresses be the same? > > > > I think 2 years back I had a long discussion with Greg about this and > > since then I al submitting patches like this. A small summayg of the > > problem from that discussion: > > > > "we have strict DMARC check for the corporate mail server. DMARC = > > domain based message authentication. > > So the mail i sent reached all the list subscriber from a different > > server than our designated server, and as a result it is marked as spam > > in many places and I have already received a few complaints regarding > > that." > > You can add a separate "From:" line to the beginning of the commit log > and git will use it then commiting the patch. I didn't find any > documention but it's easy to do and should solve this. Documentation is not needed. :) I have done that couple of time. I will resend this patch with the extra From: line. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ath10k: remove impossible code
From: Sudip Mukherjee <su...@vectorindia.org> len has been initialized with a value of 0 and buf_len with 4096. There is no way that this condition (len > buf_len) can be true now. Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> --- drivers/net/wireless/ath/ath10k/debug.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 2bdf540..8b187e0 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -2176,9 +2176,6 @@ static ssize_t ath10k_debug_fw_checksums_read(struct file *file, mutex_lock(>conf_mutex); - if (len > buf_len) - len = buf_len; - len += scnprintf(buf + len, buf_len - len, "firmware-N.bin\t\t%08x\n", crc32_le(0, ar->firmware->data, ar->firmware->size)); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] mac80211: fix memory leak
From: Sudip Mukherjee <su...@vectorindia.org> On error we jumped to the error label and returned the error code but we missed releasing sinfo. Fixes: 5fe74014172d ("mac80211: avoid excessive stack usage in sta_info") Reviewed-by: Julian Calaby <julian.cal...@gmail.com> Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> --- v2: added Fixes tag, Reviewed-by and From:. net/mac80211/sta_info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 6c198e6..36e75c4 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -561,6 +561,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU) __cleanup_single_sta(sta); out_err: mutex_unlock(>sta_mtx); + kfree(sinfo); rcu_read_lock(); return err; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mac80211: fix memory leak
On Mon, Feb 01, 2016 at 11:03:35AM +1100, Julian Calaby wrote: > Hi Sudip, > > On Fri, Jan 29, 2016 at 8:49 PM, Sudip Mukherjee > <sudipm.mukher...@gmail.com> wrote: > > On error we jumped to the error label and returned the error code but we > > missed releasing sinfo. > > > > Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> > > Should the From: and Signed-off-by: email addresses be the same? I think 2 years back I had a long discussion with Greg about this and since then I al submitting patches like this. A small summayg of the problem from that discussion: "we have strict DMARC check for the corporate mail server. DMARC = domain based message authentication. So the mail i sent reached all the list subscriber from a different server than our designated server, and as a result it is marked as spam in many places and I have already received a few complaints regarding that." > > > --- > > net/mac80211/sta_info.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c > > index 6c198e6..36e75c4 100644 > > --- a/net/mac80211/sta_info.c > > +++ b/net/mac80211/sta_info.c > > @@ -561,6 +561,7 @@ static int sta_info_insert_finish(struct sta_info *sta) > > __acquires(RCU) > > __cleanup_single_sta(sta); > > out_err: > > mutex_unlock(>sta_mtx); > > + kfree(sinfo); > > rcu_read_lock(); > > return err; > > } > > Looks sane to me. I must note that the bug this is fixing is only in > the mac80211-next tree. > > Fixes: 5fe74014172d ("mac80211: avoid excessive stack usage in sta_info") > Reviewed-by: Julian Calaby <julian.cal...@gmail.com> thanks regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: wireless-drivers: random cleanup patches piling up
On Fri, Jan 29, 2016 at 10:08:23AM +0200, Kalle Valo wrote: > Sudip Mukherjee <sudipm.mukher...@gmail.com> writes: > > >> >> That's also my experience from maintaining wireless-drivers for a year, > >> >> this seems to be a "hit and run" type of phenomenon. > >> > > >> > Should we be looking for someone to run a "wireless-driver-cleanups" > >> > tree? They could handle the cleanups and trivial stuff, and send > >> > you a pull request a couple of times per release...? > >> > >> Not a bad idea! But I don't think we need a separate tree as applying > >> patches from patchwork is easy. It should be doable that we add an > >> account to patchwork and whenever I see a this type of trivial cleanup > >> patch I'll assign it to the cleanup maintainer and whenever he/she > >> thinks it's ready he assigns the patch back to me and I'll apply it. > >> > >> The only difficult part is finding a victim/volunteer to > >> do that ;) > > > > I can be a volunteer (victim?). Though i donot know much about > > wireless-drivers, but I do know a little about cleanup patches. > > And maybe, in the process I will start knowing wireless-drivers. > > I think it's better that you have prior experience with linux-wireless > before doing something like this. You can start by reviewing patches and > providing Reviewed-by tags. Sure, I am starting that way. I checked in patchwork and I do not see any checkpatch related patch pending (except staging, which Greg will handle). I think you must have cleared all of them. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] mac80211: fix memory leak
On error we jumped to the error label and returned the error code but we missed releasing sinfo. Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> --- net/mac80211/sta_info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 6c198e6..36e75c4 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -561,6 +561,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU) __cleanup_single_sta(sta); out_err: mutex_unlock(>sta_mtx); + kfree(sinfo); rcu_read_lock(); return err; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Move wlan-ng out of staging?
On Fri, Jan 29, 2016 at 05:00:16PM +0100, Xose Vazquez Perez wrote: > Ksenija wrote: > > > I'm helping Greg do a bit of cleanup in the staging tree, I noticed that > > wlan-ng driver is maybe ready to be moved out of staging. Are there > > any TODO tasks left to do beside checkpatch.pl clean-up? > > Its FAQ was very clear: ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/FAQ > [archived at > http://puppylinux.dreamhosters.com/wireless/linux-wlan-org_FAQ.txt ] > > --cut-- > Q: When will linux-wlan-ng be merged into the mainline kernel? > > Short answer: Never. The ultimate aim of a driver in staging is to graduate out of staging area into the main part of the kernel. If it is already known that this driver can never move out of staging then IMHO its better to remove it. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: wireless-drivers: random cleanup patches piling up
On Fri, Jan 22, 2016 at 05:54:12PM +0200, Kalle Valo wrote: > "John W. Linville"writes: > > > On Fri, Jan 22, 2016 at 02:21:20PM +0200, Kalle Valo wrote: > >> Joe Perches writes: > >> > >> > On Thu, 2016-01-21 at 16:58 +0200, Kalle Valo wrote: > >> >> Hi, > >> >> > >> >> I have quite a lot of random cleanup patches from new developers waiting > >> >> in my queue: > >> >> > >> >> https://patchwork.kernel.org/project/linux-wireless/list/?state=10=25621=date > >> >> > >> >> (Not all of them are cleanup patches, there are also few patches > >> >> deferred due to other reasons, but you get the idea.) > >> >> > >> >> These cleanup patches usually take quite a lot of my time and I'm > >> >> starting to doubt the benefit, compared to the time needed to dig > >> >> through them and figuring out what to apply. And this is of course time > >> >> away from other patches, so it's slowing down "real" development. > >> >> > >> >> I really don't know what to do. Part of me is saying that I just should > >> >> drop them unless it's reviewed by a more experienced developer but on > >> >> the other hand this is a good way get new developers onboard. > >> >> > >> >> What others think? Are these kind of patches useful? > >> > > >> > Some yes, mostly not really. > >> > > >> > While whitespace style patches have some small value, > >> > very few of the new contributors that use tools like > >> > "scripts/checkpatch.pl -f" on various kernel files > >> > actually continue on to submit actual defect fixing > >> > or optimization or code clarity patches. > >> > >> That's also my experience from maintaining wireless-drivers for a year, > >> this seems to be a "hit and run" type of phenomenon. > > > > Should we be looking for someone to run a "wireless-driver-cleanups" > > tree? They could handle the cleanups and trivial stuff, and send > > you a pull request a couple of times per release...? > > Not a bad idea! But I don't think we need a separate tree as applying > patches from patchwork is easy. It should be doable that we add an > account to patchwork and whenever I see a this type of trivial cleanup > patch I'll assign it to the cleanup maintainer and whenever he/she > thinks it's ready he assigns the patch back to me and I'll apply it. > > The only difficult part is finding a victim/volunteer to > do that ;) I can be a volunteer (victim?). Though i donot know much about wireless-drivers, but I do know a little about cleanup patches. And maybe, in the process I will start knowing wireless-drivers. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage
On Thu, Jan 21, 2016 at 10:20:28AM +0900, Chaehyun Lim wrote: > This patch fixes coding style of kmalloc usage found by checkpatch. > CHECK: Prefer kmalloc(sizeof(*new_msg)...) over kmalloc(sizeof(struct > message)...) > > Signed-off-by: Chaehyun Lim> --- > drivers/staging/wilc1000/wilc_msgqueue.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c > b/drivers/staging/wilc1000/wilc_msgqueue.c > index 7107715..c7a60f4 100644 > --- a/drivers/staging/wilc1000/wilc_msgqueue.c > +++ b/drivers/staging/wilc1000/wilc_msgqueue.c > @@ -70,7 +70,7 @@ int wilc_mq_send(struct message_queue *mq, > } > > /* construct a new message */ > - new_msg = kmalloc(sizeof(struct message), GFP_ATOMIC); > + new_msg = kmalloc(sizeof(*new_msg), GFP_ATOMIC); This checkpatch error was introduced by 1/27 patch of this series. Maybe it will be better to fix it in that one. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] NFC: nci: fix memory leak
On Mon, Nov 16, 2015 at 06:27:15PM +0530, Sudip Mukherjee wrote: > In case of invalid number_destination_params we were returning error but > we missed releasing cmd. Lets check for the number of parameter before > allocating memory so that we don't have a memory leak. > > Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> > --- A gentle ping. regards sudip > net/nfc/nci/core.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c > index 10c99a5..fbb7a2b 100644 > --- a/net/nfc/nci/core.c > +++ b/net/nfc/nci/core.c > @@ -610,14 +610,14 @@ int nci_core_conn_create(struct nci_dev *ndev, u8 > destination_type, > struct nci_core_conn_create_cmd *cmd; > struct core_conn_create_data data; > > + if (!number_destination_params) > + return -EINVAL; > + > data.length = params_len + sizeof(struct nci_core_conn_create_cmd); > cmd = kzalloc(data.length, GFP_KERNEL); > if (!cmd) > return -ENOMEM; > > - if (!number_destination_params) > - return -EINVAL; > - > cmd->destination_type = destination_type; > cmd->number_destination_params = number_destination_params; > memcpy(cmd->params, params, params_len); > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fixing full name in patchwork
On Tue, Dec 08, 2015 at 09:54:41AM +0200, Kalle Valo wrote: > Sudip Mukherjee <sudipm.mukher...@gmail.com> writes: > > > On Mon, Dec 07, 2015 at 08:03:54PM +0200, Kalle Valo wrote: > >> Hi Sudip, > >> > >> Sudip Mukherjee <sudipm.mukher...@gmail.com> writes: > >> > > > > I have also noticed the patch. Anyway, I have created a profile in > > patchwork and given full name. Hopefully that should solve the problem. > > At least now your name in the patchwork link above looks correct: Yes, but I am still surprised why this happened for only this patch. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fixing full name in patchwork
On Mon, Dec 07, 2015 at 08:03:54PM +0200, Kalle Valo wrote: > Hi Sudip, > > Sudip Mukherjee <sudipm.mukher...@gmail.com> writes: > > > We were dereferencing cmd first and checking for NULL later. Lets first > > check for NULL. > > > > Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> > > I noticed that your name in git log is not your full name: > > commit 0a38c8e1b592c16d959da456f425053e323a5153 > Author: sudip <sudipm.mukher...@gmail.com> > Date: Tue Nov 24 13:51:38 2015 +0530 > > This is because for some reason in patchwork your fullname is just > "sudip": > > https://patchwork.kernel.org/patch/7688171/ > > Could you please fix your name in patchwork so that in the future we can > use your correct full name? The problem is that I don't know exactly how > to do this but it should be possible because I remember someone else > having a similar problem and he was able to fix it. Hi Kalle, I have also noticed the patch. Anyway, I have created a profile in patchwork and given full name. Hopefully that should solve the problem. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] libertas: check for NULL before use
If kzalloc fails it will return NULL. Lets check for NULL first before using the pointer. Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> --- v2: commit message changed drivers/net/wireless/marvell/libertas/cfg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c index 8317afd..e38ad1d 100644 --- a/drivers/net/wireless/marvell/libertas/cfg.c +++ b/drivers/net/wireless/marvell/libertas/cfg.c @@ -1108,7 +1108,7 @@ static int lbs_associate(struct lbs_private *priv, size_t len, resp_ie_len; int status; int ret; - u8 *pos = &(cmd->iebuf[0]); + u8 *pos; u8 *tmp; lbs_deb_enter(LBS_DEB_CFG80211); @@ -1117,6 +1117,7 @@ static int lbs_associate(struct lbs_private *priv, ret = -ENOMEM; goto done; } + pos = >iebuf[0]; /* * cmd 50 00 -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libertas: fix possible NULL dereference
We were dereferencing cmd first and checking for NULL later. Lets first check for NULL. Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> --- drivers/net/wireless/marvell/libertas/cfg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c index 8317afd..e38ad1d 100644 --- a/drivers/net/wireless/marvell/libertas/cfg.c +++ b/drivers/net/wireless/marvell/libertas/cfg.c @@ -1108,7 +1108,7 @@ static int lbs_associate(struct lbs_private *priv, size_t len, resp_ie_len; int status; int ret; - u8 *pos = &(cmd->iebuf[0]); + u8 *pos; u8 *tmp; lbs_deb_enter(LBS_DEB_CFG80211); @@ -1117,6 +1117,7 @@ static int lbs_associate(struct lbs_private *priv, ret = -ENOMEM; goto done; } + pos = >iebuf[0]; /* * cmd 50 00 -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libertas: fix possible NULL dereference
On Tue, Nov 24, 2015 at 01:43:38AM +0200, Andy Shevchenko wrote: > On Mon, Nov 23, 2015 at 2:32 PM, Sudip Mukherjee > <sudipm.mukher...@gmail.com> wrote: > > We were dereferencing cmd first and checking for NULL later. Lets first > > check for NULL. > > However the patch is valid due to reducing error prone part, the > commit message seems wrong. I will send v2 with modified commit message. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drivers:staging:wilc1000 Fix comparison to NULL messages
On Tue, Nov 17, 2015 at 09:01:28PM +0100, Bogicevic Sasa wrote: > This fixes all "Comparison to NULL could be written like..." > messages from checkpatch.pl > > Signed-off-by: Bogicevic Sasa> --- > drivers/staging/wilc1000/coreconfigurator.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/wilc1000/coreconfigurator.c > b/drivers/staging/wilc1000/coreconfigurator.c > index fd7240c..a31ac55 100644 > --- a/drivers/staging/wilc1000/coreconfigurator.c > +++ b/drivers/staging/wilc1000/coreconfigurator.c > @@ -434,7 +434,7 @@ s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo > **ppstrNetworkInfo) > > /* Get DTIM Period */ > pu8TimElm = get_tim_elm(pu8msa, u16RxLen + FCS_LEN, u8index); > - if (pu8TimElm != NULL) > + if (!pu8TimElm) You are now checking for - if (pu8TimElm == NULL) It should actually be: if (pu8TimElm) regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] NFC: nci: fix memory leak
In case of invalid number_destination_params we were returning error but we missed releasing cmd. Lets check for the number of parameter before allocating memory so that we don't have a memory leak. Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> --- net/nfc/nci/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 10c99a5..fbb7a2b 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c @@ -610,14 +610,14 @@ int nci_core_conn_create(struct nci_dev *ndev, u8 destination_type, struct nci_core_conn_create_cmd *cmd; struct core_conn_create_data data; + if (!number_destination_params) + return -EINVAL; + data.length = params_len + sizeof(struct nci_core_conn_create_cmd); cmd = kzalloc(data.length, GFP_KERNEL); if (!cmd) return -ENOMEM; - if (!number_destination_params) - return -EINVAL; - cmd->destination_type = destination_type; cmd->number_destination_params = number_destination_params; memcpy(cmd->params, params, params_len); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: remove new line around else and braces
On Fri, Nov 13, 2015 at 11:59:47PM +0200, Panayiotis Tembriotis wrote: > Remove excess new line characters as suggested by checkpatch.pl: > ERROR: else should follow close brace '}' > ERROR: that open brace { should be on the previous line > > Signed-off-by: Panayiotis Tembriotis> --- This has already been done. please use staging-testing tree. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2] Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq
On Mon, Nov 09, 2015 at 08:09:36PM +0530, punit vara wrote: > On Mon, Nov 9, 2015 at 3:53 PM, Sudip Mukherjee > <sudipm.mukher...@gmail.com> wrote: > > On Mon, Nov 09, 2015 at 03:43:38PM +0530, punit vara wrote: > >> On Mon, Nov 9, 2015 at 3:31 PM, glen lee <glen@atmel.com> wrote: > >> > > >> > > >> > On 2015년 11월 09일 18:05, punit vara wrote: > >> >> > >> >> On Mon, Nov 9, 2015 at 2:25 PM, glen lee <glen@atmel.com> wrote: > >> >>> > >> >>> On 2015년 11월 09일 17:18, Dan Carpenter wrote: > >> >>>> > >> >>>> On Mon, Nov 09, 2015 at 05:02:48PM +0900, glen lee wrote: > >> >>>>> > >> > >> make ./drivers/staging/wilc1000/this working fine for me > >> > >> but > >> > >> make ./drivers/staging/wilc1000/linux_wlan.o is creates error. > > > > I am also not getting build failure. Can you please post your .config file. > > > > regards > > sudip > Can you tell me Sudip where .config file is saved ? Sorry for asking > silly question :-( at the root of your linux tree. the kernel will be compiled based on the options in these file. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2] Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq
On Mon, Nov 09, 2015 at 03:43:38PM +0530, punit vara wrote: > On Mon, Nov 9, 2015 at 3:31 PM, glen leewrote: > > > > > > On 2015년 11월 09일 18:05, punit vara wrote: > >> > >> On Mon, Nov 9, 2015 at 2:25 PM, glen lee wrote: > >>> > >>> On 2015년 11월 09일 17:18, Dan Carpenter wrote: > > On Mon, Nov 09, 2015 at 05:02:48PM +0900, glen lee wrote: > > > > make ./drivers/staging/wilc1000/this working fine for me > > but > > make ./drivers/staging/wilc1000/linux_wlan.o is creates error. I am also not getting build failure. Can you please post your .config file. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 06/80] staging: wilc1000: host_interface: removes unused functions
On Wed, Oct 28, 2015 at 03:59:26PM +0900, Glen Lee wrote: > From: Leo Kim> > This patch removes unused functions at host_interface files. > - host_int_send_join_leave_info_to_host > - host_int_send_network_info_to_host > > Signed-off-by: Leo Kim > Signed-off-by: Glen Lee > --- > drivers/staging/wilc1000/host_interface.c | 11 -- > drivers/staging/wilc1000/host_interface.h | 34 > --- > 2 files changed, 45 deletions(-) > > diff --git a/drivers/staging/wilc1000/host_interface.c > b/drivers/staging/wilc1000/host_interface.c > index c3826eb..7f29abd 100644 > --- a/drivers/staging/wilc1000/host_interface.c > +++ b/drivers/staging/wilc1000/host_interface.c > @@ -4037,11 +4037,6 @@ s32 hif_get_cfg(struct host_if_drv *hif_drv, u16 > u16WID, u16 *pu16WID_Value) > return result; > } > > -void host_int_send_join_leave_info_to_host > - (u16 assocId, u8 *stationAddr, bool joining) > -{ > -} > - > static void GetPeriodicRSSI(unsigned long arg) > { > struct host_if_drv *hif_drv = (struct host_if_drv *)arg; > @@ -4070,12 +4065,6 @@ static void GetPeriodicRSSI(unsigned long arg) > mod_timer(_rssi, jiffies + msecs_to_jiffies(5000)); > } > > - > -void host_int_send_network_info_to_host > - (u8 *macStartAddress, u16 u16RxFrameLen, s8 s8Rssi) > -{ > -} > - > s32 host_int_init(struct net_device *dev, struct host_if_drv > **hif_drv_handler) In my staging tree this is: s32 host_int_init(struct host_if_drv **hif_drv_handler) Is this patchseries dependent on some previous unapplied patch? regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V4] staging: wilc1000: wilc_msgqueue.c : remove goto statement
On Tue, Oct 27, 2015 at 05:33:37PM +0900, Glen Lee wrote: > From: Leo Kim> > This patch removes goto statement and moves the spin lock position. > If a memory allocation fails, directly returns an error. > The spin lock actually protects the pHandle. Therefore, call spin lock just > before pHandle is used. > > Signee-eff-by: Lee Kim Signed-off-by? regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: fix build error on SPI
On Tue, Oct 27, 2015 at 06:20:14PM +0900, Glen Lee wrote: > wilc_netdev_init function has parameters to pass but no argument is passed > when bus type SPI is selected. Which causes build error. > This patch passes argument to the function wilc_netdev_init. > > Signed-off-by: Glen LeeFixes: 12ba5416dc77 ("staging: wilc1000: assign pointer of g_linux_wlan to sdio device data") regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: fix memory leak on mgmt_tx on error return path
On Fri, Oct 09, 2015 at 12:11:33PM +0100, Colin King wrote: > From: Colin Ian King> > Static analysis with cppcheck found the following memory leak: > > [drivers/staging/wilc1000/linux_mon.c:255]: (error) Memory leak: mgmt_tx > > Free mgmt_tx on the error return path when mgmt_tx->buff fails to be > allocated. > > Signed-off-by: Colin Ian King > --- This has already been done by: f638dd3918a4 ("staging: wilc1000: fix potential memory leak") regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: rtl8723au: Fix resource leak
On Sun, Sep 27, 2015 at 09:30:54PM +0200, Mateusz Kulikowski wrote: > Firmware was not released properly if kmemdup fails. > > Addresses-Coverity-Id: 1269118 > Signed-off-by: Mateusz Kulikowski> --- > drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c > b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c > index cd014f7..87bb87f 100644 > --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c > +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c > @@ -249,13 +249,13 @@ int rtl8723a_FirmwareDownload(struct rtw_adapter > *padapter) > goto Exit; > } > firmware_buf = kmemdup(fw->data, fw->size, GFP_KERNEL); > + release_firmware(fw); > if (!firmware_buf) { > rtStatus = _FAIL; > goto Exit; > } > buf = firmware_buf; > fw_size = fw->size; > - release_firmware(fw); You are releasing the firmware and then accessing fw->size here. That just introduced a NULL pointer dereference. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] staging: rtl8723au: Fix resource leak
On Sun, Sep 27, 2015 at 09:48:19PM +0200, Mateusz Kulikowski wrote: > Firmware was not released properly if kmemdup fails. > > Addresses-Coverity-Id: 1269118 > Signed-off-by: Mateusz Kulikowski> --- Not seen your v2 while replying to your v1. Sorry for the noise. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Removed extra spaces, and error from checkpatch.pl
On Sun, Sep 27, 2015 at 05:44:16AM +0530, Pinkesh Badjatiya wrote: > Removed trailing spaces. > Fixed some errors from checkpatch.pl verification. > No changes made to actual functional code. > > Signed-off-by: Pinkesh Badjatiya> --- And you have done more than one change in this patch. Please do only one type of change in a patch and mention the change in the commit message. Regards Sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wicl1000: fix dereference after free in wilc_wlan_cleanup()
On Tue, Sep 22, 2015 at 12:24:50PM +0200, Javier Martinez Canillas wrote: > The wilc_wlan_cleanup() function iterates over the list of transmission > buffers freeing all of them and then iterates over the receive buffers > list to free all of them as well. > > But on the receive loop a pointer to struct txq_entry_t is dereferenced > instead of the pointer to a struct rxq_entry_t. This not only causes a > dereference to a pointer already freed but also leaks the memory in the > struct rxq_entry_t buffer. > > Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") > Signed-off-by: Javier Martinez Canillas> > --- > > 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 4c25179c2fec..c40f143b00b7 100644 > --- a/drivers/staging/wilc1000/wilc_wlan.c > +++ b/drivers/staging/wilc1000/wilc_wlan.c > @@ -1746,7 +1746,7 @@ static void wilc_wlan_cleanup(void) > if (rqe == NULL) > break; > #ifdef MEMORY_DYNAMIC > - kfree(tqe->buffer); > + kfree(rqe->buffer); > #endif MEMORY_DYNAMIC is only used here and no where else. And buffer was allocated in the else part of #ifdef MEMORY_STATIC. So you should really be using #ifndef MEMORY_STATIC here instead of #ifdef MEMORY_DYNAMIC otherwise memory leak will still remain. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] Staging: wilc1000: Use NULL instead of zero
On Thu, Sep 17, 2015 at 09:09:35AM +0530, Ronit Halder wrote: > On Wed, 2015-09-16 at 20:15 -0700, Greg KH wrote: > > On Thu, Sep 17, 2015 at 08:28:52AM +0530, roni wrote: > > > > I don't remember, that was many hundreds of patches ago, sorry. Try it > > yourself to see if I messed up. Perhaps someone else had already sent > > in that same change before you did? > > git-apply shows no error if I apply second patch on > staging/staging-testing. If you think your patch still applies properly then please resend it. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2 1/8] staging: wilc1000: remove INLINE macro
On Thu, Sep 17, 2015 at 04:48:42PM +0900, Chaehyun Lim wrote: > This patch removes INLINE macro that is used anymore. used? if used then why are you removing it? :) regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2 3/8] staging: wilc1000: replace int8_t with int
On Thu, Sep 17, 2015 at 04:48:44PM +0900, Chaehyun Lim wrote: > This patch replaces int8_t with int. just use return type as int. > > Signed-off-by: Chaehyun Lim> --- but isn't int8_t is defined as char? regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: Removed curly braces
On Tue, Sep 15, 2015 at 07:24:00PM +0530, Aparna Karuthodi wrote: > Removed the curly braces of a single statement if block to remove a > coding style warning detected by checkpatch. > The warning is given below: > WARNING: braces {} are not necessary for single statement blocks > > Signed-off-by: Aparna Karuthodi> --- This will not apply any more due to recent modification to this file. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/7] remove wilc_errorsupport.h from the wilc driver
On Tue, Sep 15, 2015 at 11:53:34AM +0900, Tony Cho wrote: > This patch aims to remove the wilc_errorsupport.h which is unnecessary in the > wilc driver. This patch replaces the error types defined by wilc driver with > kernel generic error types and removes macros which handles the errors. Patch 2/7 and 4/7 are introducing new checkpatch warnings which again some has to fix in a separate patch. Better to fix it while you are sending. And instead of printk it should be pr_err or much better if you can use netev_err. Looks like it can be used in some of the functions. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] staging: wilc1000: remove unused variable g_num_total_switches
On Tue, Sep 15, 2015 at 02:33:54PM +0900, Tony Cho wrote: > From: Glen Lee> > g_num_total_switches is never used so just delete it. > > Signed-off-by: Glen Lee > Signed-off-by: Tony Cho > --- you only deleted from the .h file but it still remains in coreconfigurator.c regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/4] staging: wilc1000: delete function declaration SendRawPacket
On Tue, Sep 15, 2015 at 02:33:55PM +0900, Tony Cho wrote: > From: Glen Lee> > SendRawpacket is declared but not implemented. It is not used also. > So just delete it. > > Signed-off-by: Glen Lee > Signed-off-by: Tony Cho > --- Still remains in coreconfigurator.c regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] staging: wilc1000: remove unused variable g_num_total_switches
On Tue, Sep 15, 2015 at 06:46:25AM -0700, Greg KH wrote: > On Tue, Sep 15, 2015 at 05:26:35PM +0900, Tony Cho wrote: > > > > > > On 2015년 09월 15일 16:13, Sudip Mukherjee wrote: > > >On Tue, Sep 15, 2015 at 02:33:54PM +0900, Tony Cho wrote: > > >>From: Glen Lee <glen@atmel.com> > > >> > > >>g_num_total_switches is never used so just delete it. > > >> > > >>Signed-off-by: Glen Lee <glen@atmel.com> > > >>Signed-off-by: Tony Cho <tony@atmel.com> > > >>--- > > >you only deleted from the .h file but it still remains in > > >coreconfigurator.c > > > > > >regards > > >sudip > > > > The variable was removed in previous patch (staging: wilc1000: remove > > unused variables) and the patch was sent > > but it's not accepted yet. So, you can find the variable still in c file. > > I don't see that patch here in my queue :( > > Please resend all of your outstanding patches, I think we are out of > sync somehow. This was the series of 7 patches and the first patch was "remove PANDA_BOARD". And the series is indeed not applied. patch 7/7 was removing g_num_total_switches from the .c file, while resending please modify and remove it from the .h file also. And when your patch depends on some previous unapplied patch it will be better if you can mention that in the comments. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Staging: wilc1000: Use NULL instead of zero
On Mon, Sep 14, 2015 at 05:37:45PM +0530, Ronit Halder wrote: > I checked but it didn't show me any warning. > Can you please specify the warning? try with --strict option of checkpatch. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drivers: stating: wilc1000: Add a check for SPI availability
On Mon, Sep 14, 2015 at 10:21:14PM +0530, Chandra S Gorentla wrote: > NULL pointer deference is observed in the wilc1000.ko module > with bus type SPI and when SPI is not ready. > > Signed-off-by: Chandra S Gorentla> --- A small spelling mistake in the subject. It should be "staging" and not "stating" regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/5] staging: wilc1000: wilc_msgqueue.c: use kmalloc with GFP_ATOMIC
On Tue, Sep 08, 2015 at 12:36:38AM +0900, Chaehyun Lim wrote: > This patch use kmalloc with GFP_ATOMIC instead of WILC_MALLOC. > It is inside the spin lock region. > > Signed-off-by: Chaehyun Lim> --- Its not related to your patch, but while seeing your patch I thought of checking how WILC_NULLCHECK is working. Well, WILC_NULLCHECK is simple, its just checking for NULL and calling WILC_ERRORREPORT. WILC_ERRORREPORT is also simple, it is printing the error and then goto ERRORHANDLER; Ok, so now there are total 3 ERRORHANDLER label, one in wilc_errorsupport.h, there this label is the part of WILC_CATCH macro, and 2 more ERRORHANDLER in coreconfigurator.c. So it jumps to which ERRORHANDLER ??? regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: wilc1000: fix freeing of ERR_PTR
If memdup_user() fails then it will return the error code in ERR_PTR. We were checking it with IS_ERR but then again trying to free it on the error path. Signed-off-by: Sudip Mukherjee <su...@vectorindia.org> --- drivers/staging/wilc1000/linux_wlan.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index c90c459..020ed03 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2116,10 +2116,8 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) if (size && wrq->u.data.pointer) { buff = memdup_user(wrq->u.data.pointer, wrq->u.data.length); - if (IS_ERR(buff)) { - s32Error = PTR_ERR(buff); - goto done; - } + if (IS_ERR(buff)) + return PTR_ERR(buff); if (strncasecmp(buff, "RSSI", length) == 0) { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv3] staging: wilc1000: use netdev_* instead of printk
On Tue, Aug 18, 2015 at 01:27:31AM -0400, Raphaël Beamonte wrote: 2015-08-18 0:24 GMT-04:00 Sudip Mukherjee sudipm.mukher...@gmail.com: + netdev_err([Sendconfigpkt]Get Timed out\n); This will not compile. you can not just replace printk with netdev_*, you need to mention a net_device. You're right! I'm making a lot of mistakes. It seems I called the make command in the wrong git tree... Thanks for catching that, and taking time to review! I just saw there isn't any netdev_debug available. Do you know the reason for that? Is there a replacement besides pr_debug? netdev_dbg Also, it seems that in all the functions where it's another netdev that's available that I could use, I don't have access to the net_device struct. Is there a general way to get that device information? I saw an old lkml post talking about dev_*() functions to do that? Would you have some hint on the matter? If the function is not having the net_device try to see if you can pass it the struct as an argument. if not possible then in any way then no other way but to use pr_* regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] staging: wilc1000: Remove pointer and integer comparision
On Sun, Aug 09, 2015 at 09:05:11PM +0530, Chandra S Gorentla wrote: Removed pointer check with integer; this fixes 'sparse' error - error: incompatible types for operation () left side has type unsigned char [usertype] *[usertype] pu8Tail right side has type int Signed-off-by: Chandra S Gorentla csgoren...@gmail.com --- Changes in v2: Subject line corrected wilc100 - wilc1000 drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index cc549c2..4ba1ad7 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -3471,7 +3471,7 @@ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaco *pu8CurrByte++ = ((pstrSetBeaconParam-u32TailLen 24) 0xFF); /* Bug 4599 : if tail length = 0 skip copying */ - if (pstrSetBeaconParam-pu8Tail 0) + if (pstrSetBeaconParam-pu8Tail != NULL) This NULL test can be better wriiten as if (pstrSetBeaconParam-pu8Tail) regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Staging:wilc1000 :Remove typedef from struct
On Fri, Jul 31, 2015 at 01:52:13PM -0700, Greg Kroah-Hartman wrote: On Fri, Jul 31, 2015 at 11:08:47AM +0530, Shraddha Barke wrote: This patch fixes the following checkpatch.pl warning: WARNING: do not add new typedefs Signed-off-by: Shraddha Barke shraddha.6...@gmail.com --- snip -typedef enum { +enum { CLASS1_FRAME_TYPE = 0x00, CLASS2_FRAME_TYPE = 0x01, CLASS3_FRAME_TYPE = 0x02, Did you test-build this change? This enum is not used anywhere. So did not affect the build. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/28] removing the compile warnings for 64-bit
On Fri, Jul 31, 2015 at 04:38:08PM +0900, Tony Cho wrote: Hi Greg, This patch focuses on removing the compile warnings for 64bit incompatability. Most warnings are due to senseless type castings from driver handler to u32 and also to void pointers. They are removed by using the same handler with this series of patch. All warnings disappear. At the end of the series it has no warnings on my 64bit system. But some of the patch in the series increased the number of warnings. Before this series I had 77 warnings. patch 1/28 increased that to 82. patch 4/28 increased the number of warnings to 133. But after that it started gradually decreasing. And at the end 0. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2 3/5] staging: wilc1000: remove warnings on missing blank line
On Thu, Jul 30, 2015 at 06:10:12PM +0900, Tony Cho wrote: This patch removes the warnings reported by checkpatch.pl on missing a blank line after declarations. Signed-off-by: Tony Cho tony@atmel.com --- V2: This patch doesn't have a difference with the first one. However, it's resent becasue not accepted with the 9th patch. --- drivers/staging/wilc1000/wilc_sdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index ee1cbd1..50be2a1 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -780,6 +780,7 @@ static int sdio_clear_int_ext(uint32_t val) if (g_sdio.has_thrpt_enh3) { uint32_t reg; + reg = val ((1 MAX_NUN_INT_THRPT_ENH2) - 1); /* select VMM table 0 */ This patch will not apply. After your first patch (1/5) if (g_sdio.has_thrpt_enh3) has become if(g_sdio.has_thrpt_enh3). regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2 1/5] staging: wilc1000: #ifdef conditionals cover entire functions
On Thu, Jul 30, 2015 at 06:10:10PM +0900, Tony Cho wrote: This patch lets preprocessor conditionals (#ifdef) related to WILC_SDIO_IRQ_GPIO to compile out the entire functions. Compiling out the entire functions is preferred rather than portions of functions or expressions becausue doing so makes code harder to read. Signed-off-by: Tony Cho tony@atmel.com --- snip +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_clear_int(void) { -#ifndef WILC_SDIO_IRQ_GPIO - /* uint32_t sts; */ - sdio_cmd52_t cmd; - - cmd.read_write = 0; - cmd.function = 1; - cmd.raw = 0; - cmd.address = 0x4; - cmd.data = 0; - g_sdio.sdio_cmd52(cmd); - int_clrd++; - - return cmd.data; -#else uint32_t reg; if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, reg)) { @@ -181,9 +168,23 @@ static int sdio_clear_int(void) sdio_write_reg(WILC_HOST_RX_CTRL_0, reg); int_clrd++; return 1; -#endif +} +#else +static int sdio_clear_int(void) +{ + sdio_cmd52_t cmd; + + cmd.read_write = 0; + cmd.function = 1; + cmd.raw = 0; + cmd.address = 0x4; + cmd.data = 0; + g_sdio.sdio_cmd52(cmd); + int_clrd++; + return cmd.data; } +#endif /* WILC_SDIO_IRQ_GPIO */ instead of changing #ifndef to #ifdef i think the following would have been easier: diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 5a18148..5cd4d45 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -155,9 +155,9 @@ _fail_: return 0; } +#ifndef WILC_SDIO_IRQ_GPIO static int sdio_clear_int(void) { -#ifndef WILC_SDIO_IRQ_GPIO /* uint32_t sts; */ sdio_cmd52_t cmd; @@ -170,7 +170,10 @@ static int sdio_clear_int(void) int_clrd++; return cmd.data; +} #else +static int sdio_clear_int(void) +{ uint32_t reg; if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, reg)) { @@ -181,9 +184,8 @@ static int sdio_clear_int(void) sdio_write_reg(WILC_HOST_RX_CTRL_0, reg); int_clrd++; return 1; -#endif - } +#endif uint32_t sdio_xfer_cnt(void) { uint32_t sdio_xfer_cnt(void) snip +#ifdef WILC_SDIO_IRQ_GPIO static int sdio_clear_int_ext(uint32_t val) { int ret; - if (g_sdio.has_thrpt_enh3) { + if(g_sdio.has_thrpt_enh3) { why changing this? The original style is according to the kernel coding style. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] staging: rtl8723au: function no longer discards return value
On Tue, Jun 30, 2015 at 11:54:59PM +0200, Michel von Czettritz wrote: The return value of FillH2CCmd in rtl8723a_set_rssi_cmd and rtl8723a_set_raid_cmd is never checked. Both functions always return _SUCCESS. Both functions now return the return value of FillH2CCmd. If they are never checked then why do we need to return some value? why not make them void? regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] staging: rtl8723au: function no longer discards return value
On Wed, Jul 01, 2015 at 10:50:42AM +0300, Dan Carpenter wrote: On Wed, Jul 01, 2015 at 12:42:24PM +0530, Sudip Mukherjee wrote: On Tue, Jun 30, 2015 at 11:54:59PM +0200, Michel von Czettritz wrote: The return value of FillH2CCmd in rtl8723a_set_rssi_cmd and rtl8723a_set_raid_cmd is never checked. Both functions always return _SUCCESS. Both functions now return the return value of FillH2CCmd. If they are never checked then why do we need to return some value? why not make them void? They probably *should* be checked eventually? yes, they should check the sucess/failure of the commands. If that plan is there to check the values afterwards then the patch is correct. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] staging: rtl8723au: fix incorrect type in assignment
On Tue, Jun 30, 2015 at 11:54:02PM +0200, Michel von Czettritz wrote: Writing the output of cpu_to_le32 to an u32 or *(u32*) is an implicit cast and results in an sparse warning. Since param and mask won't be changed, the implicit cast can be avoided by creating local variables. Signed-off-by: Michel von Czettritz michel.von.czettr...@gmail.com --- drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c index 1003365..a5e6726 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c @@ -115,9 +115,10 @@ exit: int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u32 *param) { - *((u32 *)param) = cpu_to_le32(*(param)); + __le32 param_le; checkpatch warns about Missing a blank line after declarations regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: wilc1000: fix build failure
commit 80279fb7ba5b (cfg80211: properly send NL80211_ATTR_DISCONNECTED_BY_AP in disconnect) has changed the api of cfg80211_disconnected() and caused a build failure. Add the extra argument as false since it appears from the code that the disconnection is not locally generated. And incase of doubt we can use false as that is the default behaviour. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 92064db..f7f5faf 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -675,7 +675,8 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, pstrDisconnectNotifInfo-u16reason = 1; } cfg80211_disconnected(dev, pstrDisconnectNotifInfo-u16reason, pstrDisconnectNotifInfo-ie, - pstrDisconnectNotifInfo-ie_len, GFP_KERNEL); + pstrDisconnectNotifInfo-ie_len, false, + GFP_KERNEL); } -- 1.8.1.2 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] staging: wilc1000: wilc_wfi_netdevice.c: remove commented codes
On Tue, Jun 23, 2015 at 09:17:44AM +0900, Chaehyun Lim wrote: Remove commented codes. Signed-off-by: Chaehyun Lim chaehyun@gmail.com --- 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 snip @@ -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); This is not applying. My file is having here: if (ret) { PRINT_ER(Error Init Driver\n); } is this patch dependent on some prior patch which is not yet applied to staging? regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: wilc1000: remove WILC_WFIDrvHandle
WILC_WFIDrvHandle was: typedef struct { s32 s32Dummy; } *WILC_WFIDrvHandle; which basically meant a pointer to an integer. so removed the typedef and replaced all WILC_WFIDrvHandle with int * Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- replacement was done by using sed, just manually removed the typedef. build ok, before this change total 77 build warning, after this patch same number of warnings. Might not apply because of some other pending patch. drivers/staging/wilc1000/host_interface.c | 148 +++--- drivers/staging/wilc1000/host_interface.h | 122 +- drivers/staging/wilc1000/linux_wlan.c | 14 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 18 +-- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 +- 5 files changed, 151 insertions(+), 155 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 3228824..76711e8 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -726,7 +726,7 @@ static s32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperationMode /** * @brief host_int_set_IPAddress * @details Setting IP address params in message queue - * @param[in]WILC_WFIDrvHandle hWFIDrv, u8* pu8IPAddr + * @param[in]int *hWFIDrv, u8* pu8IPAddr * @return Error code. * @author * @date @@ -757,7 +757,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) - host_int_get_ipaddress((WILC_WFIDrvHandle)drvHandler, firmwareIPAddress, idx); + host_int_get_ipaddress((int *)drvHandler, firmwareIPAddress, idx); if (s32Error) { PRINT_D(HOSTINF_DBG, Failed to set IP address\n); @@ -778,7 +778,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) /** * @brief Handle_get_IPAddress * @details Setting IP address params in message queue - * @param[in]WILC_WFIDrvHandle hWFIDrv, u8* pu8IPAddr + * @param[in]int *hWFIDrv, u8* pu8IPAddr * @return Error code. * @author * @date @@ -807,7 +807,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx) WILC_FREE(strWID.ps8WidVal); if (WILC_memcmp(gs8GetIP[idx], gs8SetIP[idx], IP_ALEN) != 0) - host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, gs8SetIP[idx], idx); + host_int_setup_ipaddress((int *)pstrWFIDrv, gs8SetIP[idx], idx); if (s32Error != WILC_SUCCESS) { PRINT_ER(Failed to get IP address\n); @@ -1513,7 +1513,7 @@ static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFcon PRINT_D(HOSTINF_DBG, Getting site survey results\n); - s32Err = host_int_get_site_survey_results((WILC_WFIDrvHandle)pstrWFIDrv, + s32Err = host_int_get_site_survey_results((int *)pstrWFIDrv, gapu8RcvdSurveyResults, MAX_SURVEY_RESULT_FRAG_SIZE); if (s32Err) { @@ -2441,7 +2441,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pst if (u8MacStatus == MAC_CONNECTED) { WILC_memset(gapu8RcvdAssocResp, 0, MAX_ASSOC_RESP_FRAME_SIZE); - host_int_get_assoc_res_info((WILC_WFIDrvHandle)pstrWFIDrv, + host_int_get_assoc_res_info((int *)pstrWFIDrv, gapu8RcvdAssocResp, MAX_ASSOC_RESP_FRAME_SIZE, u32RcvdAssocRespInfoLen); @@ -2531,7 +2531,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pst (strConnectInfo.u16ConnectStatus == SUCCESSFUL_STATUSCODE)) { #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP - host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 0, 0); + host_int_set_power_mgmt((int *)pstrWFIDrv, 0, 0); #endif PRINT_D(HOSTINF_DBG, MAC status : CONNECTED and Connect Status : Successful\n); @@ -2607,7 +2607,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pst #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP g_obtainingIP = false; - host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 0, 0); + host_int_set_power_mgmt((int *)pstrWFIDrv, 0, 0); #endif pstrWFIDrv-strWILC_UsrConnReq.pfUserConnectResult(CONN_DISCONN_EVENT_DISCONN_NOTIF, @@ -3088,7
Re: [PATCH] staging: wilc1000: modify type casting warning
On Tue, Jun 16, 2015 at 03:46:04PM +0900, Dean Lee wrote: modify message warning: cast from pointer to integer of different size. add type cast 'uintptr_t'. --- [] @@ -620,7 +621,7 @@ static s32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHostIFSetC PRINT_D(HOSTINF_DBG, Setting channel\n); /*Sending Cfg*/ - s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)pstrWFIDrv); + s32Error = SendConfigPkt(SET_CFG, strWID, 1, true, (u32)(uintptr_t)pstrWFIDrv); two typecasts??? there has to be a better solution than this. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Staging: wilc1000: Boolean tests don't need comparisons
On Tue, Jun 16, 2015 at 07:33:42AM +, Abdul, Hussain (H.) wrote: From: Abdul Hussain hab...@visteon.com This patch removes unwanted true and false from boolean tests. Signed-off-by: Abdul Hussain hab...@visteon.com --- snip diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 17ab5cd..be1f6bf 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -7816,7 +7816,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) pNewJoinBssParam-rsn_cap[1] = pu8IEs[rsnIndex + 1]; rsnIndex += 2; } - pNewJoinBssParam-rsn_found = 1; + pNewJoinBssParam-rsn_found = true; But this is not a boolean test, this is an assignement. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Staging: wilc1000: Boolean tests don't need comparisons
On Tue, Jun 16, 2015 at 08:55:13AM +, Abdul, Hussain (H.) wrote: On Tuesday 16 June 2015 01:40 PM, Sudip Mukherjee wrote: On Tue, Jun 16, 2015 at 07:33:42AM +, Abdul, Hussain (H.) wrote: From: Abdul Hussain hab...@visteon.com regards sudip Sudip, Yes that is an assignment to the boolean variable. Do i need to modify the commit message or to send separate patch? if that assignment is related to the change in boolean test then it should be in the same patch. But in any case commit message should mention that change and the reason. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: update TODO list
On Fri, Jun 12, 2015 at 07:23:11PM +0900, Dean Lee wrote: remove complete OS wrapper functions. just a minor thing. It will be easy if you send your patches in series instead of separate patches. your patch remove oswrapper type file is dependent on one of the previous patch that you have sent today. If for some reason that previous patch is not applied then remove oswrapper type file will not apply and then this patch will have no meaning. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: fix warning while printing
On Thu, Jun 11, 2015 at 12:42:23PM +0900, Chris Park wrote: size_t should print using %zu, but here it was use %lu. we were getting warning while printing. thanks, I made it to %lu seeing warning in x86_64 but that started warning in i386. Not this solves warning in both. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: Remove commented variable declerations
On Wed, Jun 03, 2015 at 09:56:11AM +, Sharma, Abhishek (A.) wrote: Removing the commented static variable declerations. Signed-off-by: Abhishek Sharma ashar...@visteon.com Your email header From: name is not matching with Signed-off-by: name. If you cannot fix your email client then please send v2 with an additional From: line. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: wilc1000: fix warning while printing
size_t should print using %zu, but here it was using %d and hence we were getting warning while printing. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- I think it will be easy to remove the other warnings if all the typedefs are removed first. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, #undef NUM_DUMMY_BYTES if (len2 (sizeof(wb) / sizeof(wb[0]))) { - PRINT_ER([wilc spi]: spi buffer size too small (%d) (%d)\n, + PRINT_ER([wilc spi]: spi buffer size too small (%d) (%lu)\n, len2, (sizeof(wb) / sizeof(wb[0]))); result = N_FAIL; return result; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e9ab2cb..6fdb0d6 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -638,7 +638,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, } - PRINT_D(CFG80211_DBG, Association request info elements length = %d\n, pstrConnectInfo-ReqIEsLen); + PRINT_D(CFG80211_DBG, Association request info elements length = %zu\n, pstrConnectInfo-ReqIEsLen); PRINT_D(CFG80211_DBG, Association response info elements length = %d\n, pstrConnectInfo-u16RespIEsLen); @@ -778,7 +778,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r } PRINT_D(CFG80211_DBG, Requested num of scan channel %d\n, request-n_channels); - PRINT_D(CFG80211_DBG, Scan Request IE len = %d\n, request-ie_len); + PRINT_D(CFG80211_DBG, Scan Request IE len = %zu\n, request-ie_len); PRINT_D(CFG80211_DBG, Number of SSIDs %d\n, request-n_ssids); @@ -3316,7 +3316,7 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev, priv = wiphy_priv(wiphy); PRINT_D(HOSTAPD_DBG, Starting ap\n); - PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %d Tail length = %d\n, + PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %zu Tail length = %zu\n, settings-beacon_interval, settings-dtim_period, beacon-head_len, beacon-tail_len); s32Error = WILC_WFI_CfgSetChannel(wiphy, settings-chandef); -- 1.8.1.2 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: fix warning while printing
On Tue, Jun 02, 2015 at 10:29:17AM +0200, Konrad Zapalowicz wrote: On 06/02, Sudip Mukherjee wrote: size_t should print using %zu, but here it was using %d and hence we were getting warning while printing. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- I think it will be easy to remove the other warnings if all the typedefs are removed first. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, #undef NUM_DUMMY_BYTES if (len2 (sizeof(wb) / sizeof(wb[0]))) { - PRINT_ER([wilc spi]: spi buffer size too small (%d) (%d)\n, + PRINT_ER([wilc spi]: spi buffer size too small (%d) (%lu)\n, Hi, it seems that the above line should use %zu too. Am I correct or I'm missing something? oops. my mistake. %lu is correct but i missed mentioning the warning about long unsigned int in the commit message. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] staging: wilc1000: fix warning while printing
size_t should print using %zu and unsigned long int should use %lu but here it was using %d and hence we were getting warning while printing. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- v2: missed mentioning unsigned long int in commit message. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, #undef NUM_DUMMY_BYTES if (len2 (sizeof(wb) / sizeof(wb[0]))) { - PRINT_ER([wilc spi]: spi buffer size too small (%d) (%d)\n, + PRINT_ER([wilc spi]: spi buffer size too small (%d) (%lu)\n, len2, (sizeof(wb) / sizeof(wb[0]))); result = N_FAIL; return result; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e9ab2cb..6fdb0d6 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -638,7 +638,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent, } - PRINT_D(CFG80211_DBG, Association request info elements length = %d\n, pstrConnectInfo-ReqIEsLen); + PRINT_D(CFG80211_DBG, Association request info elements length = %zu\n, pstrConnectInfo-ReqIEsLen); PRINT_D(CFG80211_DBG, Association response info elements length = %d\n, pstrConnectInfo-u16RespIEsLen); @@ -778,7 +778,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r } PRINT_D(CFG80211_DBG, Requested num of scan channel %d\n, request-n_channels); - PRINT_D(CFG80211_DBG, Scan Request IE len = %d\n, request-ie_len); + PRINT_D(CFG80211_DBG, Scan Request IE len = %zu\n, request-ie_len); PRINT_D(CFG80211_DBG, Number of SSIDs %d\n, request-n_ssids); @@ -3316,7 +3316,7 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev, priv = wiphy_priv(wiphy); PRINT_D(HOSTAPD_DBG, Starting ap\n); - PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %d Tail length = %d\n, + PRINT_D(HOSTAPD_DBG, Interval = %d \n DTIM period = %d\n Head length = %zu Tail length = %zu\n, settings-beacon_interval, settings-dtim_period, beacon-head_len, beacon-tail_len); s32Error = WILC_WFI_CfgSetChannel(wiphy, settings-chandef); -- 1.8.1.2 -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: wilc1000: fix warning while printing
On Tue, Jun 02, 2015 at 10:58:40AM +0200, Konrad Zapalowicz wrote: On 06/02, Sudip Mukherjee wrote: On Tue, Jun 02, 2015 at 10:29:17AM +0200, Konrad Zapalowicz wrote: On 06/02, Sudip Mukherjee wrote: size_t should print using %zu, but here it was using %d and hence we were getting warning while printing. Signed-off-by: Sudip Mukherjee su...@vectorindia.org --- I think it will be easy to remove the other warnings if all the typedefs are removed first. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz, #undef NUM_DUMMY_BYTES if (len2 (sizeof(wb) / sizeof(wb[0]))) { - PRINT_ER([wilc spi]: spi buffer size too small (%d) (%d)\n, + PRINT_ER([wilc spi]: spi buffer size too small (%d) (%lu)\n, Hi, it seems that the above line should use %zu too. Am I correct or I'm missing something? oops. my mistake. %lu is correct but i missed mentioning the warning about long unsigned int in the commit message. Why %lu here and %zu in other places? I mean that it is the same size_t or I'm missing something? no, this is unsigned long int. The warning here was: drivers/staging/wilc1000/wilc_spi.c:407:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat] so size_t used %zu and unsigned long int should use %lu regards sudip - konrad regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: r8712u: Fix kernel warning for improper call of del_timer_sync()
On Mon, May 25, 2015 at 10:07:59PM -0700, Joe Perches wrote: On Tue, 2015-05-26 at 10:32 +0530, Sudip Mukherjee wrote: On Mon, May 25, 2015 at 09:55:08PM -0700, Joe Perches wrote: On Tue, 2015-05-26 at 10:16 +0530, Sudip Mukherjee wrote: On Mon, May 25, 2015 at 10:37:28AM -0700, Joe Perches wrote: But for eudyptula, patches have to properly submitted to lkml and maintainers. And today I am here just because of eudyptula. My patches and contributions here, everything started with it. :) As far as I understand, the Eudyptula Challenge list has internal mechanisms to nominally review patches before some patch is submitted to lkml. well, yes, sort of. Submitting patch is task 10, and all the previous tasks will train people on creating patch, sending etc. The main point is that patches shouldn't be applied without being submitted to a more widely read list. yes, and Eudyptula requires the participant to send patch to maintainer, lkml and relevant mailing list where outreachy specifies not to send to lkml. Next outreachy will start from September. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: r8712u: Fix kernel warning for improper call of del_timer_sync()
On Mon, May 25, 2015 at 09:55:08PM -0700, Joe Perches wrote: On Tue, 2015-05-26 at 10:16 +0530, Sudip Mukherjee wrote: On Mon, May 25, 2015 at 10:37:28AM -0700, Joe Perches wrote: It'd be better if the approved patches from the intern list (no idea what that is) were sent to lkml/devel@driverdev lists for review before actually being applied. Its the outreachy program. And http://kernelnewbies.org/OutreachyApply mentions specifically: email your first patch to the outreachy-kernel mailing list. Do not send patches to the tmain Linux mailing lists The same thing happens with the eudyptula patches. But for eudyptula, patches have to properly submitted to lkml and maintainers. And today I am here just because of eudyptula. My patches and contributions here, everything started with it. :) regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: r8712u: Fix kernel warning for improper call of del_timer_sync()
On Mon, May 25, 2015 at 10:37:28AM -0700, Joe Perches wrote: It'd be better if the approved patches from the intern list (no idea what that is) were sent to lkml/devel@driverdev lists for review before actually being applied. Its the outreachy program. And http://kernelnewbies.org/OutreachyApply mentions specifically: email your first patch to the outreachy-kernel mailing list. Do not send patches to the main Linux mailing lists regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging: r8712u: Fix kernel warning for improper call of del_timer_sync()
I haven't been using kernel v4.1 so I haven't seen this warning, but looking at the code it seems to originate from the two recent patches to remove _cancel_timer and _cancel_timer_ex. I see that there's another patch in lkml [1] that changes del_timer_sync back to del_timer in more places. Perhaps it could prevent other warnings like this in the future. _cancel_timer and _cancel_timer_ex both were internally using del_timer, and the issue was reported in bugzilla. I have given the reference of the bugzilla in my patch in lkml. I have changed the reference of del_timer_sync to del_timer in all places which were in interrupt context, in some places it was not removed as those were not in interrupt context. regards sudip -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Staging:rtl8723au: open/closed brace issue
On Sat, Oct 25, 2014 at 01:05:13AM +0100, Paul McQuade wrote: ERROR: that open brace { should be on the previous line Signed-off-by: Paul McQuade paulmcq...@gmail.com --- drivers/staging/rtl8723au/core/rtw_ap.c | 130 ++-- 1 file changed, 40 insertions(+), 90 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index 6b4092f..6b69bfe 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -231,12 +231,10 @@ voidexpire_timeout_chk23a(struct rtw_adapter *padapter) psta-expire_to--; } - if (psta-expire_to = 0) - { + if (psta-expire_to = 0) { struct mlme_ext_priv *pmlmeext = padapter-mlmeextpriv; - if (padapter-registrypriv.wifi_spec == 1) - { + if (padapter-registrypriv.wifi_spec == 1) { psta-expire_to = pstapriv-expire_to; continue; } @@ -308,15 +306,13 @@ voidexpire_timeout_chk23a(struct rtw_adapter *padapter) ret = issue_nulldata23a(padapter, psta-hwaddr, 0, 3, 50); psta-keep_alive_trycnt++; - if (ret == _SUCCESS) - { + if (ret == _SUCCESS) { DBG_8723A(asoc check, sta( MAC_FMT ) is alive\n, MAC_ARG(psta-hwaddr)); psta-expire_to = pstapriv-expire_to; psta-keep_alive_trycnt = 0; continue; - } - else if (psta-keep_alive_trycnt = 3) - { + + } else if (psta-keep_alive_trycnt = 3) { DBG_8723A(ack check for asoc expire, keep_alive_trycnt =%d\n, psta-keep_alive_trycnt); psta-expire_to = 1; continue; @@ -363,8 +359,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l return; /* b/g mode ra_bitmap */ - for (i = 0; i sizeof(psta-bssrateset); i++) - { + for (i = 0; i sizeof(psta-bssrateset); i++) { if (psta-bssrateset[i]) tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value23a(psta-bssrateset[i]0x7f); } @@ -406,8 +401,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l raid = networktype_to_raid23a(sta_band); init_rate = get_highest_rate_idx23a(tx_ra_bitmap0x0fff)0x3f; - if (psta-aid NUM_STA) - { + if (psta-aid NUM_STA) { u8 arg = 0; arg = psta-mac_id0x1f; @@ -436,9 +430,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l psta-raid = raid; psta-init_rate = init_rate; - } - else - { + } else { DBG_8723A(station aid %d exceed the max number\n, psta-aid); } } @@ -474,8 +466,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter) psta-bssratelen = supportRateNum; /* b/g mode ra_bitmap */ - for (i = 0; i supportRateNum; i++) - { + for (i = 0; i supportRateNum; i++) { if (psta-bssrateset[i]) tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value23a(psta-bssrateset[i]0x7f); } @@ -522,9 +513,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter) psta-state = _FW_LINKED; spin_unlock_bh(psta-lock); - } - else - { + } else { DBG_8723A(add_RATid23a_bmc_sta error!\n); } } @@ -561,8 +550,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info /* ERP */ VCS_update23a(padapter, psta); /* HT related cap */ - if (phtpriv_sta-ht_option) - { + if (phtpriv_sta-ht_option) { /* check if sta supports rx ampdu */ phtpriv_sta-ampdu_enable = phtpriv_ap-ampdu_enable; @@ -580,9 +568,7 @@ void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info psta-qos_option = true; - } - else - { + } else { phtpriv_sta-ampdu_enable = false; phtpriv_sta-sgi = false; @@ -1261,8 +1247,7 @@ void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx) spin_lock_bh(pmlmepriv-bcn_update_lock); - switch (ie_id) - { + switch (ie_id) { case 0xFF: /* 8: TimeStamp, 2: Beacon Interval 2:Capability */ update_bcn_fixed_ie(padapter); @@ -1416,110 +1401,85 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter,