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] [day] [month] [year] [list]
Message-ID: <CAGb2v65Q1fMs5mxk8m64US+82oVkfmRyx3D2Yf_VhZwOpPHXVA@mail.gmail.com>
Date:	Thu, 24 Sep 2015 16:23:09 +0800
From:	Chen-Yu Tsai <wens@...e.org>
To:	Mark Brown <broonie@...nel.org>
Cc:	Chen-Yu Tsai <wens@...e.org>, Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	Russell King <linux@....linux.org.uk>,
	linux-sunxi <linux-sunxi@...glegroups.com>,
	Hans de Goede <hdegoede@...hat.com>,
	Shuge <shuge@...winnertech.com>,
	devicetree <devicetree@...r.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [linux-sunxi] Re: [PATCH v4 2/5] soc: sunxi: Add driver for
 Allwinner Reduced Serial Bus

On Thu, Sep 24, 2015 at 12:45 AM, Mark Brown <broonie@...nel.org> wrote:
> On Thu, Sep 24, 2015 at 12:05:18AM +0800, Chen-Yu Tsai wrote:
>
>> +static int sunxi_rsb_device_probe(struct device *dev)
>> +{
>> +     const struct sunxi_rsb_driver *drv = to_sunxi_rsb_driver(dev->driver);
>> +     struct sunxi_rsb_device *rdev = to_sunxi_rsb_device(dev);
>> +     int ret;
>> +
>> +     if (dev->bus != &sunxi_rsb_bus)
>> +             return 0;
>
> That's a bit worrying...  why might this get called for something other
> than a rsb device?

You're right. sunxi_rsb_bus is self contained (not exported) in sunxi_rsb.c,
so it's safe to assume that the devices going through sunxi_rsb_device_probe()
and sunxi_rsb_device_remove() are indeed sunxi_rsb slave devices.

I'll remove the checks from both functions.

>> +struct regmap *devm_regmap_init_sunxi_rsb(struct sunxi_rsb_device *rdev,
>> +                                       const struct regmap_config *config);
>
> This should work most of the time but you might want to take a look at
> the changes introduced in 3cfe7a74d42b (regmap: Use different lockdep
> class for each regmap init call) and follow a similar pattern for RSB to
> avoid spurious lockdep warnings in some configurations - see the commit
> log for that change for a full explanation.

This seems easy enough. I'll follow the patterns found in linux/regmap.h.

> Otherwise the regmap bit of this looks good, I'll try to have another
> look through at the rest of the code later.

Thanks!


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