From patchwork Tue Sep 29 03:04:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 259984 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89E30C4727F for ; Tue, 29 Sep 2020 03:05:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12DB621734 for ; Tue, 29 Sep 2020 03:05:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="IDAq7OZA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727300AbgI2DFC (ORCPT ); Mon, 28 Sep 2020 23:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726944AbgI2DFB (ORCPT ); Mon, 28 Sep 2020 23:05:01 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64985C061755; Mon, 28 Sep 2020 20:05:01 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4C0klF3yGSz9s1t; Tue, 29 Sep 2020 13:04:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1601348697; bh=/QSIT6Tfgaxw+JmY9/F6hMsZ8bc6dWqVnIszkkrLOVE=; h=Date:From:To:Cc:Subject:From; b=IDAq7OZAH1PVcYkJ45gA2TXczwKRWwk3YQEl90qdwT7duObPUXBwYp5ggGZivY4RV oSBm8wiwDC44i0p6cW3hiWBTiFEUmh4o3U1/F60kdKzgAHC1iVVkmCm7gmQdfHn/FK MmD2gxkX2kgCRMXEbcMDhgM3AVKRVTPD/lUDPfoJWeUwoUJqDnMYbJQbMwpn17iAa+ D9xGbMqQYqm+uwv+cfbY6xcm/l6kL7/DYY4IRxPdV+58ndOO4QDyMCuA7njlx5TLLV 8EPKeHdrhDJx4cJv3sCwcP5NmB1kFeSrmNKERFr1eaSYB9tLts/17UM+ydpCU5dbOQ bsUFlvs/JY53g== Date: Tue, 29 Sep 2020 13:04:46 +1000 From: Stephen Rothwell To: David Miller , Networking Cc: Vadym Kochan , Taehee Yoo , Linux Next Mailing List , Linux Kernel Mailing List Subject: linux-next: build failure after merge of the net-next tree Message-ID: <20200929130446.0c2630d2@canb.auug.org.au> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi all, After merging the net-next tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/net/ethernet/marvell/prestera/prestera_main.c: In function 'prestera_port_dev_lower_find': drivers/net/ethernet/marvell/prestera/prestera_main.c:504:33: error: passing argument 2 of 'netdev_walk_all_lower_dev' from incompatible pointer type [-Werror=incompatible-pointer-types] 504 | netdev_walk_all_lower_dev(dev, prestera_lower_dev_walk, &port); | ^~~~~~~~~~~~~~~~~~~~~~~ | | | int (*)(struct net_device *, void *) In file included from include/linux/etherdevice.h:21, from drivers/net/ethernet/marvell/prestera/prestera_main.c:4: include/linux/netdevice.h:4571:16: note: expected 'int (*)(struct net_device *, struct netdev_nested_priv *)' but argument is of type 'int (*)(struct net_device *, void *)' 4571 | int (*fn)(struct net_device *lower_dev, | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4572 | struct netdev_nested_priv *priv), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/marvell/prestera/prestera_main.c:504:58: error: passing argument 3 of 'netdev_walk_all_lower_dev' from incompatible pointer type [-Werror=incompatible-pointer-types] 504 | netdev_walk_all_lower_dev(dev, prestera_lower_dev_walk, &port); | ^~~~~ | | | struct prestera_port ** In file included from include/linux/etherdevice.h:21, from drivers/net/ethernet/marvell/prestera/prestera_main.c:4: include/linux/netdevice.h:4573:37: note: expected 'struct netdev_nested_priv *' but argument is of type 'struct prestera_port **' 4573 | struct netdev_nested_priv *priv); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ cc1: some warnings being treated as errors Caused by commit eff7423365a6 ("net: core: introduce struct netdev_nested_priv for nested interface infrastructure") interacting with commit e1189d9a5fbe ("net: marvell: prestera: Add Switchdev driver implementation") also in the net-next tree. I applied the following fix patch. From: Stephen Rothwell Date: Tue, 29 Sep 2020 12:57:59 +1000 Subject: [PATCH] fix up for "net: core: introduce struct netdev_nested_priv for nested interface infrastructure" Signed-off-by: Stephen Rothwell --- drivers/net/ethernet/marvell/prestera/prestera_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c index 9bd57b89d1d0..633d8770be35 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_main.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c @@ -482,9 +482,10 @@ bool prestera_netdev_check(const struct net_device *dev) return dev->netdev_ops == &prestera_netdev_ops; } -static int prestera_lower_dev_walk(struct net_device *dev, void *data) +static int prestera_lower_dev_walk(struct net_device *dev, + struct netdev_nested_priv *priv) { - struct prestera_port **pport = data; + struct prestera_port **pport = (struct prestera_port **)priv->data; if (prestera_netdev_check(dev)) { *pport = netdev_priv(dev); @@ -497,11 +498,13 @@ static int prestera_lower_dev_walk(struct net_device *dev, void *data) struct prestera_port *prestera_port_dev_lower_find(struct net_device *dev) { struct prestera_port *port = NULL; + struct netdev_nested_priv priv; if (prestera_netdev_check(dev)) return netdev_priv(dev); - netdev_walk_all_lower_dev(dev, prestera_lower_dev_walk, &port); + priv.data = (void *)&port; + netdev_walk_all_lower_dev(dev, prestera_lower_dev_walk, &priv); return port; }