netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Roopa Prabhu <roprabhu@cisco.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [net-next-2.6 PATCH] enic: fix compile when CONFIG_PCI_IOV is not	enabled
Date: Fri, 20 Jan 2012 14:49:41 -0800	[thread overview]
Message-ID: <4F19EF85.4040807@xenotime.net> (raw)
In-Reply-To: <20120120082536.18521.86316.stgit@savbu-pc100.cisco.com>

On 01/20/2012 12:25 AM, Roopa Prabhu wrote:
> From: Roopa Prabhu <roprabhu@cisco.com>
> 
> reverting back change that access enic->num_vfs outside
> CONFIG_PCI_IOV
> 
> Reported-by: Randy Dunlap <rdunlap@xenotime.net>
> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>

Acked-by: Randy Dunlap <rdunlap@xenotime.net>

Thanks.

> ---
>  drivers/net/ethernet/cisco/enic/enic_main.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
> index 045c468..ab3f67f 100644
> --- a/drivers/net/ethernet/cisco/enic/enic_main.c
> +++ b/drivers/net/ethernet/cisco/enic/enic_main.c
> @@ -2273,7 +2273,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
>  #ifdef CONFIG_PCI_IOV
>  	int pos = 0;
>  #endif
> -	int num_pps;
> +	int num_pps = 1;
>  
>  	/* Allocate net device structure and initialize.  Private
>  	 * instance data is initialized to zero.
> @@ -2380,11 +2380,11 @@ static int __devinit enic_probe(struct pci_dev *pdev,
>  				goto err_out_vnic_unregister;
>  			}
>  			enic->priv_flags |= ENIC_SRIOV_ENABLED;
> +			num_pps = enic->num_vfs;
>  		}
>  	}
>  #endif
>  
> -	num_pps = enic->num_vfs ? enic->num_vfs : 1;
>  	/* Allocate structure for port profiles */
>  	enic->pp = kcalloc(num_pps, sizeof(*enic->pp), GFP_KERNEL);
>  	if (!enic->pp) {
> 
> --


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

      parent reply	other threads:[~2012-01-20 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20  8:25 [net-next-2.6 PATCH] enic: fix compile when CONFIG_PCI_IOV is not enabled Roopa Prabhu
2012-01-20 18:40 ` David Miller
2012-01-21  8:03   ` Roopa Prabhu
2012-01-20 22:49 ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F19EF85.4040807@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=roprabhu@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).