* [PATCH] input: misc: yealink: define packet offset __be16 instead of u16
@ 2017-04-10 8:56 ` Martin Kepplinger
0 siblings, 0 replies; 5+ messages in thread
From: Martin Kepplinger @ 2017-04-10 8:56 UTC (permalink / raw)
To: Henk.Vergonet, dmitry.torokhov
Cc: usbb2k-api-dev, linux-input, linux-kernel, Martin Kepplinger
sparse says
warning: incorrect type in assignment (different base types)
expected unsigned short [unsigned] [usertype] offset
got restricted __be16 [usertype] <noident>
for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the
first place shouldn't hurt.
Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
---
drivers/input/misc/yealink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/misc/yealink.h b/drivers/input/misc/yealink.h
index 1e0f523..934c247 100644
--- a/drivers/input/misc/yealink.h
+++ b/drivers/input/misc/yealink.h
@@ -28,7 +28,7 @@
struct yld_ctl_packet {
u8 cmd; /* command code, see below */
u8 size; /* 1-11, size of used data bytes. */
- u16 offset; /* internal packet offset */
+ __be16 offset; /* internal packet offset */
u8 data[11];
s8 sum; /* negative sum of 15 preceding bytes */
} __attribute__ ((packed));
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] input: misc: yealink: define packet offset __be16 instead of u16
@ 2017-04-10 8:56 ` Martin Kepplinger
0 siblings, 0 replies; 5+ messages in thread
From: Martin Kepplinger @ 2017-04-10 8:56 UTC (permalink / raw)
To: Henk.Vergonet, dmitry.torokhov
Cc: usbb2k-api-dev, linux-input, linux-kernel, Martin Kepplinger
sparse says
warning: incorrect type in assignment (different base types)
expected unsigned short [unsigned] [usertype] offset
got restricted __be16 [usertype] <noident>
for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the
first place shouldn't hurt.
Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
---
drivers/input/misc/yealink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/misc/yealink.h b/drivers/input/misc/yealink.h
index 1e0f523..934c247 100644
--- a/drivers/input/misc/yealink.h
+++ b/drivers/input/misc/yealink.h
@@ -28,7 +28,7 @@
struct yld_ctl_packet {
u8 cmd; /* command code, see below */
u8 size; /* 1-11, size of used data bytes. */
- u16 offset; /* internal packet offset */
+ __be16 offset; /* internal packet offset */
u8 data[11];
s8 sum; /* negative sum of 15 preceding bytes */
} __attribute__ ((packed));
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2] input: misc: yealink: define packet offset __be16 instead of u16
2017-04-10 8:56 ` Martin Kepplinger
@ 2017-04-10 15:00 ` Martin Kepplinger
-1 siblings, 0 replies; 5+ messages in thread
From: Martin Kepplinger @ 2017-04-10 15:00 UTC (permalink / raw)
To: Henk.Vergonet, dmitry.torokhov
Cc: usbb2k-api-dev, linux-input, linux-kernel, Martin Kepplinger
sparse says
warning: incorrect type in assignment (different base types)
expected unsigned short [unsigned] [usertype] offset
got restricted __be16 [usertype] <noident>
for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the
first place shouldn't hurt.
Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: Henk.Vergonet@gmail.com
---
revision history
----------------
v2: add privately received Signed-off-by
drivers/input/misc/yealink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/misc/yealink.h b/drivers/input/misc/yealink.h
index 1e0f523..934c247 100644
--- a/drivers/input/misc/yealink.h
+++ b/drivers/input/misc/yealink.h
@@ -28,7 +28,7 @@
struct yld_ctl_packet {
u8 cmd; /* command code, see below */
u8 size; /* 1-11, size of used data bytes. */
- u16 offset; /* internal packet offset */
+ __be16 offset; /* internal packet offset */
u8 data[11];
s8 sum; /* negative sum of 15 preceding bytes */
} __attribute__ ((packed));
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2] input: misc: yealink: define packet offset __be16 instead of u16
@ 2017-04-10 15:00 ` Martin Kepplinger
0 siblings, 0 replies; 5+ messages in thread
From: Martin Kepplinger @ 2017-04-10 15:00 UTC (permalink / raw)
To: Henk.Vergonet, dmitry.torokhov
Cc: usbb2k-api-dev, linux-input, linux-kernel, Martin Kepplinger
sparse says
warning: incorrect type in assignment (different base types)
expected unsigned short [unsigned] [usertype] offset
got restricted __be16 [usertype] <noident>
for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the
first place shouldn't hurt.
Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: Henk.Vergonet@gmail.com
---
revision history
----------------
v2: add privately received Signed-off-by
drivers/input/misc/yealink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/misc/yealink.h b/drivers/input/misc/yealink.h
index 1e0f523..934c247 100644
--- a/drivers/input/misc/yealink.h
+++ b/drivers/input/misc/yealink.h
@@ -28,7 +28,7 @@
struct yld_ctl_packet {
u8 cmd; /* command code, see below */
u8 size; /* 1-11, size of used data bytes. */
- u16 offset; /* internal packet offset */
+ __be16 offset; /* internal packet offset */
u8 data[11];
s8 sum; /* negative sum of 15 preceding bytes */
} __attribute__ ((packed));
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] input: misc: yealink: define packet offset __be16 instead of u16
2017-04-10 15:00 ` Martin Kepplinger
(?)
@ 2017-04-11 3:39 ` Dmitry Torokhov
-1 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2017-04-11 3:39 UTC (permalink / raw)
To: Martin Kepplinger
Cc: Henk.Vergonet, usbb2k-api-dev, linux-input, linux-kernel
On Mon, Apr 10, 2017 at 05:00:22PM +0200, Martin Kepplinger wrote:
> sparse says
>
> warning: incorrect type in assignment (different base types)
> expected unsigned short [unsigned] [usertype] offset
> got restricted __be16 [usertype] <noident>
>
> for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the
> first place shouldn't hurt.
>
> Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
> Signed-off-by: Henk.Vergonet@gmail.com
Applied, thank you.
> ---
> revision history
> ----------------
> v2: add privately received Signed-off-by
>
>
> drivers/input/misc/yealink.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/misc/yealink.h b/drivers/input/misc/yealink.h
> index 1e0f523..934c247 100644
> --- a/drivers/input/misc/yealink.h
> +++ b/drivers/input/misc/yealink.h
> @@ -28,7 +28,7 @@
> struct yld_ctl_packet {
> u8 cmd; /* command code, see below */
> u8 size; /* 1-11, size of used data bytes. */
> - u16 offset; /* internal packet offset */
> + __be16 offset; /* internal packet offset */
> u8 data[11];
> s8 sum; /* negative sum of 15 preceding bytes */
> } __attribute__ ((packed));
> --
> 2.1.4
>
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-11 3:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 8:56 [PATCH] input: misc: yealink: define packet offset __be16 instead of u16 Martin Kepplinger
2017-04-10 8:56 ` Martin Kepplinger
2017-04-10 15:00 ` [PATCH v2] " Martin Kepplinger
2017-04-10 15:00 ` Martin Kepplinger
2017-04-11 3:39 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.