[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_jEz8Q_5cwfrBKvqGg5TMPnv-AcsF++hYcumNxyPA69bLW3g@mail.gmail.com>
Date: Tue, 20 Oct 2015 07:20:17 -0500
From: Konstantin Shkolnyy <konstantin.shkolnyy@...il.com>
To: Oliver Neukum <oneukum@...e.com>
Cc: Johan Hovold <johan@...nel.org>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions
On Tue, Oct 20, 2015 at 1:45 AM, Oliver Neukum <oneukum@...e.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.
--
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