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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170309234624.GG20077@dtor-ws>
Date:   Thu, 9 Mar 2017 15:46:24 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Wolfram Sang <wsa@...-dreams.de>
Cc:     Jean Delvare <jdelvare@...e.de>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Andrew Duggan <aduggan@...aptics.com>,
        linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: Re: [PATCH 1/8] i2c: export i2c_client_type structure

On Fri, Mar 10, 2017 at 12:12:46AM +0100, Wolfram Sang wrote:
> Dmitry,
> 
> On Thu, Mar 09, 2017 at 02:16:37PM -0800, Dmitry Torokhov wrote:
> > i2c bus has 2 different types of device belonging to the same bus and
> > bus notifiers use device type to distinguish between adapters and clients.
> > Previously we only had i2c_adapter_type exported, which made code wanting
> > to work with i2c_client devices test for type not equal to adapter type.
> > This unfortunately is not safe if we ever add another type to the bus,
> > so let's export i2c_client_type as well.
> > 
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> > ---
> > 
> > Wolfram, this is the patch I was talking about in the other mail.
> 
> I see. From a glimpse, I am fine with the patch. I'll add Jean Delvare
> to CC, though, in case I missed some detail he still knows. Furthermore,
> while I agree that testing for "not adapter" when one means "is client"
> is not nice, is there a bigger benefit than being correct in your queue?

No, just my dislike of testing for "dev->type != &i2c_adapter_type" in
the new i2c bus notifier when we want to work with i2c clients.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ