[PATCH 1/1] af_packet: Raw socket destruction warning fix

2016-02-10 Thread Maninder Singh
arang <v.nar...@samsung.com> Signed-off-by: Amit Nagal <amit.na...@samsung.com> Signed-off-by: Maninder Singh <maninder...@samsung.com> --- net/packet/af_packet.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c

Re: [PATCH] af_packet: Raw socket destruction warning fix

2016-01-21 Thread Maninder Singh
Hi Daniel, >The other sock_put() in packet_release() to drop the final ref and call into >sk_free(), which drops the 1 ref on the sk_wmem_alloc from init time. Since you >got into __sk_free() via sock_wfree() destructor, your socket must have invoked >packet_release() prior to this (perhaps

Re: [PATCH 1/1] ath10k: fixing wrong initialization of struct channel

2015-07-21 Thread Maninder Singh
chandef is initialized with NULL and on the very next line, we are using it to get channel, which is not correct. channel should be initialized after obtaining chandef. Signed-off-by: Maninder Singh maninder...@samsung.com How did you find this bug? Static anlysis reports this bug like

[PATCH 1/1] ath10k: fixing wrong initialization of struct channel

2015-07-15 Thread Maninder Singh
chandef is initialized with NULL and on the very next line, we are using it to get channel, which is not correct. channel should be initialized after obtaining chandef. Signed-off-by: Maninder Singh maninder...@samsung.com --- drivers/net/wireless/ath/ath10k/mac.c |2 +- 1 file changed, 1

Re: [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0])

2015-06-30 Thread Maninder Singh
Hi Joe, Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0]) I think all of these #defines should be removed instead as they are all used only once. If we replcase only ARRAY_SIZE then cood will look alike to drivers/net/ethernet/intel/e1000e/phy.c And if we have to remove these #defines , then

[PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0])

2015-06-29 Thread Maninder Singh
Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0]) Signed-off-by: Maninder Singh maninder...@samsung.com Reviewed-by: Yogesh Narayan Gaur yn.g...@samsung.com --- drivers/net/ethernet/intel/igb/e1000_phy.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net

Re: [PATCH 1/1] ppp: remove NULL check before kfree

2015-06-24 Thread Maninder Singh
No need of explicit NULL check before kfree, removing the same and little coding style changes. Signed-off-by: Maninder Singh maninder...@samsung.com Reviewed-by: Vaneet narang v.nar...@samsung.com --- drivers/net/ppp/ppp_mppe.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[PATCH 1/1] ppp: remove NULL check before kfree

2015-06-24 Thread Maninder Singh
No need of explicit NULL check before kfree, removing the same and little coding style changes. Signed-off-by: Maninder Singh maninder...@samsung.com Reviewed-by: Vaneet narang v.nar...@samsung.com --- drivers/net/ppp/ppp_mppe.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[RFC][PATCH v2] ppp: remove NULL check before kfree

2015-06-24 Thread Maninder Singh
Removes NULL check before kfree and using tabs in place of space. and removing checkpatch warning: labels should not be indented. Signed-off-by: Maninder Singh maninder...@samsung.com Reviewed-by: Vaneet narang v.nar...@samsung.com --- drivers/net/ppp/ppp_mppe.c | 24

[RFC PATCH v2] packet: remove handling of tx_ring

2015-06-22 Thread Maninder Singh
. Signed-off-by: Maninder Singh maninder...@samsung.com Suggested-by: Frans Klaver franskla...@gmail.com --- v1: replace if()/BUG with BUG_ON() for tx_ring v2: remove BUG() by removing tx_ring handling net/packet/af_packet.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff

Re: [RFC PATCH v2] packet: remove handling of tx_ring

2015-06-22 Thread Maninder Singh
ok, Then i will share updated patch:- v1 = replace if()/BUG with BUG_ON() for tx_ring. Signed-off-by: Maninder Singh maninder...@samsung.com Signed-off-by: Frans Klaver franskla...@gmail.com --- Changes in v2: Remove handling of tx_ring in prb_setup_retire_blk_timer for TPACKET_V3 because

Re: [PATCH 1/1] ssb: remove unncessary out label

2015-06-21 Thread Maninder Singh
Hi Michael, pdev = bus-host_pci; mutex_init(bus-sprom_mutex); -err = device_create_file(pdev-dev, dev_attr_ssb_sprom); -if (err) -goto out; - -out: -return err; +return device_create_file(pdev-dev, dev_attr_ssb_sprom); } I don't really think this

[RFC PATCH v2] packet: remove handling of tx_ring

2015-06-21 Thread Maninder Singh
of tx_ring. Thus removing tx_ring from init_prb_bdqc. Signed-off-by: Maninder Singh maninder...@samsung.com Suggested-by: Frans Klaver franskla...@gmail.com --- net/packet/af_packet.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/net/packet/af_packet.c b/net

[PATCH 1/1] ssb: remove unncessary out label

2015-06-19 Thread Maninder Singh
This patch removes unnecessary label out and some restructring for using device_create_file directly. Signed-off-by: Maninder Singh maninder...@samsung.com Reviewed-by: Rohit Thapliyal r.thapli...@samsung.com --- drivers/ssb/pci.c |8 +--- 1 files changed, 1 insertions(+), 7 deletions

[PATCH 1/1] ixgbe: use kzalloc for allocating one thing

2015-06-18 Thread Maninder Singh
)...) Signed-off-by: Maninder Singh maninder...@samsung.com Reviewed-by: Vaneet Narang v.nar...@samsung.com --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel

[RESUBMIT Patch 1/1] net: replace if()/BUG with BUG_ON

2015-06-16 Thread Maninder Singh
Use BUG_ON(condition) instead of if(condition)/BUG() . Signed-off-by: Maninder Singh maninder...@samsung.com Reviewed-by: Akhilesh Kumar akhiles...@samsung.com --- net/packet/af_packet.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net/packet/af_packet.c b/net

Re: Re: [PATCH 1/1] net: replace if()/BUG with BUG_ON()

2015-06-16 Thread Maninder Singh
Hi David, Use BUG_ON(condition) instead of if(condition)/BUG() Signed-off-by: Maninder Singh maninder...@samsung.com Reviewed-by: Akhilesh Kumar akhiles...@samsung.com Your email client corrupted this patch, making it unusable I resent the patch with git send-mail , it results ok

[PATCH 1/1] net: replace if()/BUG with BUG_ON()

2015-06-14 Thread Maninder Singh
Use BUG_ON(condition) instead of if(condition)/BUG() Signed-off-by: Maninder Singh maninder...@samsung.com Reviewed-by: Akhilesh Kumar akhiles...@samsung.com --- net/packet/af_packet.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet