[PATCH v2] infiniband: free only allocated items

2015-07-07 Thread Maninder Singh
o If allocation of dm fails, no need to free it. o Free only allocated items. Signed-off-by: Maninder Singh --- drivers/infiniband/hw/mlx4/main.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4

[PATCH 1/1] block: use FIELD_SIZEOF to calculate size of a field

2015-07-07 Thread Maninder Singh
use FIELD_SIZEOF instead of open coding Signed-off-by: Maninder Singh --- block/blk-core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 688ae94..5a9792e 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -3298,7 +3298,7

[PATCH v3] arm64: Modify the dump mem for 64 bit addresses

2015-07-06 Thread Maninder Singh
lot more easier. Signed-off-by: Rohit Thapliyal Signed-off-by: Maninder Singh --- v1: added new function dump_mem64 v2: Removed the separate function dump_mem64 and accommodated a field width based on which the dump shall be created of width either 4 or 8 as suggested by Catalin

[RESEND][PATCH v2] arm64:Modify the dump mem for 64 bit addresses

2015-07-06 Thread Maninder Singh
4bc 007fcc474430 007facc555f4 8000 [ 93.70] 7fe0: 2b424090 0069 0950020128000244 41040804 [ 93.741084] Call trace: The above output makes a debugger life a lot more easier. Signed-off-by: Rohit Thapliyal Signed-off-by: Maninder Singh Reviewed

[PATCH 1/1] arm64: use pr_warn instead of pr_warning

2015-07-05 Thread Maninder Singh
Use more commonly used pr_warn, and also code looks similar to arm/hw_breakpoint.c code after this change. Signed-off-by: Maninder Singh --- arch/arm64/kernel/hw_breakpoint.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/hw_breakpoint.c b

[PATCH 1/1] SCSI: bnx2i: remove redundant check

2015-07-03 Thread Maninder Singh
his check hba is dereferenced without validation. Signed-off-by: Maninder Singh --- drivers/scsi/bnx2i/bnx2i_iscsi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index 7289437..cbec2ea 100644 --- a/driv

[PATCH 1/1] drivers: hv: hv_utils_transport: Fixing validation of correct pointer

2015-07-02 Thread Maninder Singh
cn_msg should be validated instead of msg after memory allocation. Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- drivers/hv/hv_utils_transport.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv

Re: [PATCH v2] regulator: wm831x-dcdc: Use pointer after NULL check

2015-07-02 Thread Maninder Singh
r to use !pointer than (pointer == NULL) >> >> Signed-off-by: Maninder Singh >> --- >The patch basically looks fine, but it feels a bit like needless >churn. The current code is perfectly correct and feels clear >enough to me. Reason for patch is we are checking a poi

[PATCH v2] regulator: wm831x-dcdc: Use pointer after NULL check

2015-07-02 Thread Maninder Singh
pdata is used before NULL check, so it looks misleading. If pdata validation is required then we have to first check for pdata validation, then calculate id, and then second check for pdata->dcdc[id]. and it is better to use !pointer than (pointer == NULL) Signed-off-by: Maninder Singh ---

[PATCH 1/1] regulator: wm831x-dcdc: Use pointer after NULL check

2015-07-02 Thread Maninder Singh
pdata is used before NULL check, so it looks misleading. If pdata validation is required then we have to first check for pdata validation, then calculate id, and then second check for pdata->dcdc[id]. and it is better to use !pointer then to use (pointer == NULL) Signed-off-by: Maninder Si

[PATCH v2] mfd : t7l66xb: remove unnecessary pdata check

2015-07-01 Thread Maninder Singh
o Making pdata NULL check to (!pdata) as coding standard and all other checks in file. o Removing redundant check of pdata, because we already check for pdata, and also derefernced before this check. Signed-off-by: Maninder Singh --- v2: changing subject line. drivers/mfd

Re: [PATCH 1/1] mfd: remove unnecessary check

2015-07-01 Thread Maninder Singh
Hello, >>> >> > >>> >> > Signed-off-by: Maninder Singh >>> >> > Reviewed-by: Vaneet Narang >>> >> > --- >>> >> > drivers/mfd/t7l66xb.c |4 ++-- >>> >> > 1 file changed, 2 insertio

[PATCH 1/1] mfd: remove unnecessary check

2015-06-30 Thread Maninder Singh
o Making pdata NULL check to (!pdata) as coding statndard and all other checks in file. o Removing redundant check of pdata, because we already check for pdata, and also derefernced before this check Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/mfd

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 , th

[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 Reviewed-by: Yogesh Narayan Gaur --- drivers/net/ethernet/intel/igb/e1000_phy.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net

[PATCH 1/1] cxl/vphb.c: Use phb pointer after NULL check

2015-06-29 Thread Maninder Singh
static Anlaysis detected below error:- (error) Possible null pointer dereference: phb So, Use phb after NULL check. Signed-off-by: Maninder Singh --- drivers/misc/cxl/vphb.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl

[PATCH v2] ACPI/resource.c: Fix memory leak reg

2015-06-29 Thread Maninder Singh
static analysis gives memory leak error for reg:- [drivers/acpi/resource.c:663]: (error) Memory leak: reg free allocated memory for reg in case of error from request_range Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- v1: allocate memory after request_range error checking v2

[PATCH 1/1] ACPI/resource.c: Fixing memory leak for reg

2015-06-28 Thread Maninder Singh
static analysis gives memory leak error for reg:- [drivers/acpi/resource.c:663]: (error) Memory leak: reg Thus to prevent this allocate memory for reg after request_range error checking. Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- drivers/acpi/resource.c |8 1

[RFC][PATCH 1/1] drm/amdkfd: Remove redundant pdd validation

2015-06-28 Thread Maninder Singh
pdd is already dereferenced before this check. So it is redundtant to validate pdd here. Signed-off-by: Maninder Singh --- drivers/gpu/drm/amd/amdkfd/kfd_process.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu

[PATCH v2] drm/amdgpu: use kzalloc for allocating one thing

2015-06-26 Thread Maninder Singh
Use kzalloc rather than kcalloc(1.. for allocating one thing. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang Reviewed-by: Christian Konig --- v2: Chnged shortlog prefix - gpu/amdgpu drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2] drm/amdgpu: remove unnecessary check before kfree

2015-06-26 Thread Maninder Singh
kfree(NULL) is safe and this check is probably not required Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang Reviewed-by: Christian Konig --- v2: Chnged shortlog prefix - gpu/amdgpu drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH 1/1] infiniband: Remove redundant NULL check before kfree

2015-06-26 Thread Maninder Singh
kfree(NULL) is safe and this check is probably not required Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- drivers/infiniband/hw/mlx4/main.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw

Re: [PATCH 1/1] gpu/drm: remove unnecessary check before kfree

2015-06-25 Thread Maninder Singh
Hi, >The shortlog prefix of both your patches should be "drm/amdgpu:" instead >of "gpu/drm:". With that fixed, both are Do i need to send V2 of patch with that change or you have fixed that? >Reviewed-by: Michel Dänzer Thanks. ..

[PATCH 1/1] gpu/drm: remove unnecessary check before kfree

2015-06-25 Thread Maninder Singh
kfree(NULL) is safe and this check is probably not required Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu

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

2015-06-25 Thread Maninder Singh
Use kzalloc rather than kcalloc(1.. for allocating one thing. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm

[PATCH 1/1] scripts/spelling.txt: Adding misspelled word for check.

2015-06-25 Thread Maninder Singh
/6/25/289 ./arch/x86/mm/pageattr.c:1368: * No need to cehck in that case Signed-off-by: Maninder Singh --- scripts/spelling.txt |3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/spelling.txt b/scripts/spelling.txt index bb8e4d0..958d054 100644 --- a/scripts/spelling.txt +++ b

Re: [PATCH 1/1] staging/comedi: remove unnecessary check around pci_dev_put

2015-06-25 Thread Maninder Singh
Hi, >This patch is correct but the motivation is wrong. > >The check in pci_dev_put() is like a sanity check. There are many >functions which have a sanity check and many which do not, it is >impossible for a human to remember the complete list of each. When we >remove explicit checks for NULL a

[PATCH v2] staging/comedi: remove unnecessary check around pci_dev_put

2015-06-25 Thread Maninder Singh
pci_dev_put checks for NULL pointer itself, reported by coccinelle Signed-off-by: Maninder Singh Reviewed-by: Yogesh Gaur --- v2: changelog typo cehcks -> checks drivers/staging/comedi/drivers/adl_pci9118.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driv

Re: [PATCH 1/1] staging/comedi: remove unnecessary check around pci_dev_put

2015-06-25 Thread Maninder Singh
>> pci_dev_put cehcks for NULL pointer itself, >did you mean checks? Yes did some typo, send v2 of the patch. Thanks --

[PATCH 1/1] staging/comedi: remove unnecessary check around pci_dev_put

2015-06-25 Thread Maninder Singh
pci_dev_put cehcks for NULL pointer itself, reported by coccinelle Signed-off-by: Maninder Singh Reviewed-by: Yogesh Gaur --- drivers/staging/comedi/drivers/adl_pci9118.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b

[PATCH 1/1] char/agp: remove checks around pci_dev_put

2015-06-25 Thread Maninder Singh
No need of explicit check around pci_dev_put, It handles with NULL pointer itself. Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- drivers/char/agp/intel-gtt.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char

[PATCH 1/1] usb/airspy: removing unneeded goto

2015-06-25 Thread Maninder Singh
This patch removes unneded goto, reported by coccinelle. Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- drivers/media/usb/airspy/airspy.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/usb/airspy/airspy.c b/drivers/media/usb/airspy/airspy.c index 4069234

[PATCH 1/1] scsi: remove check around pci_dev_put

2015-06-25 Thread Maninder Singh
pci_dev_put checks for NULL Pointer itself. Signed-off-by: Maninder Singh --- drivers/scsi/eata_pio.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index ca8003f..481ecac 100644 --- a/drivers/scsi/eata_pio.c +++ b

[PATCH 1/1] scsi/snic: fixing the error print

2015-06-25 Thread Maninder Singh
Currently SNIC_HOST_ERR is called in both cases whether snic_disc_start returns zero or non-zero. >From the code it looks like it has to print only if snic_disc_start return non-zero value, So calling SNIC_HOST_ERR only for non-zero return from snic_disc_start. Signed-off-by: Maninder Si

[RESUBMIT PATCH 1/1] arm/hw_breakpoint.c: remove unnecessary header

2015-06-24 Thread Maninder Singh
Header is not needed for arm/hw_breakpoint.c, Removing the same. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- arch/arm/kernel/hw_breakpoint.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel

[PATCH 1/1] block: remove check around kfree

2015-06-24 Thread Maninder Singh
kfree Checks for NULL poitner itself, so no need of explicit NULL check Signed-off-by: Maninder Singh Reviewed-by: Rohit Thapliyal --- drivers/block/skd_main.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index

[RFC][PATCH 1/1] staging:vt6655: Remove checks around dev_kfree_skb

2015-06-23 Thread Maninder Singh
dev_kfree_skb checks for NULL pointer itself. Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- drivers/staging/vt6655/device_main.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655

[PATCH 1/1] dlm: Remove NULL check before kfree

2015-06-23 Thread Maninder Singh
No need of NULL check before kfree, removing the same. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- fs/dlm/lockspace.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index f3e7278..41c53b3 100644 --- a/fs/dlm

[PATCH 1/1] Btrfs: Remove redundant NULL check before kfree

2015-06-22 Thread Maninder Singh
There is no need of NULL check before kfree, removing the same Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- fs/btrfs/free-space-cache.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index

[PATCH 1/1] scsi: remove redundant NULL check before kfree

2015-06-22 Thread Maninder Singh
There is no need of NULL check before kfree, So removing the same. Signed-off-by: Maninder Singh Reviewed-by: Rohit Thapliyal --- drivers/scsi/aic94xx/aic94xx_init.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi

[Resend PATCH 1/1] kernel/gcov/fs.c: Use kzalloc for allocating one thing

2015-06-22 Thread Maninder Singh
Use kzalloc rather than kcalloc(1.. for allocation of one thing. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- kernel/gcov/fs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/gcov/fs.c b/kernel/gcov/fs.c index edf67c4..b31701a 100644 --- a/kernel

Re: [PATCH 1/1] irq-gic: use BUG_ON instead of if()/BUG

2015-06-22 Thread Maninder Singh
Hi Thomas, Thanks For your suggestions. > >Further, while we are at that. It would be even more useful to analyze > >whether the BUG_ON() is needed in the first place or at least could be > >made conditional on some debug option. > > > >But that's not done by the script either, right? >> >> Yes

[RFC PATCH v2] packet: remove handling of tx_ring

2015-06-22 Thread Maninder Singh
. Signed-off-by: Maninder Singh Suggested-by: Frans Klaver --- 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 --git a/net/packet/af_packet.c b/net/packet

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

2015-06-21 Thread Maninder Singh
age of tx_ring. > >s,funciton,function, Thanks for feedback , please check below changelog if it looks ok, Then i will share updated patch:- v1 = replace if()/BUG with BUG_ON() for tx_ring. Signed-off-by: Maninder Singh Signed-off-by: Frans Klaver --- Changes in v2: Remove handling o

[RFC PATCH v2] packet: remove handling of tx_ring

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

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); >> }

Re: [PATCH 1/1] irq-gic: use BUG_ON instead of if()/BUG

2015-06-19 Thread Maninder Singh
Hi Thomas, >> { >> -if (gic_nr >= MAX_GIC_NR) >> -BUG(); >> +BUG_ON(gic_nr >= MAX_GIC_NR); >> if (irq_set_handler_data(irq, &gic_data[gic_nr]) != 0) >> BUG(); > >So this patch was clearly done just by running a script and not sanity >checked afterwards. Other

[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 Reviewed-by: Rohit Thapliyal --- drivers/ssb/pci.c |8 +--- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/drivers/ssb/pci.c

[PATCH 1/1] irq-gic: use BUG_ON instead of if()/BUG

2015-06-19 Thread Maninder Singh
Use BUG_ON(condition) instead of if(condition)/BUG() As given in scripts/coccinelle/misc/bugon.cocci Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/irqchip/irq-gic.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/irqchip

[PATCH v2] arm64:Modify the dump mem for 64 bit addresses

2015-06-18 Thread Maninder Singh
4bc 007fcc474430 007facc555f4 8000 [ 93.70] 7fe0: 2b424090 0069 0950020128000244 41040804 [ 93.741084] Call trace: The above output makes a debugger life a lot more easier. Signed-off-by: Rohit Thapliyal Signed-off-by: Maninder Singh Reviewed

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

2015-06-18 Thread Maninder Singh
-by: Maninder Singh Reviewed-by: Vaneet Narang --- 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/ixgbe/ixgbe_main.c index 3bf2f3c..3f58757 100644

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

2015-06-18 Thread Maninder Singh
Use kzalloc for allocating one thing rather than kcalloc(1... The semantic patch that makes this change is as follows: // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/gpu/drm/radeon/radeon_ttm.c |2 +- 1 files

[RFC][PATCH] arm64:Modify the dump mem for 64 bit addresses

2015-06-17 Thread Maninder Singh
007facc555f4 8000 7fe0: 2b424090 0069 0950020128000244 41040804 Call trace: The above output makes a debugger life a lot more easier. Signed-off-by: Rohit Thapliyal Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- arch/arm64/kernel/traps.c

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

2015-06-17 Thread Maninder Singh
Use kzalloc rather than kcalloc(1,...) for allocating one thing Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/scsi/mvsas/mv_init.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index

[PATCH 1/1] scsi: Initialize sdp after NULL check of cmnd

2015-06-17 Thread Maninder Singh
Currently cmnd pointer is already dereferenced before NULL check and thus getting below warning in static analysis: warn: variable dereferenced before check 'cmnd' So initialize struct scsi_device *sdp after NULL check of cmnd Signed-off-by: Maninder Singh Reviewed-by: Akhi

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 >> Reviewed-by: Akhilesh Kumar >Your email client corrupted this patch, making it unusable I resent the patch with git send-mail , it results ok, hopefully it does not corrupt it. Thanks

[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 Reviewed-by: Akhilesh Kumar --- net/packet/af_packet.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index b5989c6..c91d405 100644

[PATCH 1/1] kernel/gcov/fs.c : replace kcalloc(1... with kzalloc

2015-06-15 Thread Maninder Singh
Use kzalloc rather than kcalloc(1,...) for allocating one thing. The semantic patch that makes this change is as follows: // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- kernel/gcov/fs.c |2 +- 1 files changed, 1

[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 Reviewed-by: Akhilesh Kumar --- net/packet/af_packet.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index b5989c6..c91d405 100644

[PATCH 1/1] arm64/hw_breakpoint.c: remove unnecessary header

2015-06-14 Thread Maninder Singh
Header is not needed for arm64, removing the same. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- arch/arm64/kernel/hw_breakpoint.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c

[PATCH 1/1] arm/hw_breakpoint.c: remove unnecessary header

2015-06-14 Thread Maninder Singh
Header is not needed for arm, removing the same. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- arch/arm/kernel/hw_breakpoint.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index

Re: [PATCH v2] arm:arm64/hw_breakpoint.c: Remove unnecessary header

2015-06-14 Thread Maninder Singh
>On Thu, Jun 11, 2015 at 04:29:43PM +0100, Will Deacon wrote: >> On Thu, Jun 11, 2015 at 11:39:58AM +0100, Maninder Singh wrote: >> > Header is not needed in hw_breakpoint.c >> > for arm as well as arm64. >> > Removing the same. >> > >> > S

[PATCH v2] arm:arm64/hw_breakpoint.c: Remove unnecessary header

2015-06-11 Thread Maninder Singh
Header is not needed in hw_breakpoint.c for arm as well as arm64. Removing the same. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- arch/arm/kernel/hw_breakpoint.c |1 - arch/arm64/kernel/hw_breakpoint.c |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff

[PATCH 1/1] dmaengine: pl330: Initialize pl330 for pl330_prep_dma_memcpy after NULL check of pch

2015-05-25 Thread Maninder Singh
From: Maninder Singh Currently pch pointer is already dereferenced before NULL check and thus we are getting below warning: warn: variable dereferenced before check 'pch' So initialize struct pl330_dmac *pl330 after NULL check of dma_pl330_chan *pch. Signed-off-by: Maninder Singh

[PATCH 1/1] dmaengine: pl330: Initialize pl330 for pl330_prep_dma_memcpy after NULL check of pch

2015-05-24 Thread Maninder Singh
From: Maninder Singh So initialize struct pl330_dmac *pl330 after NULL check of dma_pl330_chan *pch. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/dma/pl330.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma

Re: [EDT][PATCH] kernel/exit.c : Fix missing read_unlock

2015-05-21 Thread Maninder Singh
EP-F6AA0618C49C4AEDA73BFF1B39950BAB Hi Oleg, >> Hi, >> >> From: Maninder Singh >> >> Subject: [PATCH 1/1] kernel/exit.c : Fix missing task_unlock >> >> This patch adds missing read_unlock if do_wait_thread or ptrace_do_wait >> returns non zer

Re: [EDT][PATCH 1/1] dma/pl330.c : Initialize pl330 pointer after NULL check of pch pointer

2015-05-21 Thread Maninder Singh
EP-AA9D1F29B02341529D96C06444D8471D Hi Vinod >On Tue, May 19, 2015 at 05:00:27AM +0000, Maninder Singh wrote: >> EP-AA9D1F29B02341529D96C06444D8471D >Whats this, please sned patch ina proper format, git format-patch is your >friend, use it > This is auto generated no. from

Re: [EDT][PATCH] kernel/exit.c : Fix missing read_unlock

2015-05-21 Thread Maninder Singh
EP-F6AA0618C49C4AEDA73BFF1B39950BAB Hi Ingo, >> >> Hi, >> >> >> >> From: Maninder Singh >> >> >> >> Subject: [PATCH 1/1] kernel/exit.c : Fix missing task_unlock >> >> >> Subject: [PATCH 1/1] kernel/exit.c :

[EDT] [PATCH] devpts/inode.c : Fix Possible dentry NULL dereference

2015-05-21 Thread Maninder Singh
EP-F6AA0618C49C4AEDA73BFF1B39950BAB Hi, Subject: [PATCH 1/1] devpts/inode.c : Fix Possible dentry NULL dereference Issue reported by static tool Analyzer (Prevent). d_find_alias can return NULL to deentry, Thus we need NULL check before calling d_delete(dentry) Signed-off-by: Maninder Singh

Re: [EDT][PATCH] kernel/exit.c : Fix missing read_unlock

2015-05-20 Thread Maninder Singh
EP-F6AA0618C49C4AEDA73BFF1B39950BAB >> Hi, >> >> From: Maninder Singh >> >> Subject: [PATCH 1/1] kernel/exit.c : Fix missing task_unlock >> Subject: [PATCH 1/1] kernel/exit.c : Fix missing read_unlock >> This patch adds missing read_

[EDT][PATCH] kernel/exit.c : Fix missing read_unlock

2015-05-20 Thread Maninder Singh
EP-F6AA0618C49C4AEDA73BFF1B39950BAB Hi, From: Maninder Singh Subject: [PATCH 1/1] kernel/exit.c : Fix missing task_unlock This patch adds missing read_unlock if do_wait_thread or ptrace_do_wait returns non zero. Signed-off-by: Maninder Singh Signed-off-by: Vaneet Narang Reviewd-by

[EDT][PATCh 1/1]mdfld_dsi_pkg_sender.c : Fix Possible NULL Pointer dereference

2015-05-19 Thread Maninder Singh
check of sender Signed-off-by: Maninder Singh Reviewed-By: Vaneet Narang --- drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c b/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c in

[EDT][PATCH 1/1] dma/pl330.c : Initialize pl330 pointer after NULL check of pch pointer

2015-05-18 Thread Maninder Singh
EP-AA9D1F29B02341529D96C06444D8471D Hi, Subject: [PATCH 1/1] dma/pl330.c : Initialize pl330 pointer after NULL check of pch pointer Signed-off-by: Maninder Singh Reviewed-By: Vaneet Narang --- drivers/dma/pl330.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a

[EDT][PATCH 1/1] hw_breakpoint.c :cpu hotplug handling

2015-05-12 Thread Maninder Singh
EP-2DAD0AFA905A4ACB804C4F82A001242F Subject: [PATCH 1/1] hw_breakpoint.c :cpu hotplug handling This patch adds support for CPU hotplug, It re-installl all installed watchpoints and breakpoints back on H/W in case of cpu-hot plug. Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh

[EDT] [PATCH 1/1] Fix: hw watchpoint continually triggers callback

2015-05-12 Thread Maninder Singh
interrupt handling ARM tries to execute the same instruction again , which results in interrupt getting raised again. This patch fixes this issue by using KPROBES (getting the instruction executed and incrementing PC to next instruction). Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh

Re: [EDT][PATCH 1/1] msgsnd use freezable blocking call

2015-05-07 Thread Maninder Singh
EP-F6AA0618C49C4AEDA73BFF1B39950BAB >On Wed, 06 May 2015 11:29:57 + (GMT) Maninder Singh wrote: >> EP-F6AA0618C49C4AEDA73BFF1B39950BAB >> >> Hi , >> >> Recently shared a patch for using freezable_schedule instead of schedule in >> msgrcv, >> and

[EDT][Patch 1/1] socket family check in netlabel APIs

2015-05-06 Thread Maninder Singh
EP-E68D5E24548545C9BBB607A98ADD61E6 Hi Paul, >On Monday, March 30, 2015 11:09:00 AM Maninder Singh wrote: >> Dear All, >> we found One Kernel Crash issue in cipso_v4_sock_delattr :- >> As Cipso supports only inet sockets so cipso_v4_sock_delattr will crash when >> try

[EDT][PATCH 1/1] msgsnd use freezable blocking call

2015-05-06 Thread Maninder Singh
;msq->q_perm); rcu_read_unlock(); - schedule(); + freezable_schedule(); rcu_read_lock(); ipc_lock_object(&msq->q_perm); -- 1.7.1 Thanks and Regards, Maninder Singh

Re: msgrcv: use freezable blocking call

2015-04-01 Thread Maninder Singh
Hi Andrew, Both patches looks fine to us. Thank You > On Wed, Apr 01, 2015 at 05:18:46AM +0000, Maninder Singh wrote: > > Hi Andrew, > > Thanks for making new patch, Actually there is some problem with our mail > > editor. > > It changes tabs with spaces and corrupt

Re: Re: [Fix kernel crash in cipso_v4_sock_delattr ]

2015-04-01 Thread Maninder Singh
r this API "netlbl_sock_delattr" and resolves our issue. Thanks Maninder Singh On 3/30/2015 10:09 PM, Maninder Singh wrote: > We are currently using 3.10.58 kernel and we are facing this issue for samck > enabled system. > and as we can check in other APIs like netlbl_sock_getattr and &g

Re: Re: msgrcv: use freezable blocking call

2015-03-31 Thread Maninder Singh
-off-by: Yogesh Gaur Signed-off-by: Maninder Singh Signed-off-by: Manjeet Pawar Reviewed-by : Ajeet Yadav Cc: Peter Zijlstra Cc: Tejun Heo Signed-off-by: Andrew Morton 2. For restart_syscall: use freezable blocking call Signed-off-by: Yogesh Gaur Signed-off-by: Maninder Singh Signed-off

Re: Re: [Fix kernel crash in cipso_v4_sock_delattr ]

2015-03-30 Thread Maninder Singh
, actually we have run checkpatch.pl before submission(successfull) But when we submit the patch our editor changes tabs into space, we will resubmitt the patch ASAP. Maninder Singh --- Original Message --- Sender : Casey Schaufler Date : Mar 31, 2015 02:25 (GMT+09:00) Title : Re: [Fix

[ARM: code clean up local_irq_disable]

2015-03-30 Thread Maninder Singh
/process.c +++ b/arch/arm/kernel/process.c @@ -195,7 +195,6 @@ void machine_halt(void) local_irq_disable(); smp_send_stop(); - local_irq_disable(); while (1); } -- 1.7.1 Thanks and Regards, Maninder Singh

[Fix kernel crash in cipso_v4_sock_delattr ]

2015-03-30 Thread Maninder Singh
rom [] (security_socket_sendmsg+0x28/0x2c) [0-182.2966] [] (security_socket_sendmsg+0x0/0x2c) from [] (sock_sendmsg+0x68/0xc0) [0-182.3058] [] (sock_sendmsg+0x0/0xc0) from [] (SyS_sendto+0xd8/0x110) Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh Reviewed-by : Ajeet Yadav --- net/netla

restart_syscall: use freezable blocking call

2015-03-30 Thread Maninder Singh
@@ -1789,7 +1789,7 @@ schedule_hrtimeout_range_clock(ktime_t *expires, unsigned long delta, t.task = NULL; if (likely(t.task)) - schedule(); + freezable_schedule(); hrtimer_cancel(&t.timer); destroy_hrtimer_on_stack(&t.timer); -- 1.7.1 Thanks and Regards, Maninder Singh

<    1   2