I am also agree with Arnd Bergmann. We should use 'static inline function'
instead of macro to deal with error check.
On Tuesday 26 July 2016 05:09 PM, Arnd Bergmann wrote:
On Saturday, July 23, 2016 11:35:51 PM CEST Arvind Yadav wrote:
diff --git a/include/linux/err.h b/include/linux/err.h
4bit system as well.
First 32bit of Value of (unsigned int)-4095 and (unsigned long)-4095 will
be equal.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
include/linux/err.h | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/linux/err.h b/in
On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote:
On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote:
On 08/01/2016 02:02 AM, Arnd Bergmann wrote:
diff --git a/include/linux/err.h b/include/linux/err.h
index 1e35588..c2a2789 100644
--- a/include/linux/err.h
+++
As per your concern, I have change commit message. Submit other patch.
Thanks,
Arvind Yadav
On Thursday 07 July 2016 01:40 PM, Arnd Bergmann wrote:
On Thursday, July 7, 2016 12:47:43 AM CEST Arvind Yadav wrote:
Most users of IS_ERR_VALUE() in the kernel are wrong, as they
pass
fixes lots of other
worst abusers.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/net/ethernet/freescale/ucc_geth.c | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/d
-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/net/ethernet/freescale/ucc_geth.c | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index 5
fixes lots of other
worst abusers.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/soc/fsl/qe/ucc_fast.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/qe/ucc_fast.c b/drivers/soc/fsl/qe/ucc_fast.c
index a768931..7cc783c
, as are 8-bit integers
and types that are wider than 'unsigned long'.
-Any user will get compilation warning for that do not pass an
unsigned long' argument.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/soc/fsl/qe/ucc_fast.c | 11 +++
1 file changed, 7 inse
in IS_ERR_VALUE() is wrong. So this is also need a proper
type casting before passing an argument.
I have done the changes and re-submitted anther patch, Please review It.
Thanks,
Arvind
On Thursday 07 July 2016 09:21 PM, Guenter Roeck wrote:
On Thu, Jul 07, 2016 at 08:57:29PM +0530, Arvind Yadav
fixes lots of other
worst abusers.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/net/ethernet/freescale/ucc_geth.c | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/d
_VALUE((unsigned
long)ugeth->rx_bd_ring_offset[j]))
I have done the changes and re-submitted anther patch, Please review It.
Thanks,
Arvind
On Thursday 07 July 2016 10:47 PM, Guenter Roeck wrote:
On Thu, Jul 07, 2016 at 09:30:14PM +0530, Arvind Yadav wrote:
Passing value in IS_
, as are 8-bit integers
and types that are wider than 'unsigned long'.
-Any user will get compilation warning for that do not pass an
unsigned long' argument.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/net/ethernet/freescale/ucc_geth.
h
the most plausible interpretation of what IS_ERR_VALUE() was supposed
to return according to its users, but also causes a compile-time
warning for any users that do not pass an 'unsigned long' argument.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/net/ethernet/
most plausible interpretation of what IS_ERR_VALUE() was supposed
to return according to its users, but also causes a compile-time
warning for any users that do not pass an 'unsigned long' argument.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/soc/fsl/qe/ucc_fas
ets converted into an
unsigned type.
However, anything that passes an 'unsigned short' or 'unsigned int'
argument into IS_ERR_VALUE() is guaranteed to be broken, as are
8-bit integers and types that are wider than 'unsigned long'.
Thanks,
Arvind Yadav
On Friday 08 July 2016 09:03 PM, Guenter Roeck wrote:
O
IS_ERR_VALUE() is guaranteed to be broken, as are
8-bit integers and types that are wider than 'unsigned long'.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/soc/fsl/qe/ucc_fast.c | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --gi
IS_ERR_VALUE() is guaranteed to be broken, as are
8-bit integers and types that are wider than 'unsigned long'.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/soc/fsl/qe/ucc_fast.c | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --gi
As per you concern, I have submitted one more patch with some changes.
Please review it.
Thanks,
On Friday 08 July 2016 09:03 PM, Guenter Roeck wrote:
On Thu, Jul 07, 2016 at 10:31:11PM +0530, Arvind Yadav wrote:
-Return type of 'qe_muram_alloc' is 'unsigned long', That Was trying
On Friday 05 August 2016 02:01 AM, Arnd Bergmann wrote:
On Thursday, August 4, 2016 10:22:43 PM CEST Arvind Yadav wrote:
index df8ea79..ada9070 100644
--- a/include/soc/fsl/qe/ucc_fast.h
+++ b/include/soc/fsl/qe/ucc_fast.h
@@ -165,10 +165,12 @@ struct ucc_fast_private {
int
t).If qe_muram_alloc will return any error,
Then IS_ERR_VALUE will always return 0. it'll not call ucc_fast_free
for any failure. Inside 'if code' will be a dead code on 64bit.
Even qe_muram_addr will return wrong virtual address. Which
can cause an error.
This patch is to avoid this problem on 64bit
rror, Then IS_ERR_VALUE will always
return 0. it'll not call ucc_fast_free for any failure. Inside 'if code'
will be a dead code on 64bit. Even qe_muram_addr will return wrong
virtual address. Which can cause an error.
kfree((void *)ugeth->tx_bd_ring_offset[i]);
which is not 64-bit safe when tx_
On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote:
On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote:
On 08/01/2016 02:02 AM, Arnd Bergmann wrote:
diff --git a/include/linux/err.h b/include/linux/err.h
index 1e35588..c2a2789 100644
--- a/include/linux/err.h
+++
short' or 'unsigned int'argument into
IS_ERR_VALUE() is guaranteed to be broken, as are 8-bit integers
and types that are wider than 'unsigned long'.
Any user will get compilation warning for that do not pass an
unsigned long' argument.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.
On Wednesday 03 August 2016 01:27 AM, Scott Wood wrote:
On 08/02/2016 10:34 AM, arvind Yadav wrote:
On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote:
On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote:
On 08/01/2016 02:02 AM, Arnd Bergmann wrote:
diff --git a/include/linux
oc will
return any error, Then IS_ERR_VALUE will always return 0. it'll not
call ucc_fast_free for any failure. Inside 'if code' will be a dead
code on 64bit.
This patch is to avoid this problem on 64bit machine.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
include/soc/fsl/qe/u
Free memory mapping, if probe is not successful.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/dma/fsldma.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 911b717..7ba8944 100644
--- a/drive
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by work
with const attribute_group. So mark the non-const structs as const.
Arvind Yadav (3):
[PATCH 1/3] PCI: pci-sysfs: constify attribute_group structures.
[PATCH 2/3] PCI: pci
drivers/pci/hotplug/rpadlpar_sysfs.o
File size After adding 'const':
textdata bss dec hex filename
482 96 8 586 232 drivers/pci/hotplug/rpadlpar_sysfs.o
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/pci/hotplug/rpadlpar_sysfs.c | 2
/ibm/ibmveth.o
File size After adding 'const':
textdata bss dec hex filename
156181064 0 16682412a drivers/net/ethernet/ibm/ibmveth.o
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/net/ethernet/ibm/ibmveth.c | 2 +-
1 file chan
/ibmvscsi.o
File size After adding 'const':
textdata bss dec hex filename
181641264 8 194364bec drivers/scsi/ibmvscsi/ibmvscsi.o
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +-
1 file changed, 1 ins
/ibmvfc.o
File size After adding 'const':
textdata bss dec hex filename
421291104 20 43253a8f5 drivers/scsi/ibmvscsi/ibmvfc.o
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +-
1 file changed, 1 insertion
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/crypto/nx/nx.c | 2 +-
1 file changed, 1 ins
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/net/ethernet/ibm/ibmveth.c | 2 +-
1 file c
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +-
1 file chan
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Arvind Yadav (3):
[PATCH 1/3] scsi: ibmvfc: constify vio_device_id
[PATCH 2/3] scsi: ibmvscsi: constify
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/crypto/nx/nx-842-pseries.c | 2 +-
1 file c
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/tty/hvc/hvc_vio.c | 2 +-
1 file chan
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/tty/hvc/hvcs.c | 2 +-
1 file changed, 1 ins
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +-
1 file chan
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
1 file c
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/char/hw_random/pseries-rng.c | 2 +-
/macintosh/rack-meter.o
File size after constify keystone_qmss_of_match.
textdata bss dec hex filename
807 176 0 983 3d7 drivers/macintosh/rack-meter.o
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/macintosh/rack-meter.c | 2 +-
/macintosh/rack-meter.o
File size after constify rackmeter_match.
textdata bss dec hex filename
807 176 0 983 3d7 drivers/macintosh/rack-meter.o
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
Changes in v1:
Subject was wrong. It
devm_kasprintf() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
sound/soc/fsl/fsl-asoc-card.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 2db4d0c..8
devm_kasprintf() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
sound/soc/omap/omap-hdmi-audio.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c
index 3
devm_kasprintf() can fail here and we must check its return value.
Arvind Yadav (3):
[PATCH 1/3] ASoC: davinci-mcasp: Handle return value of devm_kasprintf
[PATCH 2/3] ASoC: fsl-asoc-card: Handle return value of devm_kasprintf
[PATCH 3/3] ASoC: omap-hdmi-audio: Handle return value
devm_kasprintf() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
sound/soc/davinci/davinci-mcasp.c | 12
1 file changed, 12 insertions(+)
diff --git a/sound/soc/davinci/davinci-mcasp.c
b/sound/soc/davinci/d
devm_kasprintf() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
changes in v2:
Set return 'ret' to -ENOMEM.
sound/soc/fsl/fsl-asoc-card.c | 4
1 file changed, 4 insertions(+)
diff --git a/sound/soc/fsl/fs
platform_suspend_ops are not supposed to change at runtime.
Functions suspend_set_ops working with const platform_suspend_ops.
So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
arch/powerpc/sysdev/ppc4xx_cpm.c | 2 +-
1 file changed, 1 ins
clk_div_table are not supposed to change at runtime.
mpc512x_clk_divtable function working with const
clk_div_table. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
arch/powerpc/platforms/512x/clock-commonclk.c | 4 ++--
1 file chan
vio_device_id are not supposed to change at runtime. All functions
working with vio_device_id provided by work with
const vio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/char/tpm/tpm_ibmvtpm.c | 2 +-
1 file chan
if device_register() returned an error! Always use put_device()
to give up the reference initialized.
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/misc/ocxl/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/ocxl/pci.c b/driver
Never directly free @dev after calling device_register(), even
if it returned an error! Always use put_device() to give up the
reference initialized.
Arvind Yadav (2):
[PATCH 1/2] misc: mic: Release reference count and memory for VOP device
[PATCH 2/2] misc: ocxl: use put_device() instead
Never directly free @dev after calling device_register(),
even if it returned an error! Always use put_device() to
give up the reference initialized.
Release allocated memory for vop device in vop_release_dev().
Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
drivers/misc/m
55 matches
Mail list logo