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:   Mon, 12 Dec 2016 19:59:40 +0200
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     rtc-linux@...glegroups.com
Cc:     Venkat Reddy Talla <vreddytalla@...dia.com>, cw00.choi@...sung.com,
        krzk@...nel.org, a.zummo@...ertech.it,
        alexandre.belloni@...e-electrons.com, linux-kernel@...r.kernel.org,
        ldewangan@...dia.com
Subject: Re: [rtc-linux] Re: [PATCH] rtc: max77683: avoid regmap bulk write
 for max77620

On Mon, Dec 12, 2016 at 02:28:11PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > @@ -259,6 +262,32 @@ static const struct max77686_rtc_driver_data max77802_drv_data = {
> >  	.rtc_irq_chip = &max77802_rtc_irq_chip,
> >  };
> >  
> > +static inline int _regmap_bulk_write(struct max77686_rtc_info *info,
> 
> rtc_regmap_bulk_write?

I think max77686_regmap_bulk_write would be nice. This might still pop
somewhere in the backtrace so the prefix is useful.

> 
> > +		unsigned int reg, void *val, int len)
> > +{
> 
> Please keep arguments (except "info" one) in sync with regmap_bulk_write():
> 
> int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
> 		     size_t val_count)
> 
> > +	int ret = 0;
> > +
> > +	if (!info->drv_data->avoid_rtc_bulk_write) {
> > +		/* RTC registers support sequential writing */
> > +		ret = regmap_bulk_write(info->rtc_regmap, reg, val, len);
> > +	} else {
> > +		/* Power registers support register-data pair writing */
> 
> Hmn, maybe this can be handled be regmap_bulk_write() with proper
> regmap setting (map->bus == NULL?), can anyone with more regmap
> expertise comment on this?

Good catch. This does not look like a property of this device driver but
of the bus it is attached to.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ