From: Greg Ungerer <gerg@linux-m68k.org>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
linux-m68k@lists.linux-m68k.org, uclinux-dev@uclinux.org,
Angelo Dureghello <angelo@kernel-space.org>
Subject: Re: [PATCH] m68k: coldfire/device.c: protect FLEXCAN blocks
Date: Mon, 6 Jun 2022 13:37:10 +1000 [thread overview]
Message-ID: <6f553593-2dc5-a631-628b-51ecbdd0290a@linux-m68k.org> (raw)
In-Reply-To: <20220531021712.6050-1-rdunlap@infradead.org>
Hi Randy,
On 31/5/22 12:17, Randy Dunlap wrote:
> When CAN_FLEXCAN=y and M5441x is not set/enabled, there are build
> errors in coldfire/device.c:
>
> ../arch/m68k/coldfire/device.c:595:26: error: 'MCFFLEXCAN_BASE0' undeclared here (not in a function); did you mean 'MCFDMA_BASE0'?
> 595 | .start = MCFFLEXCAN_BASE0,
> ../arch/m68k/coldfire/device.c:596:43: error: 'MCFFLEXCAN_SIZE' undeclared here (not in a function)
> 596 | .end = MCFFLEXCAN_BASE0 + MCFFLEXCAN_SIZE,
> ../arch/m68k/coldfire/device.c:600:26: error: 'MCF_IRQ_IFL0' undeclared here (not in a function); did you mean 'MCF_IRQ_I2C0'?
> 600 | .start = MCF_IRQ_IFL0,
> ../arch/m68k/coldfire/device.c:605:26: error: 'MCF_IRQ_BOFF0' undeclared here (not in a function); did you mean 'MCF_IRQ_I2C0'?
> 605 | .start = MCF_IRQ_BOFF0,
> ../arch/m68k/coldfire/device.c:610:26: error: 'MCF_IRQ_ERR0' undeclared here (not in a function); did you mean 'MCF_IRQ_I2C0'?
> 610 | .start = MCF_IRQ_ERR0,
>
> Protect the FLEXCAN code blocks by checking if MCFFLEXCAN_SIZE
> is defined.
>
> Fixes: 35a9f9363a89 ("m68k: m5441x: add flexcan support")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Greg Ungerer <gerg@linux-m68k.org>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: linux-m68k@lists.linux-m68k.org
> Cc: uclinux-dev@uclinux.org
> Cc: Angelo Dureghello <angelo@kernel-space.org>
Thanks. Added to the m68knommu git tree, for-next branch.
Regards
Greg
> ---
> arch/m68k/coldfire/device.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --- a/arch/m68k/coldfire/device.c
> +++ b/arch/m68k/coldfire/device.c
> @@ -581,7 +581,7 @@ static struct platform_device mcf_esdhc
> };
> #endif /* MCFSDHC_BASE */
>
> -#if IS_ENABLED(CONFIG_CAN_FLEXCAN)
> +#ifdef MCFFLEXCAN_SIZE
>
> #include <linux/can/platform/flexcan.h>
>
> @@ -620,7 +620,7 @@ static struct platform_device mcf_flexca
> .resource = mcf5441x_flexcan0_resource,
> .dev.platform_data = &mcf5441x_flexcan_info,
> };
> -#endif /* IS_ENABLED(CONFIG_CAN_FLEXCAN) */
> +#endif /* MCFFLEXCAN_SIZE */
>
> static struct platform_device *mcf_devices[] __initdata = {
> &mcf_uart,
> @@ -657,7 +657,7 @@ static struct platform_device *mcf_devic
> #ifdef MCFSDHC_BASE
> &mcf_esdhc,
> #endif
> -#if IS_ENABLED(CONFIG_CAN_FLEXCAN)
> +#ifdef MCFFLEXCAN_SIZE
> &mcf_flexcan0,
> #endif
> };
prev parent reply other threads:[~2022-06-06 3:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 2:17 Randy Dunlap
2022-06-06 3:37 ` Greg Ungerer [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=6f553593-2dc5-a631-628b-51ecbdd0290a@linux-m68k.org \
--to=gerg@linux-m68k.org \
--cc=angelo@kernel-space.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=rdunlap@infradead.org \
--cc=uclinux-dev@uclinux.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
all inboxes | Powered by JetHome®