driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: wimax/i2400m: fix byte-order type issue
@ 2021-02-20 12:50 karthek
  0 siblings, 0 replies; 3+ messages in thread
From: karthek @ 2021-02-20 12:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Lee Jones, Johannes Berg, Arnd Bergmann
  Cc: devel, linux-kernel

fix sparse type warning by converting le32 types to
host byte-order types before comparison

Signed-off-by: karthek <mail@karthek.com>
---
 drivers/staging/wimax/i2400m/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wimax/i2400m/fw.c b/drivers/staging/wimax/i2400m/fw.c
index 92ea5c101..f09de1810 100644
--- a/drivers/staging/wimax/i2400m/fw.c
+++ b/drivers/staging/wimax/i2400m/fw.c
@@ -511,7 +511,7 @@ ssize_t __i2400m_bm_ack_verify(struct i2400m *i2400m, int opcode,
 			opcode, i2400m_brh_get_response(ack));
 		goto error_ack_failed;
 	}
-	if (ack_size < ack->data_size + sizeof(*ack)) {
+	if (ack_size < le32_to_cpu(ack->data_size) + sizeof(*ack)) {
 		dev_err(dev, "boot-mode cmd %d: SW BUG "
 			"driver provided only %zu bytes for %zu bytes "
 			"of data\n", opcode, ack_size,
-- 
2.30.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: wimax/i2400m: fix byte-order type issue
  2021-02-20 12:52 karthik alapati
@ 2021-02-21 11:26 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2021-02-21 11:26 UTC (permalink / raw)
  To: karthik alapati
  Cc: devel, Johannes Berg, Lee Jones, linux-kernel, Arnd Bergmann

On Sat, Feb 20, 2021 at 06:22:31PM +0530, karthik alapati wrote:
> fix sparse type warning by converting le32 types to
> host byte-order types before comparison
> 
> Signed-off-by: karthik alapati <mail@karthek.com>
> ---
>  drivers/staging/wimax/i2400m/fw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wimax/i2400m/fw.c b/drivers/staging/wimax/i2400m/fw.c
> index 92ea5c101..f09de1810 100644
> --- a/drivers/staging/wimax/i2400m/fw.c
> +++ b/drivers/staging/wimax/i2400m/fw.c
> @@ -511,7 +511,7 @@ ssize_t __i2400m_bm_ack_verify(struct i2400m *i2400m, int opcode,
>  			opcode, i2400m_brh_get_response(ack));
>  		goto error_ack_failed;
>  	}
> -	if (ack_size < ack->data_size + sizeof(*ack)) {
> +	if (ack_size < le32_to_cpu(ack->data_size) + sizeof(*ack)) {
>  		dev_err(dev, "boot-mode cmd %d: SW BUG "
>  			"driver provided only %zu bytes for %zu bytes "
>  			"of data\n", opcode, ack_size,

You sent 3 patches that seem to do the same thing, yet are a bit
different?

Please make your patches a patch series and provide proper subject lines
to make them unique.  I have now dropped all of your submitted patches
from my review queue.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] staging: wimax/i2400m: fix byte-order type issue
@ 2021-02-20 12:52 karthik alapati
  2021-02-21 11:26 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: karthik alapati @ 2021-02-20 12:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Lee Jones, Johannes Berg, Arnd Bergmann
  Cc: devel, linux-kernel

fix sparse type warning by converting le32 types to
host byte-order types before comparison

Signed-off-by: karthik alapati <mail@karthek.com>
---
 drivers/staging/wimax/i2400m/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wimax/i2400m/fw.c b/drivers/staging/wimax/i2400m/fw.c
index 92ea5c101..f09de1810 100644
--- a/drivers/staging/wimax/i2400m/fw.c
+++ b/drivers/staging/wimax/i2400m/fw.c
@@ -511,7 +511,7 @@ ssize_t __i2400m_bm_ack_verify(struct i2400m *i2400m, int opcode,
 			opcode, i2400m_brh_get_response(ack));
 		goto error_ack_failed;
 	}
-	if (ack_size < ack->data_size + sizeof(*ack)) {
+	if (ack_size < le32_to_cpu(ack->data_size) + sizeof(*ack)) {
 		dev_err(dev, "boot-mode cmd %d: SW BUG "
 			"driver provided only %zu bytes for %zu bytes "
 			"of data\n", opcode, ack_size,
-- 
2.30.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-21 11:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20 12:50 [PATCH] staging: wimax/i2400m: fix byte-order type issue karthek
2021-02-20 12:52 karthik alapati
2021-02-21 11:26 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).