From patchwork Thu Mar 7 09:31:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 159810 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp7216021jad; Thu, 7 Mar 2019 01:31:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxOzbRRAS2Rwzk9zoqCBpaOmkiv6/Wi85TMGQtCB1E+fsgqM/G4PjO/PD9I2Z1Bsc1ozKRi X-Received: by 2002:a63:1155:: with SMTP id 21mr9907106pgr.96.1551951107405; Thu, 07 Mar 2019 01:31:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551951107; cv=none; d=google.com; s=arc-20160816; b=xOrxpholZaEHoYwQUovTv6gBZgmJXo7DnO6E9SdhGWtDNEUZ8CcZ810V56cHDkbV0o XbcEdeM/HPWrsDwJ9tUqlbSkgdyHsNc4ZlyygZpcF8on/fvZFpLNXBGbThxbTdVnelsb fhfNgxyWIUddxQ+vM30Okr+QAXrfir9ZVr17UeSuL19pRDdmYp8GFChs73plgv56T6Ma vhD+DTu+Mid1yoOdRGIoQ8W04yJQk5jl+jdOJiIvIB7MuRUzS6qyEKhYM9bwHauEt5KS OjF5OX0iatwjdE7D5NHrg9cDdFh434hjJ+7mbMC2O6hwe6xCd/IgV4vfcIr1xFMDurvI aVhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=uxVlx8jgCJ2ZGlRGX8tm/uOu3I+LM/9/9/nei6u8bUk=; b=YppVHxUgOyW0W8PgaVDvWRsMxuzbmHYqQ7Nc4l+pQQStpMXBEbXw5Nu2NWRdGwvobU vjBXmnZbwbv9wqIB1yJzH7njv5MtAOV0b6yCV3Qdd2V8aY/Ria74/jNdaZZ3m6/AN9C3 feyquoh4PAKCyZQfSoGX5upi4HikICn59HA5V9SYN/Wmo5DPlviGNDMWSrKh9qTWbmtI sx1JVmjtwFrdLODL5AVNtHStdEHsXx2TPs0tenkPbqSwO2sxOOHlQrPvR8XSTa1KtrSr 14D4JMiw7o4rKl/hSBXrzEIY+a5232Ac5sEunbLsaCaXEBuWo2KAJ5CM9wQD6vYanym4 z+6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si3442849pgj.415.2019.03.07.01.31.47; Thu, 07 Mar 2019 01:31:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726318AbfCGJbq (ORCPT + 5 others); Thu, 7 Mar 2019 04:31:46 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:60347 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbfCGJbq (ORCPT ); Thu, 7 Mar 2019 04:31:46 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1N0G9p-1gqMWs36Fr-00xKPP; Thu, 07 Mar 2019 10:31:37 +0100 From: Arnd Bergmann To: "David S. Miller" Cc: Nick Desaulniers , Arnd Bergmann , Grygorii Strashko , Bartosz Golaszewski , linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] davinci_emac: always build in CONFIG_OF code Date: Thu, 7 Mar 2019 10:31:20 +0100 Message-Id: <20190307093135.3354493-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:etRUGx8QeL6QeLXRQ60BTAuLTz0VVTEPwYa3rS1B1VWaaHj2I9L q0dgHKJAkEy6zQqDz2C9SUobsICWNfq04buS7Jfo40LaSsd+x+aQls6GkAmkt0C5YBrezMz 9oN1InRt7oIa9BrTloJVRnfqac8Py00hKjoflvL2ddagHnZjvBBRMw6Lna+/KDufTH17Z+c 6Cck4/xQ3ZkjsXCKhmDdQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:8OJzxD7Lm/8=:e001oIdIAnmkHtROl44u37 o6t/ebU8MAjDeD7lMuDJVMTmkJafR4Qmi8ISXrrQMlnzmTdJ9lLeNA04XX4A988WxVvNW0+f6 dOLC4oaGDHt94XFbJmD9zkq+KYWqTIrg31bVayp5cNJrNJOUNL8dwlfW0UQvcNvXW3H7MDP7T zl2z+U2m6kQjNcapkMgcC67VMGQU4NA80L+7OrivRukvRqoknF6gr7YF7SqC/ROBRVRGXI4m4 dKMLZUtoeDrTs3XIrcT0NKyxI3phAPyB2AlXFMu7uSwgUJkSjkSPXU8R1wgXm8arozaUVtXwp TQc9s5QExvyb6BWlk1FqeYmPGUeqTpWQvsBZEV0xMt3HByFaqY7Gb8Kf7gKFPCdld4W5SIgqh jziqCRrkyZAD5qAkh/1VxddY97S1kahJtRV+pd1ZTD1rHF979sMfpxWOtuipf8cUp+xq7Lup4 SzzvBrvRQMMV3sORpL8aRuZ68lVWIwFtueM/Z0lanvEo3pwu25eoPYiIJTWmEtKl+Jqw/K1Hw qk+3VuhxLIH9dhQGPnEByt3DS2Uv0CUn7+AG6gSPb7udO4tVki4/jUQeDIu/fHt3XCwQoKbXU 1pw3ckLMI2c2xdOT8yvlAIqKahzilG/opUknnlOgxPOqFw8uKFPN4fbal2bKuXUr/mRjxmrei 9H3YPEzeBuHOnNKLCh24A9zdrwbhY5D4RAH6RipNCeOYvtyqTyE05ihFlLrLnQ6MJSP/vz8Wz g5ReyOwxTKovqmHMSaTRENblIcjLyZyqLVkKAQ== Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org clang warns about what seems to be an unintended use of an obscure C language feature where a forward declaration of an array remains usable when the final definition is never seen: drivers/net/ethernet/ti/davinci_emac.c:1694:34: error: tentative array definition assumed to have one element [-Werror] static const struct of_device_id davinci_emac_of_match[]; There is no harm in always enabling the device tree matching code here, and it makes the code behave in a more conventional way aside from avoiding the warning. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/ti/davinci_emac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.20.0 Reviewed-by: Nathan Chancellor diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index 840820402cd0..57450b174fc4 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c @@ -2029,7 +2029,6 @@ static const struct dev_pm_ops davinci_emac_pm_ops = { .resume = davinci_emac_resume, }; -#if IS_ENABLED(CONFIG_OF) static const struct emac_platform_data am3517_emac_data = { .version = EMAC_VERSION_2, .hw_ram_addr = 0x01e20000, @@ -2046,14 +2045,13 @@ static const struct of_device_id davinci_emac_of_match[] = { {}, }; MODULE_DEVICE_TABLE(of, davinci_emac_of_match); -#endif /* davinci_emac_driver: EMAC platform driver structure */ static struct platform_driver davinci_emac_driver = { .driver = { .name = "davinci_emac", .pm = &davinci_emac_pm_ops, - .of_match_table = of_match_ptr(davinci_emac_of_match), + .of_match_table = davinci_emac_of_match, }, .probe = davinci_emac_probe, .remove = davinci_emac_remove,