From patchwork Wed Jul 20 19:43:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lamparter X-Patchwork-Id: 105802 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B9F3FB6F6F for ; Thu, 21 Jul 2011 05:44:44 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751888Ab1GTToj (ORCPT ); Wed, 20 Jul 2011 15:44:39 -0400 Received: from spaceboyz.net ([87.106.131.203]:60523 "EHLO spaceboyz.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695Ab1GTToi (ORCPT ); Wed, 20 Jul 2011 15:44:38 -0400 Received: from [2001:8d8:81:5c2::] (helo=jupiter.n2.diac24.net) by spaceboyz.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Qjch4-0005S7-VO; Wed, 20 Jul 2011 21:44:31 +0200 Received: from equinox by jupiter.n2.diac24.net with local (Exim 4.76) (envelope-from ) id 1Qjcgz-0034F9-E8; Wed, 20 Jul 2011 21:44:27 +0200 From: David Lamparter Cc: Stephen Rothwell , netdev , linux-next@vger.kernel.org, linux-kernel , David Lamparter , linux-driver@qlogic.com, Anirban Chakraborty , "David S. Miller" , Randy Dunlap Subject: [PATCH] net: vlan: fix compile breakage from 69ecca8 Date: Wed, 20 Jul 2011 21:43:53 +0200 Message-Id: <1311191033-714631-1-git-send-email-equinox@diac24.net> X-Mailer: git-send-email 1.7.5.3 In-Reply-To: <0E5EAE44-204C-4F4D-926C-F4D973B0CDB1@qlogic.com> References: <0E5EAE44-204C-4F4D-926C-F4D973B0CDB1@qlogic.com> To: unlisted-recipients:; (no To-header on input) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org well, there was too much wood to see the tree and I messed up the configuration dependencies. let's make it work with unset CONFIG_VLAN_8021Q and remove the second definition of vlan_find_dev. Signed-off-by: David Lamparter Cc: linux-driver@qlogic.com Cc: Anirban Chakraborty Cc: David S. Miller Cc: Randy Dunlap Reported-by: Randy Dunlap Acked-by: Randy Dunlap --- sorry for the mess-up... compiled with CONFIG_VLAN_8021Q=n,m and y this time; don't have qlcnic hw to test. drivers/net/qlcnic/qlcnic_main.c | 4 +++- include/linux/if_vlan.h | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 3579229..a2c39e9 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -4198,13 +4198,15 @@ static void qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event) { struct qlcnic_adapter *adapter = netdev_priv(netdev); - struct vlan_group *grp; + struct vlan_group *grp = NULL; struct net_device *dev; u16 vid; qlcnic_config_indev_addr(adapter, netdev, event); +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) grp = rcu_dereference_rtnl(netdev->vlgrp); +#endif if (!grp) return; diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index bc03e40..dbe41dc 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -135,11 +135,6 @@ vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, unsigned int vlan_tci); #else -static inline struct net_device *vlan_find_dev(struct net_device *real_dev, - u16 vlan_id) -{ - return NULL; -} static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) {