From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
Stephane Grosjean <s.grosjean@peak-system.com>,
linux-can@vger.kernel.org
Subject: Re: [PATCH 7/7 v8] can/peak_usb: add support for PEAK new CANFD USB adapters
Date: Thu, 22 Jan 2015 17:19:08 +0100 [thread overview]
Message-ID: <54C122FC.9030806@hartkopp.net> (raw)
In-Reply-To: <54C1218D.80006@pengutronix.de>
On 22.01.2015 17:13, Marc Kleine-Budde wrote:
> On 01/22/2015 04:59 PM, Stephane Grosjean wrote:
>>
>> Le 22/01/2015 16:41, Marc Kleine-Budde a écrit :
>>> On 01/22/2015 04:24 PM, Stephane Grosjean wrote:
>>>> Add support for the following new PEAK-System technik CANFD USB adapters:
>>>>
>>>> PCAN-USB FD single CANFD channel USB adapter
>>>> PCAN-USB Pro FD dual CANFD channels USB adapter
>>>>
>>>> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
>>>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>>> [...]
>>>
>>>> diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
>>>> new file mode 100644
>>>> index 0000000..2129549
>>>> --- /dev/null
>>>> +++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
>>> [...]
>>>
>>>> +/* handle device specific info used by the netdevices */
>>>> +struct pcan_usb_fd_if {
>>>> + struct peak_usb_device *dev[PCAN_USB_MAX_CHANNEL];
>>>> + struct pcan_ufd_fw_info fw_info;
>>>> + struct peak_time_ref time_ref;
>>>> + int cm_ignore_count;
>>>> + int dev_opened_count;
>>> Please use tab for indention, not space.
>>>
>>>> +};
>>>> +
>>>> +/* device information */
>>>> +struct pcan_usb_fd_device {
>>>> + struct peak_usb_device dev;
>>>> + struct can_berr_counter bec;
>>>> + struct pcan_usb_fd_if *usb_if;
>>>> + u8 *cmd_buffer_addr;
>>> dito
>>>
>>> Marc
>>>
>> Well, I'm afraid I have misunderstood one of your previous reMarks:
>>
>>> +/* device information */
>>> +struct pcan_usb_fd_device {
>>> + struct peak_usb_device dev;
>>> + struct pcan_usb_fd_if * usb_if;
>>> struct pcan_usb_fd_if *usb_if
>>>> +
>>>> + u8 * cmd_buffer_addr;
>>> u8 *cmd_buffer_addr
>>>> +
>>>> + uint tx_error_counter;
>>>> + uint rx_error_counter;
>>> unsigned int
>>>
>>> Please don't use a tab after the struct foo, u8, unsinged int, etc...,
>>> as it doesn't align.
>>>
>>
>> can u explain a bit more, please ? FYI, checkpatch.pl doesn't see any
>> warning nor fatal in these indentations...
>
> You have decided for indention in structs in your files, if you do so,
> please use TABs consistently everywhere. (Or don't do indention at all.)
>
I thought between the data type and the variable name is just sonly one single
space.
So
+struct __packed pucan_timing_slow {
+ __le16 opcode_channel;
+
+ u8 ewl; /* Error Warning limit */
+ u8 sjw_t; /* Sync Jump Width + Triple sampling */
+ u8 tseg2; /* Timing SEGment 2 */
+ u8 tseg1; /* Timing SEGment 1 */
+
+ __le16 brp; /* BaudRate Prescaler */
+};
becomes
+struct __packed pucan_timing_slow {
+ __le16 opcode_channel;
+
+ u8 ewl; /* Error Warning limit */
+ u8 sjw_t; /* Sync Jump Width + Triple sampling */
+ u8 tseg2; /* Timing SEGment 2 */
+ u8 tseg1; /* Timing SEGment 1 */
+
+ __le16 brp; /* BaudRate Prescaler */
+};
With tabs indenting u8 from the start of the line and tabs before the comment.
Regards,
Oliver
next prev parent reply other threads:[~2015-01-22 16:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 15:24 [PATCH 0/7 v8] can/peak_usb: upgrade to CANFD Stephane Grosjean
2015-01-22 15:24 ` [PATCH 1/7 v8] can/peak_usb: export ctrlmode_supported to adapter specific Stephane Grosjean
2015-01-22 15:24 ` [PATCH 2/7 v8] can/peak_usb: add adapter BEC callback definition Stephane Grosjean
2015-01-22 15:24 ` [PATCH 3/7 v8] can/peak_usb: upgrade core to data bittiming specs Stephane Grosjean
2015-01-22 15:24 ` [PATCH 4/7 v8] can/peak_usb: upgrade core to new struct canfd_frame Stephane Grosjean
2015-01-22 15:24 ` [PATCH 5/7 v8] can/peak_usb: export pcan_usb_pro functions Stephane Grosjean
2015-01-22 15:24 ` [PATCH 6/7 v8] can/peak_usb: add peak_usb_netif_rx() new function Stephane Grosjean
2015-01-22 15:31 ` Marc Kleine-Budde
2015-01-22 15:38 ` Stephane Grosjean
2015-01-22 15:40 ` Marc Kleine-Budde
2015-01-22 15:42 ` Stephane Grosjean
2015-01-22 15:46 ` Marc Kleine-Budde
2015-01-22 15:24 ` [PATCH 7/7 v8] can/peak_usb: add support for PEAK new CANFD USB adapters Stephane Grosjean
2015-01-22 15:33 ` Marc Kleine-Budde
2015-01-22 15:40 ` Stephane Grosjean
2015-01-22 15:41 ` Marc Kleine-Budde
2015-01-22 15:41 ` Marc Kleine-Budde
2015-01-22 15:59 ` Stephane Grosjean
2015-01-22 16:13 ` Marc Kleine-Budde
2015-01-22 16:19 ` Oliver Hartkopp [this message]
2015-01-22 16:24 ` Marc Kleine-Budde
2015-01-22 16:02 ` Andri Yngvason
2015-01-22 16:07 ` Stephane Grosjean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C122FC.9030806@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=s.grosjean@peak-system.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).