Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3335898rwa; Tue, 23 Aug 2022 03:05:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Uxth/0bw6JWe96kE8dR4zCl5sRyP2apUxzwH0tVwtedGFswShErlFtTNKzYrsccKy//kA X-Received: by 2002:a17:906:4fd3:b0:733:8be:24f8 with SMTP id i19-20020a1709064fd300b0073308be24f8mr16207756ejw.767.1661249124491; Tue, 23 Aug 2022 03:05:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661249124; cv=none; d=google.com; s=arc-20160816; b=KEPRuu8H5nC2UK3b/Okr5JhBQNlypm8c2ITwN9anjShp8QDPSZXcoPDvd8VWq43txv OAlJDR33nW8pic/pb4++VUr2b1fgAr08EQnEbVmT2E+jN+fuucvDGC9YkDwtiZ/Ebpa3 rTd/UM+xKmB0ATZGYGGyyWj6gmnFoCYMOMBv7Q7g7eT3LmeNEMM9/pAVH4mwovU1jDZL HipSzsTrgYHY0sHFWbtvmdVrGlI3cZpjCup6vjMmI6ErnCkE7TBq3FEr1TUij5Fj+R/g qp9EqJVlsoG4hFx44oP0yAHnIjqXnKFD7PaH5Wwn1sX128vkXDUAxNrOJ89b/CXCVvGi I59Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qhc0QEYFAawPNNzhw2Hh4LWZ5YlCuqmYOMuC6eEQpZY=; b=ekGcEj23+SAKCTB8zPWNbty6pWNXAMtqEmDqvI36geJCpoHLZ1yOvPWXuZ868KWbvE ujjVJpboFnEvTrysEOiIl3wjLYwSfwM6ZZr+o+zqRoAY07UqY9WThKiBvba4eZEesFF4 hcSnMD+irAK93+d3m2WQOdv7B2fE7jWgxNQu35EiH9QS1OURVunfmURHIiFDm6RMWnwE bVv/u1yB/GIBMxcmMxBcx2or+GVmVx9Typ+F4av5I2tfa2h5ju1ZVZZz4Uu7hr08n1dk aqh8s6R3CwLbO5UjlxLEbirY5UqQAeT6JfyYsVF40qR5S+2TmDVnzFua3dh5xNVwudqk a0UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h3aQzwIe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs24-20020a170906f19800b00730a1f55ac8si9181750ejb.821.2022.08.23.03.04.56; Tue, 23 Aug 2022 03:05:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h3aQzwIe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243142AbiHWJ6W (ORCPT + 99 others); Tue, 23 Aug 2022 05:58:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243051AbiHWJxP (ORCPT ); Tue, 23 Aug 2022 05:53:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83FC77B28A; Tue, 23 Aug 2022 01:46:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 75153B81C35; Tue, 23 Aug 2022 08:45:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8AFAC433D6; Tue, 23 Aug 2022 08:45:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244332; bh=noez/ZkmF/rf36ZF4kOxe89YB9P/7CZvBLY6FVVeh3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h3aQzwIeyQFD9qRiu0GTB4LzxZtBX0UXxFviFEFSnY8L/nhs3Rpsvx+12xOEfQrSi wQwPf/Ai2YOM+S6igGioJG8O+XdnUiZyX9/Rziv+GNP8UKXIRZ+tUC5s67o7F6tQUf /4oXJq5GvT6pQRKhjTWICJ0aO0mdPKi4vzwRhewU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Greg Ungerer , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, uclinux-dev@uclinux.org, Angelo Dureghello Subject: [PATCH 5.15 052/244] m68k: coldfire/device.c: protect FLEXCAN blocks Date: Tue, 23 Aug 2022 10:23:31 +0200 Message-Id: <20220823080100.798237693@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap commit 3c2bf173501652fced1d058834e9c983d295b126 upstream. 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 Cc: Greg Ungerer Cc: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Cc: uclinux-dev@uclinux.org Cc: Angelo Dureghello Signed-off-by: Greg Ungerer Signed-off-by: Greg Kroah-Hartman --- arch/m68k/coldfire/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/m68k/coldfire/device.c b/arch/m68k/coldfire/device.c index 4218750414bb..7dab46728aed 100644 --- 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 @@ -620,7 +620,7 @@ static struct platform_device mcf_flexcan0 = { .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_devices[] __initdata = { #ifdef MCFSDHC_BASE &mcf_esdhc, #endif -#if IS_ENABLED(CONFIG_CAN_FLEXCAN) +#ifdef MCFFLEXCAN_SIZE &mcf_flexcan0, #endif }; -- 2.37.2