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]
Date:	Mon, 18 Jan 2016 18:47:08 +0100
From:	Johan Hovold <johan@...nel.org>
To:	Martyn Welch <martyn.welch@...labora.co.uk>
Cc:	Konstantin Shkolnyy <Konstantin.Shkolnyy@...abs.com>,
	johan@...nel.org,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/4] USB: serial: cp210x: New register access
 functions.

On Thu, Jan 14, 2016 at 05:37:15PM +0000, Martyn Welch wrote:
> On 02/01/16 03:11, Konstantin Shkolnyy wrote:
> > cp210x_get_config and cp210x_set_config are cumbersome to use. This change
> > introduces new register access functions to replace them. New functions
> > are not yet called - the switch is done gradually in following changes.
> >
> > Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy-Re5JQEeQqe8AvxtiuMwx3w@...lic.gmane.org>
> > ---

> > +/*
> > + * Reads any 8-bit CP210X_ register identified by req.
> > + */
> > +static int cp210x_read_u8_reg(struct usb_serial_port *port, u8 req, u8 *val)
> > +{
> > +	return cp210x_read_reg_block(port, req, val, sizeof(*val));
> > +}
> > +
> > +/*
> > + * Writes any 16-bit CP210X_ register (req) whose value is passed
> > + * entirely in the wValue field of the USB request.
> > + */
> > +static int cp210x_write_u16_reg(struct usb_serial_port *port, u8 req, u16 val)
> 
> Think this needs a different name to draw more attention to the fact 
> that it writes in a different way from cp210x_write_u32_reg and how the 
> cp210x_read_uXX_reg read.

Not necessarily. Why would the caller need to care about that?

Keeping the suggested names should be fine.

Thanks,
Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ