From: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
To: Alan Cox <alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
Cc: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] hmc6352: Add driver for the HMC6352 compass
Date: Thu, 17 Jun 2010 14:26:08 +0200 [thread overview]
Message-ID: <201006171426.08442.oneukum@suse.de> (raw)
In-Reply-To: <20100617122048.142def43-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
Am Donnerstag, 17. Juni 2010 13:20:48 schrieb Alan Cox:
> On Wed, 16 Jun 2010 14:43:45 +0200
> Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org> wrote:
>
> > Am Mittwoch, 16. Juni 2010 14:16:14 schrieb Alan Cox:
> > > + msleep(10); /* sending 0x41 cmd we need to wait for 7-10 milli seconds */
> > > + ret = i2c_transfer(client->adapter, msg1, 1);
> > > + if (ret != 1) {
> > > + dev_warn(dev, "i2c read data cmd failed\n");
> > > + return ret;
> > > + }
> > > + ret_val = i2c_data[0];
> > > + ret_val = ((ret_val << 8) | i2c_data[1]);
> >
> > Please use the correct macro for this conversion.
>
> Its an array anyway - there isn't as such a 'correct macro' nor does it
> need to be using one.
So why does he use this unstructured data? Do we just hope the compiler
is good enough on big endian architectures?
Regards
Oliver
next prev parent reply other threads:[~2010-06-17 12:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-16 12:16 [PATCH] hmc6352: Add driver for the HMC6352 compass Alan Cox
[not found] ` <20100616121534.26294.12540.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-06-16 12:43 ` Oliver Neukum
[not found] ` <201006161443.45375.oneukum-l3A5Bk7waGM@public.gmane.org>
2010-06-17 11:20 ` Alan Cox
[not found] ` <20100617122048.142def43-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2010-06-17 12:26 ` Oliver Neukum [this message]
[not found] ` <201006171426.08442.oneukum-l3A5Bk7waGM@public.gmane.org>
2010-06-17 12:46 ` Alan Cox
2010-06-16 13:10 ` Jean Delvare
[not found] ` <20100616151056.181234b0-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-06-17 11:50 ` Alan Cox
[not found] ` <20100617125056.6d648ee7-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2010-06-17 12:19 ` Jonathan Cameron
[not found] ` <4C1A12C6.6070704-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2010-06-17 13:14 ` Alan Cox
[not found] ` <20100617141440.030f1de9-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2010-06-17 14:52 ` Jean Delvare
[not found] ` <20100617165250.5986fbf7-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-06-17 15:17 ` Alan Cox
[not found] ` <20100617161754.39bd116e-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2010-06-17 15:56 ` Jean Delvare
2010-06-16 14:46 ` Jonathan Cameron
[not found] ` <4C18E3B8.7020308-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2010-06-17 11:34 ` Alan Cox
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=201006171426.08442.oneukum@suse.de \
--to=oneukum-l3a5bk7wagm@public.gmane.org \
--cc=alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).