From: Tomas Krcka <tomas.krcka@nkgroup.cz>
To: Jakub Kicinski <moorray3@wp.pl>
Cc: linux-can@vger.kernel.org, andri.yngvason@marel.com,
mkl@pengutronix.de, himangi774@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH] can: mcp251x: not correct register address
Date: Sat, 30 May 2015 10:08:33 +0200 [thread overview]
Message-ID: <CAAJk-V2=EFaSnNDg3ptNKASBUsLKxrroqaDTJHNdQ9-2vPGzMA@mail.gmail.com> (raw)
In-Reply-To: <20150530094106.72862564@north>
You are right, sorry for that. I'll send v2.
Thanks.
2015-05-30 9:41 GMT+02:00 Jakub Kicinski <moorray3@wp.pl>:
> On Mon, 25 May 2015 08:57:48 +0200, Tomas Krcka wrote:
>> This patch corrects addresses of acceptance filters.
>> These registers are not in use, but values should be correct.
>> Tested with MCP2515 and am3352 and also checked datasheets for MCP2515
>> and MCP2510.
>>
>> Signed-off-by: Tomas Krcka <tomas.krcka@nkgroup.cz>
>>
>> ---
>> drivers/net/can/spi/mcp251x.c | 9 +++++----
>> 1 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c
>> index bf63fee..c1a95a3 100644
>> --- a/drivers/net/can/spi/mcp251x.c
>> +++ b/drivers/net/can/spi/mcp251x.c
>> @@ -190,10 +190,11 @@
>> #define RXBEID0_OFF 4
>> #define RXBDLC_OFF 5
>> #define RXBDAT_OFF 6
>> -#define RXFSIDH(n) ((n) * 4)
>> -#define RXFSIDL(n) ((n) * 4 + 1)
>> -#define RXFEID8(n) ((n) * 4 + 2)
>> -#define RXFEID0(n) ((n) * 4 + 3)
>> +#define RXFSID(n) ((n < 3) ? 0 : 4)
>> +#define RXFSIDH(n) ((n) * 4 + RXFSID(n))
>> +#define RXFSIDL(n) ((n) * 4 + 1 + RXFSID(n))
>> +#define RXFEID8(n) ((n) * 4 + 2 + RXFSID(n))
>> +#define RXFEID0(n) ((n) * 4 + 3 + RXFSID(n))
>> #define RXMSIDH(n) ((n) * 4 + 0x20)
>> #define RXMSIDL(n) ((n) * 4 + 0x21)
>> #define RXMEID8(n) ((n) * 4 + 0x22)
>
> I think your patch was corrupted. It doesn't apply because you have
> extra space before each surviving #define.
prev parent reply other threads:[~2015-05-30 8:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-25 6:57 [PATCH] can: mcp251x: not correct register address Tomas Krcka
2015-05-30 7:41 ` Jakub Kicinski
2015-05-30 8:08 ` Tomas Krcka [this message]
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='CAAJk-V2=EFaSnNDg3ptNKASBUsLKxrroqaDTJHNdQ9-2vPGzMA@mail.gmail.com' \
--to=tomas.krcka@nkgroup.cz \
--cc=andri.yngvason@marel.com \
--cc=himangi774@gmail.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=moorray3@wp.pl \
--cc=netdev@vger.kernel.org \
/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).