linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Cc: Henk.Vergonet@gmail.com, usbb2k-api-dev@nongnu.org,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] input: misc: yealink: define packet offset __be16 instead of u16
Date: Mon, 10 Apr 2017 20:39:56 -0700	[thread overview]
Message-ID: <20170411033956.GD4346@dtor-ws> (raw)
In-Reply-To: <1491836422-22309-1-git-send-email-martin.kepplinger@ginzinger.com>

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

      reply	other threads:[~2017-04-11  3:39 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 ` [PATCH v2] " Martin Kepplinger
2017-04-11  3:39   ` Dmitry Torokhov [this message]

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=20170411033956.GD4346@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=Henk.Vergonet@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.kepplinger@ginzinger.com \
    --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).