From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Alan Cox <alan@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
Arvind Yadav <arvind.yadav.cs@gmail.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Hans de Goede <hdegoede@redhat.com>,
Luis Oliveira <Luis.Oliveira@synopsys.com>,
Aishwarya Pant <aishpant@gmail.com>,
Riccardo Schirone <sirmy15@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
devel@driverdev.osuosl.org
Subject: Re: [PATCH 07/18] media: staging: atomisp: fix endianess issues
Date: Tue, 27 Mar 2018 14:02:55 +0300 [thread overview]
Message-ID: <1522148575.21176.22.camel@linux.intel.com> (raw)
In-Reply-To: <cc521a255756c0241572816f96e3b97126ac16de.1522098456.git.mchehab@s-opensource.com>
On Mon, 2018-03-26 at 17:10 -0400, Mauro Carvalho Chehab wrote:
> There are lots of be-related warnings there, as it doesn't properly
> mark what data uses bigendian.
> @@ -107,7 +107,7 @@ mt9m114_write_reg(struct i2c_client *client, u16
> data_length, u16 reg, u32 val)
> int num_msg;
> struct i2c_msg msg;
> unsigned char data[6] = {0};
> - u16 *wreg;
> + __be16 *wreg;
>
> + u16 *wdata = (void *)&data[2];
> +
> + *wdata = be16_to_cpu(*(__be16 *)&data[2]);
> + u32 *wdata = (void *)&data[2];
> +
> + *wdata = be32_to_cpu(*(__be32 *)&data[2]);
For x86 it is okay, though in general it should use get_unaligned().
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2018-03-27 11:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 21:10 [PATCH 01/18] media: r820t: don't crash if attach fails Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 02/18] media: staging: atomisp: do some coding style improvements Mauro Carvalho Chehab
2018-04-04 10:59 ` Sakari Ailus
2018-03-26 21:10 ` [PATCH 03/18] media: staging: atomisp: ia_css_output.host: don't use var before check Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 04/18] media: staging atomisp: declare static vars as such Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 05/18] media: staging: atomisp: get rid of stupid statements Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 06/18] media: staging: atomisp: add a missing include Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 07/18] media: staging: atomisp: fix endianess issues Mauro Carvalho Chehab
2018-03-27 11:02 ` Andy Shevchenko [this message]
2018-03-28 9:25 ` Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 08/18] media: staging: atomisp: remove unused set_pd_base() Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 09/18] media: staging: atomisp: get rid of an unused function Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 10/18] media: staging: atomisp: Get rid of *default.host.[ch] Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 11/18] media: staging: atomisp: don't access a NULL var Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 12/18] media: staging: atomisp: avoid a warning if 32 bits build Mauro Carvalho Chehab
2018-03-28 14:13 ` Dan Carpenter
2018-03-28 14:34 ` Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 13/18] media: staging: atomisp: remove an useless check Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 14/18] media: staging: atomisp: use %p to print pointers Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 15/18] media: staging: atomisp: get rid of some static warnings Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 16/18] media: staging: atomisp: stop mixing enum types Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 17/18] media: staging: atomisp: get rid of an unused var Mauro Carvalho Chehab
2018-03-26 21:10 ` [PATCH 18/18] media: staging: atomisp: stop duplicating input format types 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=1522148575.21176.22.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=Luis.Oliveira@synopsys.com \
--cc=aishpant@gmail.com \
--cc=alan@linux.intel.com \
--cc=arnd@arndb.de \
--cc=arvind.yadav.cs@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hans.verkuil@cisco.com \
--cc=hdegoede@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@s-opensource.com \
--cc=sakari.ailus@linux.intel.com \
--cc=sirmy15@gmail.com \
/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.