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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 13 Aug 2020 14:20:59 +0200
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Ahmet Inan <inan@...tec.de>,
        Martin Fuzzey <martin.fuzzey@...wbird.group>,
        Rob Herring <robh+dt@...nel.org>, linux-input@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...labora.com,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>
Subject: Re: [PATCHv4 4/4] Input: EXC3000: Add support to query model and
 fw_version

Hi Dmitry,

On Thu, Aug 06, 2020 at 05:39:01PM -0700, Dmitry Torokhov wrote:
> Hi Sebastian,
> 
> On Wed, Aug 05, 2020 at 06:05:20PM +0200, Sebastian Reichel wrote:
> >  
> > +static int exc3000_query_interrupt(struct exc3000_data *data)
> > +{
> > +	u8 *buf = data->buf;
> > +	int err;
> > +
> > +	err = i2c_master_recv(data->client, buf, EXC3000_LEN_FRAME);
> > +	if (err < 0)
> > +		return err;
> > +
> > +	if (buf[0] != 0x42)
> 
> I changed this to 'B' to match the rest of the function.

OK. I assumed this to be a easter egg reference to the Answer to
the Ultimate Question of Life, the Universe, and Everything from
the Hitchhiker's Guide, so I left it as a number. I might be totally
wrong on that one, so fine with me.

> > +		return -EPROTO;
> > +
> > +	if (buf[4] == 'E')
> > +		strlcpy(data->model, buf+5, sizeof(data->model));
> > +	else if (buf[4] == 'D')
> > +		strlcpy(data->fw_version, buf+5, sizeof(data->fw_version));
> > +	else
> > +		return -EPROTO;
> > +
> > +	return 0;
> > +}
> > +
> > +	error = sysfs_create_group(&client->dev.kobj, &exc3000_attribute_group);
> > +	if (error)
> > +		return error;
> > +
> > +	error = devm_add_action_or_reset(&client->dev, exc3000_unregister_sysfs, &client->dev);
> > +	if (error)
> > +		return error;
> 
> Replaced 2 calls with devm_device_add_group().

ah, I missed that because it does not have sysfs in its name and its
not in the <linux/sysfs.h>.

> Please yell if I managed to break it...

The touchscreen works as expected, sysfs files are created and
removed correctly and also work as expected. All looks good.

-- Sebastian

Powered by blists - more mailing lists