All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: unlisted-recipients:; (no To-header on input)@bombadil.infradead.org
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Douglas Fischer <fischerdouglasc@gmail.com>
Subject: [PATCH 11/21] media: si470x: fix __be16 annotations
Date: Fri,  6 Apr 2018 10:23:12 -0400	[thread overview]
Message-ID: <fb726fa1be204240b4eee355a5843a087af137b0.1523024380.git.mchehab@s-opensource.com> (raw)
In-Reply-To: <cover.1523024380.git.mchehab@s-opensource.com>
In-Reply-To: <cover.1523024380.git.mchehab@s-opensource.com>

The annotations there are wrong as warned:
   drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:129:24: warning: incorrect type in assignment (different base types)
   drivers/media/radio/si470x/radio-si470x-i2c.c:129:24:    expected unsigned short [unsigned] [short] <noident>
   drivers/media/radio/si470x/radio-si470x-i2c.c:129:24:    got restricted __be16 [usertype] <noident>
   drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/media/radio/si470x/radio-si470x-i2c.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c
index 1b3720b1e737..e3b3ecd14a4d 100644
--- a/drivers/media/radio/si470x/radio-si470x-i2c.c
+++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
@@ -91,7 +91,7 @@ MODULE_PARM_DESC(max_rds_errors, "RDS maximum block errors: *1*");
  */
 static int si470x_get_register(struct si470x_device *radio, int regnr)
 {
-	u16 buf[READ_REG_NUM];
+	__be16 buf[READ_REG_NUM];
 	struct i2c_msg msgs[1] = {
 		{
 			.addr = radio->client->addr,
@@ -116,7 +116,7 @@ static int si470x_get_register(struct si470x_device *radio, int regnr)
 static int si470x_set_register(struct si470x_device *radio, int regnr)
 {
 	int i;
-	u16 buf[WRITE_REG_NUM];
+	__be16 buf[WRITE_REG_NUM];
 	struct i2c_msg msgs[1] = {
 		{
 			.addr = radio->client->addr,
@@ -146,7 +146,7 @@ static int si470x_set_register(struct si470x_device *radio, int regnr)
 static int si470x_get_all_registers(struct si470x_device *radio)
 {
 	int i;
-	u16 buf[READ_REG_NUM];
+	__be16 buf[READ_REG_NUM];
 	struct i2c_msg msgs[1] = {
 		{
 			.addr = radio->client->addr,
-- 
2.14.3

  parent reply	other threads:[~2018-04-06 14:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 14:23 [PATCH 00/21] Fix sparse/smatch errors on non-x86 drivers Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 01/21] media: davinci_vpfe: remove useless checks from ipipe Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 02/21] media: dm365_ipipe: remove an unused var Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 03/21] media: davinci_vpfe: fix vpfe_ipipe_init() error handling Mauro Carvalho Chehab
2018-10-09  4:46   ` Joel Fernandes
2018-10-11 16:56     ` Joel Fernandes
2018-04-06 14:23 ` [PATCH 04/21] media: davinci_vpfe: mark __iomem as such Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 05/21] media: davinci_vpfe: get rid of an unused var at dm365_isif.c Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 06/21] media: davinci_vpfe: vpfe_video: remove an unused var Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 07/21] media: davinci_vpfe: don't use kernel-doc markup for simple comments Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 08/21] media: davinci_vpfe: fix a typo for "default" Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 09/21] media: davinci_vpfe: cleanup ipipe_[g|s]_config logic Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 10/21] media: davinci_vpfe: fix __user annotations Mauro Carvalho Chehab
2018-04-06 14:23 ` Mauro Carvalho Chehab [this message]
2018-04-06 14:23 ` [PATCH 12/21] media: isif: reorder a statement to match coding style Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 13/21] media: davinci: fix an inconsistent ident Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 14/21] media: mmp-driver: add needed __iomem marks to power_regs Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 15/21] media: vpbe_display: properly handle error case Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 16/21] media: vpbe_display: get rid of warnings Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 17/21] media: ispstat: use %p to print the address of a buffer Mauro Carvalho Chehab
2018-04-06 15:46   ` Laurent Pinchart
2018-04-06 16:24     ` Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 18/21] media: isppreview: fix __user annotations Mauro Carvalho Chehab
2018-04-06 15:54   ` Laurent Pinchart
2018-04-06 16:22     ` Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 19/21] media: fsl-viu: use %p to print pointers Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 20/21] media: fsl-viu: fix __iomem annotations Mauro Carvalho Chehab
2018-04-06 14:23 ` [PATCH 21/21] media: omap_vout: fix wrong identing Mauro Carvalho Chehab

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=fb726fa1be204240b4eee355a5843a087af137b0.1523024380.git.mchehab@s-opensource.com \
    --to=mchehab@s-opensource.com \
    --cc=fischerdouglasc@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.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 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.