From: Martin Kepplinger <martin.kepplinger@ginzinger.com>
To: Henk.Vergonet@gmail.com, dmitry.torokhov@gmail.com
Cc: usbb2k-api-dev@nongnu.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org,
Martin Kepplinger <martin.kepplinger@ginzinger.com>
Subject: [PATCH v2] input: misc: yealink: define packet offset __be16 instead of u16
Date: Mon, 10 Apr 2017 17:00:22 +0200 [thread overview]
Message-ID: <1491836422-22309-1-git-send-email-martin.kepplinger@ginzinger.com> (raw)
In-Reply-To: <1491814577-26408-1-git-send-email-martin.kepplinger@ginzinger.com>
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
next prev parent reply other threads:[~2017-04-10 15:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 8:56 [PATCH] input: misc: yealink: define packet offset __be16 instead of u16 Martin Kepplinger
2017-04-10 15:00 ` Martin Kepplinger [this message]
2017-04-11 3:39 ` [PATCH v2] " Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491836422-22309-1-git-send-email-martin.kepplinger@ginzinger.com \
--to=martin.kepplinger@ginzinger.com \
--cc=Henk.Vergonet@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=usbb2k-api-dev@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).