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:	Tue, 18 Sep 2012 15:32:42 +0530
From:	Venu Byravarasu <vbyravarasu@...dia.com>
To:	Shubhrajyoti Datta <omaplinuxkernel@...il.com>
CC:	Shubhrajyoti D <shubhrajyoti@...com>,
	"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"julia.lawall@...6.fr" <julia.lawall@...6.fr>
Subject: RE: [PATCHv2 6/6] media: Convert struct i2c_msg initialization to
 C99 format

> -----Original Message-----
> From: Shubhrajyoti Datta [mailto:omaplinuxkernel@...il.com]
> Sent: Tuesday, September 18, 2012 3:30 PM
> To: Venu Byravarasu
> Cc: Shubhrajyoti D; linux-media@...r.kernel.org; linux-
> kernel@...r.kernel.org; julia.lawall@...6.fr
> Subject: Re: [PATCHv2 6/6] media: Convert struct i2c_msg initialization to C99
> format

> >>       struct i2c_msg test[2] = {
> >> -             { client->addr, 0,        3, write },
> >> -             { client->addr, I2C_M_RD, 2, read  },
> >> +             {
> >> +                     .addr = client->addr,
> >> +                     .flags = 0,
> >
> > Does flags not contain 0 by default?
> >
> 
> It does however I felt that 0 means write so letting it be explicit.
> 
> In case a removal is preferred that's doable too however felt it is
> more readable this way.

Though it adds readability, it carries an overhead of one write operation too.
So, better to remove it.
 

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