From patchwork Fri Jul 24 00:44:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dave Jones X-Patchwork-Id: 30153 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id DEFCBB7067 for ; Fri, 24 Jul 2009 10:45:01 +1000 (EST) Received: by ozlabs.org (Postfix) id D2CABDDD1B; Fri, 24 Jul 2009 10:45:01 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 6759FDDD0B for ; Fri, 24 Jul 2009 10:45:01 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751681AbZGXAoy (ORCPT ); Thu, 23 Jul 2009 20:44:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751578AbZGXAox (ORCPT ); Thu, 23 Jul 2009 20:44:53 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43758 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbZGXAox (ORCPT ); Thu, 23 Jul 2009 20:44:53 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6O0iq7d014997; Thu, 23 Jul 2009 20:44:52 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6O0ipsu015110; Thu, 23 Jul 2009 20:44:51 -0400 Received: from gelk.kernelslacker.org (vpn-10-71.bos.redhat.com [10.16.10.71]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6O0iopG011245; Thu, 23 Jul 2009 20:44:50 -0400 Received: from gelk.kernelslacker.org (gelk.kernelslacker.org [127.0.0.1]) by gelk.kernelslacker.org (8.14.3/8.14.3) with ESMTP id n6O0ioxv016428; Thu, 23 Jul 2009 20:44:50 -0400 Received: (from davej@localhost) by gelk.kernelslacker.org (8.14.3/8.14.3/Submit) id n6O0inlI016426; Thu, 23 Jul 2009 20:44:49 -0400 X-Authentication-Warning: gelk.kernelslacker.org: davej set sender to davej@redhat.com using -f Date: Thu, 23 Jul 2009 20:44:49 -0400 From: Dave Jones To: David Miller Cc: netdev@vger.kernel.org Subject: Re: [1/4 v2] Remove unused zero-copy code from velocity NIC driver. Message-ID: <20090724004449.GA16422@redhat.com> References: <20090721.123202.173837534.davem@davemloft.net> <20090721.123227.85658631.davem@davemloft.net> <20090721.123322.118453668.davem@davemloft.net> <20090723.155855.108555685.davem@davemloft.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090723.155855.108555685.davem@davemloft.net> User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jul 23, 2009 at 03:58:55PM -0700, David Miller wrote: > From: David Miller > Date: Tue, 21 Jul 2009 12:33:22 -0700 (PDT) > > > Ok, all applied to net-next-2.6, thanks. > > Ok, now we have a stinking pile of poo situation when one tries to > compile the velocity driver without CONFIG_PM defined. > > First we hit: > > drivers/net/via-velocity.c: In function ‘velocity_init_module’: > drivers/net/via-velocity.c:3303: error: implicit declaration of function ‘velocity_register_notifier’ > drivers/net/via-velocity.c:3306: error: implicit declaration of function ‘velocity_unregister_notifier’ > > Because the whole CONFIG_PM + CONFIG_INET ifdeffery around these functions > was missed up. Simple enough to fix, but then we get: > > drivers/net/via-velocity.c:2957: warning: ‘velocity_suspend’ defined but not used > drivers/net/via-velocity.c:3026: warning: ‘velocity_resume’ defined but not used > > Fine, let's ifdef protect these two functions with CONFIG_PM: > > drivers/net/via-velocity.c:2853: warning: ‘velocity_set_wol’ defined but not used > drivers/net/via-velocity.c:2939: warning: ‘velocity_save_context’ defined but not used > drivers/net/via-velocity.c:3001: warning: ‘velocity_restore_context’ defined but not used > > And at this point I really give up Dave. This whole thing to move > functions around to avoid forward decls has created a worse problem > than it solved. > > Unless you can fix this, like, immediately. I want to revert. > > This is keeping me from pulling more work into my net-next-2.6 > tree. apologies.. This should fix it.. Dave diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index b4bd1d3..47be41a 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -2805,6 +2805,7 @@ err_free_dev: } +#ifdef CONFIG_PM /** * wol_calc_crc - WOL CRC * @pattern: data pattern @@ -2952,7 +2953,6 @@ static void velocity_save_context(struct velocity_info *vptr, struct velocity_co } - static int velocity_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); @@ -3056,7 +3056,7 @@ static int velocity_resume(struct pci_dev *pdev) return 0; } - +#endif /* * Definition for our device driver. The PCI layer interface @@ -3239,7 +3239,6 @@ static const struct ethtool_ops velocity_ethtool_ops = { }; #ifdef CONFIG_PM - #ifdef CONFIG_INET static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) { @@ -3263,6 +3262,7 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi return NOTIFY_DONE; } #endif /* CONFIG_INET */ +#endif /* CONFIG_PM */ #if defined(CONFIG_PM) && defined(CONFIG_INET) static struct notifier_block velocity_inetaddr_notifier = { @@ -3286,8 +3286,6 @@ static void velocity_unregister_notifier(void) #endif /* defined(CONFIG_PM) && defined(CONFIG_INET) */ -#endif /* CONFIG_PM */ - /** * velocity_init_module - load time function *