Re: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: Fix build warnings

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marc Kleine-Budde
Date: Monday, November 1, 2010 - 4:05 am

Hello,

On 10/29/2010 09:32 PM, Wolfgang Grandegger wrote:

some comments inline.

[...]

                   ^
","

   ^
";"


ACK


Oh, I haven't looked this one up in the datasheet.

or "if (lec)", YMMV


If I understand the code and datasheet correctly, this function doesn't
only check for busy. The functions sends the message to the object and
waits until it's finished. I suggest to split this functionality into
two functions and give them proper names. In the TX path you usually
don't need the send-message-and-wait-for-completion. In TX you need a
can-I-modify-the-mailbox-registers function and a now-send-the-mailbox
function.

The RX path needs first the waiting-for-free function, then the send and
then again the waiting-for-completion function. But as RX and TX use
always different interfaces the first waiting function can be removed.


cheers, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: ..., Marc Kleine-Budde, (Fri Oct 29, 5:57 am)
Re: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: ..., Marc Kleine-Budde, (Fri Oct 29, 9:23 am)
Re: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: ..., Marc Kleine-Budde, (Fri Oct 29, 10:58 am)
Re: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: ..., Marc Kleine-Budde, (Mon Nov 1, 4:05 am)
Re: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: ..., Wolfgang Grandegger, (Wed Nov 3, 9:15 am)
Re: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: ..., Wolfgang Grandegger, (Fri Nov 12, 4:45 am)