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]
Message-ID: <20121009141220.412c15c8@endymion.delvare>
Date:	Tue, 9 Oct 2012 14:12:20 +0200
From:	Jean Delvare <khali@...ux-fr.org>
To:	Julia Lawall <julia.lawall@...6.fr>
Cc:	Ryan Mallon <rmallon@...il.com>, Antti Palosaari <crope@....fi>,
	kernel-janitors@...r.kernel.org, shubhrajyoti@...com,
	Mauro Carvalho Chehab <mchehab@...radead.org>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/13] drivers/media/tuners/qt1010.c: use macros for
 i2c_msg initialization

Hi Julia,

On Mon, 8 Oct 2012 07:24:11 +0200 (CEST), Julia Lawall wrote:
> > Sorry, I mean either:
> >
> > 	I2C_MSG_WRITE(priv->cfg->i2c_address, &reg, sizeof(reg)),
> > 	I2C_MSG_READ(priv->cfg->i2c_address, val, sizeof(*val)),
> 
> Of course.  Sorry for not having seen that.  I can do that.

Eek, no, you can't, not in the general case at least. sizeof(*val) will
return the size of the _first_ element of the destination buffer, which
has nothing to do with the length of that buffer (which in turn might
be rightfully longer than the read length for this specific message.)

-- 
Jean Delvare
--
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