Skip to content
Snippets Groups Projects
  1. Feb 27, 2014
  2. Feb 26, 2014
    • Joe Perches's avatar
      bnx2x: Remove hidden flow control goto from BNX2X_ALLOC macros · cd2b0389
      Joe Perches authored
      
      BNX2X_ALLOC macros use "goto alloc_mem_err"
      so these labels appear unused in some functions.
      
      Expand these macros in-place via coccinelle and
      some typing.
      
      Update the macros to use statement expressions
      and remove the BNX2X_ALLOC macro.
      
      This adds some > 80 char lines.
      
      $ cat bnx2x_pci_alloc.cocci
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	BNX2X_PCI_ALLOC(e1, e2, e3);
      +	e1 = BNX2X_PCI_ALLOC(e2, e3); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	BNX2X_PCI_FALLOC(e1, e2, e3);
      +	e1 = BNX2X_PCI_FALLOC(e2, e3); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      @@
      -	BNX2X_ALLOC(e1, e2);
      +	e1 = kzalloc(e2, GFP_KERNEL); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	kzalloc(sizeof(e1) * e2, e3)
      +	kcalloc(e2, sizeof(e1), e3)
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	kzalloc(e1 * sizeof(e2), e3)
      +	kcalloc(e1, sizeof(e2), e3)
      
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd2b0389
  3. Feb 25, 2014
  4. Feb 22, 2014
    • David S. Miller's avatar
      Merge branch 'i40evf' · 3b5c8ab1
      David S. Miller authored
      
      Aaron Brown says:
      
      ====================
      Intel Wired LAN Driver Updates
      
      This series contains updates to i40e and (mostly to) i40evf.
      
      Mitch provides most the work for this series.  For the vf driver he
      requests a reset on a tx hang, removes vlan filtes on close since we
      already remove the MAC filters, fixes some crashes, gets rid of PCI DAC
      as it does not mean much on virtualized PCIe parts, skips assigning the
      device name that just gets renamed anyway, stores the descriptor ring
      size in a manner that allows the use of common tx and rx code with the
      PF driver and makes a handful of cosmetic fixes.  For i40e he removes
      a delay left over from debugging and changes a do/while loop to a for
      loop to avoid hitting another delay each time.
      
      Catherine fixes inconsistent MSI and MSI-X messages and bumps the
      driver version.
      
      v2: Removed unnecessary periods and redundant OOM message.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b5c8ab1