lkml.org 
[lkml]   [2015]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions
From
On Tue, Oct 20, 2015 at 1:45 AM, Oliver Neukum <oneukum@suse.com> wrote:
> On Mon, 2015-10-19 at 17:01 -0500, Konstantin Shkolnyy wrote:
[...]
>> +static int cp210x_read_u16_reg(struct usb_serial *serial, u8 req, u16 *pval)
>> +{
>> + struct cp210x_serial_private *spriv = usb_get_serial_data(serial);
>> + __le16 le16_value;
>
> 1. If you already get passed a pointer to a buffer, why use another
> buffer?

Because I want to preserve the caller's value in the case of an error.


\
 
 \ /
  Last update: 2015-10-20 14:41    [W:0.027 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site