Re: [PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-26 Thread Samuel Ortiz
Hi Arnd,

On Fri, Jan 25, 2013 at 10:44:08PM +, Arnd Bergmann wrote:
> If the twl4030_write_script function gets called with
> a zero length argument, its return value does not
> get set. We know that all scripts have a nonzero
> length, but returning an error in case they ever
> do is probably appropriate.
> 
> Without this patch, building omap2plus_defconfig results in:
> 
> drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
> drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
> this function
> 
> Signed-off-by: Arnd Bergmann 
> Reviewed-by: Peter Ujfalusi 
> Reviewed-by: Amit Kucheria 
> Cc: Samuel Ortiz 
> Cc: Kevin Hilman 
> Cc: "Kristo, Tero" 
> ---
>  drivers/mfd/twl4030-power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to my for-linus branch, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-26 Thread Samuel Ortiz
Hi Arnd,

On Fri, Jan 25, 2013 at 10:44:08PM +, Arnd Bergmann wrote:
 If the twl4030_write_script function gets called with
 a zero length argument, its return value does not
 get set. We know that all scripts have a nonzero
 length, but returning an error in case they ever
 do is probably appropriate.
 
 Without this patch, building omap2plus_defconfig results in:
 
 drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
 drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
 this function
 
 Signed-off-by: Arnd Bergmann a...@arndb.de
 Reviewed-by: Peter Ujfalusi peter.ujfal...@ti.com
 Reviewed-by: Amit Kucheria amit.kuche...@linaro.org
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Kevin Hilman khil...@deeprootsystems.com
 Cc: Kristo, Tero t-kri...@ti.com
 ---
  drivers/mfd/twl4030-power.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to my for-linus branch, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Arnd Bergmann
If the twl4030_write_script function gets called with
a zero length argument, its return value does not
get set. We know that all scripts have a nonzero
length, but returning an error in case they ever
do is probably appropriate.

Without this patch, building omap2plus_defconfig results in:

drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
this function

Signed-off-by: Arnd Bergmann 
Reviewed-by: Peter Ujfalusi 
Reviewed-by: Amit Kucheria 
Cc: Samuel Ortiz 
Cc: Kevin Hilman 
Cc: "Kristo, Tero" 
---
 drivers/mfd/twl4030-power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 4dae241..dd362c1 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -159,7 +159,7 @@ out:
 static int twl4030_write_script(u8 address, struct twl4030_ins *script,
   int len)
 {
-   int err;
+   int err = -EINVAL;
 
for (; len; len--, address++, script++) {
if (len == 1) {
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Amit Kucheria
On Fri, Jan 25, 2013 at 2:14 PM, Arnd Bergmann  wrote:
> If the twl4030_write_script function gets called with
> a zero length argument, its return value does not
> get set. We know that all scripts have a nonzero
> length, but returning an error in case they ever
> do is probably appropriate.
>
> Without this patch, building omap2plus_defconfig results in:
>
> drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
> drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
> this function

Reviewed-by: Amit Kucheria 

> Signed-off-by: Arnd Bergmann 
> Cc: Samuel Ortiz 
> Cc: Peter Ujfalusi 
> Cc: Kevin Hilman 
> Cc: Amit Kucheria 
> ---
>  drivers/mfd/twl4030-power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
> index 4dae241..dd362c1 100644
> --- a/drivers/mfd/twl4030-power.c
> +++ b/drivers/mfd/twl4030-power.c
> @@ -159,7 +159,7 @@ out:
>  static int twl4030_write_script(u8 address, struct twl4030_ins *script,
>int len)
>  {
> -   int err;
> +   int err = -EINVAL;
>
> for (; len; len--, address++, script++) {
> if (len == 1) {
> --
> 1.8.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Arnd Bergmann
On Friday 25 January 2013 15:25:03 Peter Ujfalusi wrote:
> On 01/25/2013 03:14 PM, Arnd Bergmann wrote:
> > If the twl4030_write_script function gets called with
> > a zero length argument, its return value does not
> > get set. We know that all scripts have a nonzero
> > length, but returning an error in case they ever
> > do is probably appropriate.
> > 
> > Without this patch, building omap2plus_defconfig results in:
> > 
> > drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
> > drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized 
> > in this function
> 
> I've fixed up Kevin's email since he is no longer with TI and added Tero to
> the CC list since this is *something*-power on OMAP platforms 
> 
> Reviewed-by: Peter Ujfalusi 

Thanks!

I also got the mailing list address wrong on all mails, so I'll
retransmit the whole series in a bit, just waiting for other
quick comments to come in.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Peter Ujfalusi
On 01/25/2013 03:14 PM, Arnd Bergmann wrote:
> If the twl4030_write_script function gets called with
> a zero length argument, its return value does not
> get set. We know that all scripts have a nonzero
> length, but returning an error in case they ever
> do is probably appropriate.
> 
> Without this patch, building omap2plus_defconfig results in:
> 
> drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
> drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
> this function

I've fixed up Kevin's email since he is no longer with TI and added Tero to
the CC list since this is *something*-power on OMAP platforms ;)

Reviewed-by: Peter Ujfalusi 

> Signed-off-by: Arnd Bergmann 
> Cc: Samuel Ortiz 
> Cc: Peter Ujfalusi 
> Cc: Kevin Hilman 
> Cc: Amit Kucheria 
> ---
>  drivers/mfd/twl4030-power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
> index 4dae241..dd362c1 100644
> --- a/drivers/mfd/twl4030-power.c
> +++ b/drivers/mfd/twl4030-power.c
> @@ -159,7 +159,7 @@ out:
>  static int twl4030_write_script(u8 address, struct twl4030_ins *script,
>  int len)
>  {
> - int err;
> + int err = -EINVAL;
>  
>   for (; len; len--, address++, script++) {
>   if (len == 1) {
> 


-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Arnd Bergmann
If the twl4030_write_script function gets called with
a zero length argument, its return value does not
get set. We know that all scripts have a nonzero
length, but returning an error in case they ever
do is probably appropriate.

Without this patch, building omap2plus_defconfig results in:

drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
this function

Signed-off-by: Arnd Bergmann 
Cc: Samuel Ortiz 
Cc: Peter Ujfalusi 
Cc: Kevin Hilman 
Cc: Amit Kucheria 
---
 drivers/mfd/twl4030-power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 4dae241..dd362c1 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -159,7 +159,7 @@ out:
 static int twl4030_write_script(u8 address, struct twl4030_ins *script,
   int len)
 {
-   int err;
+   int err = -EINVAL;
 
for (; len; len--, address++, script++) {
if (len == 1) {
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Arnd Bergmann
If the twl4030_write_script function gets called with
a zero length argument, its return value does not
get set. We know that all scripts have a nonzero
length, but returning an error in case they ever
do is probably appropriate.

Without this patch, building omap2plus_defconfig results in:

drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
this function

Signed-off-by: Arnd Bergmann a...@arndb.de
Cc: Samuel Ortiz sa...@linux.intel.com
Cc: Peter Ujfalusi peter.ujfal...@ti.com
Cc: Kevin Hilman khil...@ti.com
Cc: Amit Kucheria amit.kuche...@linaro.org
---
 drivers/mfd/twl4030-power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 4dae241..dd362c1 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -159,7 +159,7 @@ out:
 static int twl4030_write_script(u8 address, struct twl4030_ins *script,
   int len)
 {
-   int err;
+   int err = -EINVAL;
 
for (; len; len--, address++, script++) {
if (len == 1) {
-- 
1.8.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Peter Ujfalusi
On 01/25/2013 03:14 PM, Arnd Bergmann wrote:
 If the twl4030_write_script function gets called with
 a zero length argument, its return value does not
 get set. We know that all scripts have a nonzero
 length, but returning an error in case they ever
 do is probably appropriate.
 
 Without this patch, building omap2plus_defconfig results in:
 
 drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
 drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
 this function

I've fixed up Kevin's email since he is no longer with TI and added Tero to
the CC list since this is *something*-power on OMAP platforms ;)

Reviewed-by: Peter Ujfalusi peter.ujfal...@ti.com

 Signed-off-by: Arnd Bergmann a...@arndb.de
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Peter Ujfalusi peter.ujfal...@ti.com
 Cc: Kevin Hilman khil...@ti.com
 Cc: Amit Kucheria amit.kuche...@linaro.org
 ---
  drivers/mfd/twl4030-power.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
 index 4dae241..dd362c1 100644
 --- a/drivers/mfd/twl4030-power.c
 +++ b/drivers/mfd/twl4030-power.c
 @@ -159,7 +159,7 @@ out:
  static int twl4030_write_script(u8 address, struct twl4030_ins *script,
  int len)
  {
 - int err;
 + int err = -EINVAL;
  
   for (; len; len--, address++, script++) {
   if (len == 1) {
 


-- 
Péter
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Arnd Bergmann
On Friday 25 January 2013 15:25:03 Peter Ujfalusi wrote:
 On 01/25/2013 03:14 PM, Arnd Bergmann wrote:
  If the twl4030_write_script function gets called with
  a zero length argument, its return value does not
  get set. We know that all scripts have a nonzero
  length, but returning an error in case they ever
  do is probably appropriate.
  
  Without this patch, building omap2plus_defconfig results in:
  
  drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
  drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized 
  in this function
 
 I've fixed up Kevin's email since he is no longer with TI and added Tero to
 the CC list since this is *something*-power on OMAP platforms 
 
 Reviewed-by: Peter Ujfalusi peter.ujfal...@ti.com

Thanks!

I also got the mailing list address wrong on all mails, so I'll
retransmit the whole series in a bit, just waiting for other
quick comments to come in.

Arnd
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Amit Kucheria
On Fri, Jan 25, 2013 at 2:14 PM, Arnd Bergmann a...@arndb.de wrote:
 If the twl4030_write_script function gets called with
 a zero length argument, its return value does not
 get set. We know that all scripts have a nonzero
 length, but returning an error in case they ever
 do is probably appropriate.

 Without this patch, building omap2plus_defconfig results in:

 drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
 drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
 this function

Reviewed-by: Amit Kucheria amit.kuche...@linaro.org

 Signed-off-by: Arnd Bergmann a...@arndb.de
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Peter Ujfalusi peter.ujfal...@ti.com
 Cc: Kevin Hilman khil...@ti.com
 Cc: Amit Kucheria amit.kuche...@linaro.org
 ---
  drivers/mfd/twl4030-power.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
 index 4dae241..dd362c1 100644
 --- a/drivers/mfd/twl4030-power.c
 +++ b/drivers/mfd/twl4030-power.c
 @@ -159,7 +159,7 @@ out:
  static int twl4030_write_script(u8 address, struct twl4030_ins *script,
int len)
  {
 -   int err;
 +   int err = -EINVAL;

 for (; len; len--, address++, script++) {
 if (len == 1) {
 --
 1.8.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

2013-01-25 Thread Arnd Bergmann
If the twl4030_write_script function gets called with
a zero length argument, its return value does not
get set. We know that all scripts have a nonzero
length, but returning an error in case they ever
do is probably appropriate.

Without this patch, building omap2plus_defconfig results in:

drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in 
this function

Signed-off-by: Arnd Bergmann a...@arndb.de
Reviewed-by: Peter Ujfalusi peter.ujfal...@ti.com
Reviewed-by: Amit Kucheria amit.kuche...@linaro.org
Cc: Samuel Ortiz sa...@linux.intel.com
Cc: Kevin Hilman khil...@deeprootsystems.com
Cc: Kristo, Tero t-kri...@ti.com
---
 drivers/mfd/twl4030-power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 4dae241..dd362c1 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -159,7 +159,7 @@ out:
 static int twl4030_write_script(u8 address, struct twl4030_ins *script,
   int len)
 {
-   int err;
+   int err = -EINVAL;
 
for (; len; len--, address++, script++) {
if (len == 1) {
-- 
1.8.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/