lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 17 Jun 2010 12:20:48 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Oliver Neukum <oneukum@...e.de>
Cc:	Alan Cox <alan@...ux.intel.com>, linux-i2c@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hmc6352: Add driver for the HMC6352 compass

On Wed, 16 Jun 2010 14:43:45 +0200
Oliver Neukum <oneukum@...e.de> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ