Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1620010

[PATCH v2] input: misc: yealink: define packet offset __be16 instead of u16

From Martin Kepplinger <martin.kepplinger@ginzinger.com>
Newsgroups linux.kernel
Subject [PATCH v2] input: misc: yealink: define packet offset __be16 instead of u16
Date 2017-04-10 17:10 +0200
Message-ID <tuJ74-2kr-31@gated-at.bofh.it> (permalink)
References <tuDuG-788-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] input: misc: yealink: define packet offset __be16 instead of u16 Martin Kepplinger <martin.kepplinger@ginzinger.com> - 2017-04-10 11:10 +0200
  [PATCH v2] input: misc: yealink: define packet offset __be16 instead of u16 Martin Kepplinger <martin.kepplinger@ginzinger.com> - 2017-04-10 17:10 +0200
    Re: [PATCH v2] input: misc: yealink: define packet offset __be16  instead of u16 Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-04-11 05:50 +0200

csiph-web