[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_jEz9K9Rn+jFTUC541xBhfQB=kggtkqhq+rcihG_z3zVC_Kg@mail.gmail.com>
Date: Fri, 16 Oct 2015 07:35:02 -0500
From: Konstantin Shkolnyy <konstantin.shkolnyy@...il.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: johan@...nel.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure
Hello,
On Fri, Oct 16, 2015 at 6:19 AM, Sergei Shtylyov
<sergei.shtylyov@...entembedded.com> wrote:
[...]
>>
>> @@ -249,6 +251,16 @@ static struct usb_serial_driver * const
>> serial_drivers[] = {
>> #define CP210X_GET_CHARS 0x0E
>> #define CP210X_GET_PROPS 0x0F
>> #define CP210X_GET_COMM_STATUS 0x10
>> +/* Data returned by CP210X_GET_COMM_STATUS -- h/w doc says it's 0x13
>> bytes */
>> +struct cp210x_comm_status {
>> + u32 errors;
>> + u32 hold_reasons;
>> + u32 amount_in_in_queue;
>> + u32 amount_in_out_queue;
>> + u8 eof_received;
>> + u8 wait_for_immediate;
>> + u8 reserved;
>> +};
>
>
> Please don't declare structures amidst of the command #define's.
>
[...]
I agree with all suggestions except this one. I find it very
convenient, when reading code, to have the command code and its data
declared in the same place.
Best regards,
Konstantin
--
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