Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 07/18] isdn: avm: call disable_pci_device() if pci_probe() failed
From: David Miller @ 2010-08-08  5:34 UTC (permalink / raw)
  To: segooon; +Cc: kernel-janitors, isdn, adobriyan, tilman, netdev
In-Reply-To: <1281124303-13537-1-git-send-email-segooon@gmail.com>

From: Kulikov Vasiliy <segooon@gmail.com>
Date: Fri,  6 Aug 2010 23:51:41 +0400

> Driver should call disable_pci_device() if it returns from pci_probe()

"pci_disable_device()"

> with error. Also it must not be called if request_region() fails as
> it means that somebody uses device resources and rules the device.

This interface, frankly, sucks.

If this is what we want then pci_enable_device() and
pci_disable_device() should maintain a reference count,
so that device drivers need not be mindful of what
arbitrary special circumstances they should make the
disable call or not.  They can make it unconditionally
and the PCI layer makes sure the device doesn't get
disabled unintentionally.

This is software interface design 101.

The current requirements are beyond unreasonable and
should be fixed before we apply patches like this.

I'm tossing all of these patches, sorry.

^ permalink raw reply

* Re: [PATCH] sfq: add dummy bind/unbind handles
From: David Miller @ 2010-08-08  5:45 UTC (permalink / raw)
  To: jarkao2; +Cc: shemminger, netdev, franchoze
In-Reply-To: <4C5C97F3.3010604@gmail.com>

From: Jarek Poplawski <jarkao2@gmail.com>
Date: Sat, 07 Aug 2010 01:17:07 +0200

> Stephen Hemminger wrote, On 07.08.2010 00:23:
> 
>> Applying a filter to an SFQ qdisc would cause null dereference
>> in tcf_bind_filter because although SFQ is classful it didn't
>> have all the necessary equipment.
>> 
>> Better alternative to changing tcf_bind API is to just fix
>> SFQ.  This should go to net-2.6 and stable.
>> 
> 
> Hmm... FYI, actually I've sent already a similar patch to the
> original bug report thread (except .unbind_tcf method which
> doesn't matter for fixing this bug, so should be rather
> implemented in a separate patch, if needed at all in this
> case).

Agreed, I can't see a way that unbind can ever be invoked
if the bind call always returns zero.

Therefore I'll apply Jarek's patch, thanks everyone.

^ permalink raw reply

* Re: [PATCH 1/9] net classifier: dont allow filters on semi-classful qdisc
From: David Miller @ 2010-08-08  5:59 UTC (permalink / raw)
  To: jarkao2; +Cc: shemminger, netdev
In-Reply-To: <4C5C8C09.9070206@gmail.com>

From: Jarek Poplawski <jarkao2@gmail.com>
Date: Sat, 07 Aug 2010 00:26:17 +0200

> Stephen Hemminger wrote, On 06.08.2010 23:58:
> 
>> On Fri, 06 Aug 2010 23:24:47 +0200
>> Jarek Poplawski <jarkao2@gmail.com> wrote:
>> 
>>> Stephen Hemminger wrote, On -10.01.-28163 20:59:
>>>
>>>> There are several qdisc which only support a single class (sfq, mq, tbf)
>>>> and the kernel would dereference a null pointer (bind_tcf), if a user
>>>> attempted to apply a filter one of these classes.
>>>
>>>
>>> mq and tbf can't have this issue because they don't have
>>> .tcf_chain class method. sfq should support it on purpose
>>> after this patch:
>>>
>>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7d2681a6ff4f9ab5e48d02550b4c6338f1638998
>>> and needs tiny fix only.
>> 
>> Probably best to fix both ways.  Fix sfq to allow filters to
>> be chained, and fix API to prevent refuse to allow qdisc to
>> register with tcf_chain && !bind_tcf
>> 
> 
> Yes, but your patch needs a different changelog and I'm not sure
> it's necessary for stable (there should be no other such cases
> for now).

Right.

I'm tossing this series since there are dependencies upon this first
patch for which we've arrived at a different solution (Jarek's
patch).

^ permalink raw reply

* Re: [PATCH 2/2] igbvf.txt: Add igbvf Documentation
From: David Miller @ 2010-08-08  6:01 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, linux-kernel, gospo, bphilips
In-Reply-To: <20100804001615.6571.69837.stgit@localhost.localdomain>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 03 Aug 2010 17:16:17 -0700

> Adds documentation for the igbvf (igb virtual function driver).
> 
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>

Tons of trailing whitespace, GIT nearly craps itself when I try
to apply this.

Please fix this, and also submit the fixed up 1/1 ixgbe.txt doc patch
and even more importantly the ixgbe FCOE build fix you promised I'd
have two nights ago :-)

Thanks.

^ permalink raw reply

* Re: [PATCH] solos-pci: Fix race condition in tasklet RX handling
From: David Miller @ 2010-08-08  6:02 UTC (permalink / raw)
  To: dwmw2; +Cc: netdev, nathan, linux-atm-general
In-Reply-To: <1281111456.2715.29.camel@localhost>

From: David Woodhouse <dwmw2@infradead.org>
Date: Fri, 06 Aug 2010 17:17:36 +0100

> We were seeing faults in the solos-pci receive tasklet when packets
> arrived for a VCC which was currently being closed:
 ...
> This patch uses an RCU-inspired approach to fix it. In the RX tasklet's
> find_vcc() function we first refuse to use a VCC which already has the
> ATM_VF_READY bit cleared. And in the VCC close function, we synchronise
> with the tasklet to ensure that it can't still be using the VCC before
> we continue and allow the VCC to be destroyed.
> 
> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
> Tested-by: Nathan Williams <nathan@traverse.com.au>
> Cc: stable@kernel.org

Applied, thanks David.

^ permalink raw reply

* Re: [patch] isdn: gigaset: use after free
From: David Miller @ 2010-08-08  6:04 UTC (permalink / raw)
  To: error27
  Cc: hjlipp, tilman, isdn, tj, joe, gigaset307x-common, netdev,
	kernel-janitors
In-Reply-To: <20100806082126.GT9031@bicker>

From: Dan Carpenter <error27@gmail.com>
Date: Fri, 6 Aug 2010 10:21:26 +0200

> I moved the kfree(cb) below the dereferences.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied.

^ permalink raw reply

* Re: [patch] isdn: gigaset: add missing unlock
From: David Miller @ 2010-08-08  6:04 UTC (permalink / raw)
  To: error27
  Cc: hjlipp, tilman, isdn, ext-andriy.shevchenko, gigaset307x-common,
	netdev, kernel-janitors
In-Reply-To: <20100806082323.GU9031@bicker>

From: Dan Carpenter <error27@gmail.com>
Date: Fri, 6 Aug 2010 10:23:23 +0200

> We should unlock here.  This is the only place where we return from the
> function with the lock held.  The caller isn't expecting it.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH NEXT 1/1] netxen: protect tx timeout recovery by rtnl lock
From: David Miller @ 2010-08-08  6:05 UTC (permalink / raw)
  To: amit.salecha; +Cc: netdev, ameen.rahman
In-Reply-To: <1281101611-16893-1-git-send-email-amit.salecha@qlogic.com>

From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Fri,  6 Aug 2010 06:33:31 -0700

> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] phy: SMSC: fix unused warnings when built into kernel
From: David Miller @ 2010-08-08  6:08 UTC (permalink / raw)
  To: bhutchings; +Cc: xiaosuo, vapier, netdev
In-Reply-To: <1281099435.2088.2.camel@achroite.uk.solarflarecom.com>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 06 Aug 2010 13:57:15 +0100

> On Fri, 2010-08-06 at 14:43 +0800, Changli Gao wrote:
>> On Fri, Aug 6, 2010 at 2:27 PM, Mike Frysinger <vapier@gentoo.org> wrote:
>> > If the SMSC phy is not built as a module, we get the warning:
>> >        drivers/net/phy/smsc.c:257: warning: 'smsc_tbl' defined but not used
>> >
>> > So mark the structure as maybe unused to avoid this.
>> >
>> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>> > ---
>> >  drivers/net/phy/smsc.c |    2 +-
>> >  1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
>> > index 78fa988..11944ef 100644
>> > --- a/drivers/net/phy/smsc.c
>> > +++ b/drivers/net/phy/smsc.c
>> > @@ -254,7 +254,7 @@ MODULE_LICENSE("GPL");
>> >  module_init(smsc_init);
>> >  module_exit(smsc_exit);
>> >
>> > -static struct mdio_device_id smsc_tbl[] = {
>> > +static __maybe_unused struct mdio_device_id smsc_tbl[] = {
>> >        { 0x0007c0a0, 0xfffffff0 },
>> >        { 0x0007c0b0, 0xfffffff0 },
>> >        { 0x0007c0c0, 0xfffffff0 },
>> 
>> How about adding a #ifdef CONFIG_SMSC_PHY_MODULE clause  around these lines?
> 
> By default, gcc will discard unused variables and functions declared as
> static.  So this would not provide any run-time benefit.

We never have to do this for any other module device table, because
usually the table is actually used for the probing.

The MDIO ones are special in that they are only used for assisting in
module probing.

I would suggest that, in light of this, we make MODULE_DEVICE_TABLE()
make a dummy reference to the table.

Otherwise we're likely going going to have to add these ugly tags to
every single PHY driver.


^ permalink raw reply

* Re: [PATCH] sfq: add dummy bind/unbind handles
From: Jarek Poplawski @ 2010-08-08  7:04 UTC (permalink / raw)
  To: David Miller; +Cc: shemminger, netdev, franchoze
In-Reply-To: <20100807.224514.137860816.davem@davemloft.net>

David Miller wrote, On 08.08.2010 07:45:

> From: Jarek Poplawski <jarkao2@gmail.com>
> Date: Sat, 07 Aug 2010 01:17:07 +0200
> 
>> Stephen Hemminger wrote, On 07.08.2010 00:23:
>>
>>> Applying a filter to an SFQ qdisc would cause null dereference
>>> in tcf_bind_filter because although SFQ is classful it didn't
>>> have all the necessary equipment.
>>>
>>> Better alternative to changing tcf_bind API is to just fix
>>> SFQ.  This should go to net-2.6 and stable.
>>>
>>
>> Hmm... FYI, actually I've sent already a similar patch to the
>> original bug report thread (except .unbind_tcf method which
>> doesn't matter for fixing this bug, so should be rather
>> implemented in a separate patch, if needed at all in this
>> case).
> 
> Agreed, I can't see a way that unbind can ever be invoked
> if the bind call always returns zero.

To tell the truth, I think unbind should be implemented anyway,
just for consistency, safety, and easier verification. But, looking
at a similar case of .get and .put in the same driver, Patrick
seemed to do it purposely, so I expected some discussion about the
rules yet, and made it minimal to ease merging to older kernels.
 
Thanks,
Jarek P.

^ permalink raw reply

* [PATCH] pcnet_cs: Use proper netdev_*-printouts
From: Wolfram Sang @ 2010-08-08 12:32 UTC (permalink / raw)
  To: netdev
  Cc: linux-pcmcia, Wolfram Sang, Dominik Brodowski, Joe Perches,
	David Miller

To prevent broken messages like:

[  204.024291] eth%d: pcnet_reset_8390() did not complete.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>
---

There are 5 checkpatch-warnings regarding indentation. I did not fix them to
keep the style of the rest of the driver. The code looks correct to me.

 drivers/net/pcmcia/pcnet_cs.c |   58 +++++++++++++++++++----------------------
 1 files changed, 27 insertions(+), 31 deletions(-)

diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index bfdef72..e127923 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -646,12 +646,12 @@ static int pcnet_config(struct pcmcia_device *link)
 
     if (info->flags & (IS_DL10019|IS_DL10022)) {
 	u_char id = inb(dev->base_addr + 0x1a);
-	printk(KERN_INFO "%s: NE2000 (DL100%d rev %02x): ",
-	       dev->name, ((info->flags & IS_DL10022) ? 22 : 19), id);
+	netdev_info(dev, "NE2000 (DL100%d rev %02x): ",
+	       (info->flags & IS_DL10022) ? 22 : 19, id);
 	if (info->pna_phy)
 	    printk("PNA, ");
     } else {
-	printk(KERN_INFO "%s: NE2000 Compatible: ", dev->name);
+	netdev_info(dev, "NE2000 Compatible: ");
     }
     printk("io %#3lx, irq %d,", dev->base_addr, dev->irq);
     if (info->flags & USE_SHMEM)
@@ -932,7 +932,7 @@ static void mii_phy_probe(struct net_device *dev)
 	phyid = tmp << 16;
 	phyid |= mdio_read(mii_addr, i, MII_PHYID_REG2);
 	phyid &= MII_PHYID_REV_MASK;
-	pr_debug("%s: MII at %d is 0x%08x\n", dev->name, i, phyid);
+	netdev_dbg(dev, "MII at %d is 0x%08x\n", i, phyid);
 	if (phyid == AM79C9XX_HOME_PHY) {
 	    info->pna_phy = i;
 	} else if (phyid != AM79C9XX_ETH_PHY) {
@@ -1018,8 +1018,8 @@ static void pcnet_reset_8390(struct net_device *dev)
     outb_p(ENISR_RESET, nic_base + EN0_ISR); /* Ack intr. */
 
     if (i == 100)
-	printk(KERN_ERR "%s: pcnet_reset_8390() did not complete.\n",
-	       dev->name);
+	netdev_err(dev, "pcnet_reset_8390() did not complete.\n");
+
     set_misc_reg(dev);
 
 } /* pcnet_reset_8390 */
@@ -1035,8 +1035,7 @@ static int set_config(struct net_device *dev, struct ifmap *map)
 	else if ((map->port < 1) || (map->port > 2))
 	    return -EINVAL;
 	dev->if_port = map->port;
-	printk(KERN_INFO "%s: switched to %s port\n",
-	       dev->name, if_names[dev->if_port]);
+	netdev_info(dev, "switched to %s port\n", if_names[dev->if_port]);
 	NS8390_init(dev, 1);
     }
     return 0;
@@ -1071,7 +1070,7 @@ static void ei_watchdog(u_long arg)
        this, we can limp along even if the interrupt is blocked */
     if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) {
 	if (!info->fast_poll)
-	    printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name);
+	    netdev_info(dev, "interrupt(s) dropped!\n");
 	ei_irq_wrapper(dev->irq, dev);
 	info->fast_poll = HZ;
     }
@@ -1091,7 +1090,7 @@ static void ei_watchdog(u_long arg)
 	if (info->eth_phy) {
 	    info->phy_id = info->eth_phy = 0;
 	} else {
-	    printk(KERN_INFO "%s: MII is missing!\n", dev->name);
+	    netdev_info(dev, "MII is missing!\n");
 	    info->flags &= ~HAS_MII;
 	}
 	goto reschedule;
@@ -1100,8 +1099,7 @@ static void ei_watchdog(u_long arg)
     link &= 0x0004;
     if (link != info->link_status) {
 	u_short p = mdio_read(mii_addr, info->phy_id, 5);
-	printk(KERN_INFO "%s: %s link beat\n", dev->name,
-	       (link) ? "found" : "lost");
+	netdev_info(dev, "%s link beat\n", link ? "found" : "lost");
 	if (link && (info->flags & IS_DL10022)) {
 	    /* Disable collision detection on full duplex links */
 	    outb((p & 0x0140) ? 4 : 0, nic_base + DLINK_DIAG);
@@ -1112,13 +1110,12 @@ static void ei_watchdog(u_long arg)
 	if (link) {
 	    if (info->phy_id == info->eth_phy) {
 		if (p)
-		    printk(KERN_INFO "%s: autonegotiation complete: "
-			   "%sbaseT-%cD selected\n", dev->name,
+		    netdev_info(dev, "autonegotiation complete: "
+			   "%sbaseT-%cD selected\n",
 			   ((p & 0x0180) ? "100" : "10"),
 			   ((p & 0x0140) ? 'F' : 'H'));
 		else
-		    printk(KERN_INFO "%s: link partner did not "
-			   "autonegotiate\n", dev->name);
+		    netdev_info(dev, "link partner did not autonegotiate\n");
 	    }
 	    NS8390_init(dev, 1);
 	}
@@ -1131,7 +1128,7 @@ static void ei_watchdog(u_long arg)
 	    /* isolate this MII and try flipping to the other one */
 	    mdio_write(mii_addr, info->phy_id, 0, 0x0400);
 	    info->phy_id ^= info->pna_phy ^ info->eth_phy;
-	    printk(KERN_INFO "%s: switched to %s transceiver\n", dev->name,
+	    netdev_info(dev, "switched to %s transceiver\n",
 		   (info->phy_id == info->eth_phy) ? "ethernet" : "PNA");
 	    mdio_write(mii_addr, info->phy_id, 0,
 		       (info->phy_id == info->eth_phy) ? 0x1000 : 0);
@@ -1191,9 +1188,9 @@ static void dma_get_8390_hdr(struct net_device *dev,
     unsigned int nic_base = dev->base_addr;
 
     if (ei_status.dmaing) {
-	printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input."
+	netdev_notice(dev, "DMAing conflict in dma_block_input."
 	       "[DMAstat:%1x][irqlock:%1x]\n",
-	       dev->name, ei_status.dmaing, ei_status.irqlock);
+	       ei_status.dmaing, ei_status.irqlock);
 	return;
     }
 
@@ -1224,11 +1221,11 @@ static void dma_block_input(struct net_device *dev, int count,
     char *buf = skb->data;
 
     if ((ei_debug > 4) && (count != 4))
-	pr_debug("%s: [bi=%d]\n", dev->name, count+4);
+	netdev_dbg(dev, "[bi=%d]\n", count+4);
     if (ei_status.dmaing) {
-	printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input."
+	netdev_notice(dev, "DMAing conflict in dma_block_input."
 	       "[DMAstat:%1x][irqlock:%1x]\n",
-	       dev->name, ei_status.dmaing, ei_status.irqlock);
+	       ei_status.dmaing, ei_status.irqlock);
 	return;
     }
     ei_status.dmaing |= 0x01;
@@ -1258,9 +1255,9 @@ static void dma_block_input(struct net_device *dev, int count,
 		break;
 	} while (--tries > 0);
 	if (tries <= 0)
-	    printk(KERN_NOTICE "%s: RX transfer address mismatch,"
+	    netdev_notice(dev, "RX transfer address mismatch,"
 		   "%#4.4x (expected) vs. %#4.4x (actual).\n",
-		   dev->name, ring_offset + xfer_count, addr);
+		   ring_offset + xfer_count, addr);
     }
 #endif
     outb_p(ENISR_RDC, nic_base + EN0_ISR);	/* Ack intr. */
@@ -1281,7 +1278,7 @@ static void dma_block_output(struct net_device *dev, int count,
 
 #ifdef PCMCIA_DEBUG
     if (ei_debug > 4)
-	printk(KERN_DEBUG "%s: [bo=%d]\n", dev->name, count);
+	netdev_dbg(dev, "[bo=%d]\n", count);
 #endif
 
     /* Round the count up for word writes.  Do we need to do this?
@@ -1290,9 +1287,9 @@ static void dma_block_output(struct net_device *dev, int count,
     if (count & 0x01)
 	count++;
     if (ei_status.dmaing) {
-	printk(KERN_NOTICE "%s: DMAing conflict in dma_block_output."
+	netdev_notice(dev, "DMAing conflict in dma_block_output."
 	       "[DMAstat:%1x][irqlock:%1x]\n",
-	       dev->name, ei_status.dmaing, ei_status.irqlock);
+	       ei_status.dmaing, ei_status.irqlock);
 	return;
     }
     ei_status.dmaing |= 0x01;
@@ -1329,9 +1326,9 @@ static void dma_block_output(struct net_device *dev, int count,
 		break;
 	} while (--tries > 0);
 	if (tries <= 0) {
-	    printk(KERN_NOTICE "%s: Tx packet transfer address mismatch,"
+	    netdev_notice(dev, "Tx packet transfer address mismatch,"
 		   "%#4.4x (expected) vs. %#4.4x (actual).\n",
-		   dev->name, (start_page << 8) + count, addr);
+		   (start_page << 8) + count, addr);
 	    if (retries++ == 0)
 		goto retry;
 	}
@@ -1340,8 +1337,7 @@ static void dma_block_output(struct net_device *dev, int count,
 
     while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0)
 	if (time_after(jiffies, dma_start + PCNET_RDC_TIMEOUT)) {
-	    printk(KERN_NOTICE "%s: timeout waiting for Tx RDC.\n",
-		   dev->name);
+	    netdev_notice(dev, "timeout waiting for Tx RDC.\n");
 	    pcnet_reset_8390(dev);
 	    NS8390_init(dev, 1);
 	    break;
-- 
1.7.1


^ permalink raw reply related

* Re: [patch] isdn: gigaset: add missing unlock
From: Tilman Schmidt @ 2010-08-08 12:50 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Hansjoerg Lipp, Karsten Keil, David S. Miller, Andy Shevchenko,
	gigaset307x-common, netdev, kernel-janitors
In-Reply-To: <20100806082323.GU9031@bicker>

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

Am 06.08.2010 10:23 schrieb Dan Carpenter:
> We should unlock here.  This is the only place where we return from the
> function with the lock held.  The caller isn't expecting it.

Thanks, good catch.

> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Tilman Schmidt <tilman@imap.cc>

> 
> diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
> index e5ea344..bcc174e 100644
> --- a/drivers/isdn/gigaset/capi.c
> +++ b/drivers/isdn/gigaset/capi.c
> @@ -1052,6 +1052,7 @@ static inline void remove_appl_from_channel(struct bc_state *bcs,
>  	do {
>  		if (bcap->bcnext == ap) {
>  			bcap->bcnext = bcap->bcnext->bcnext;
> +			spin_unlock_irqrestore(&bcs->aplock, flags);
>  			return;
>  		}
>  		bcap = bcap->bcnext;

-- 
Tilman Schmidt                    E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply

* Re: [patch] isdn: gigaset: use after free
From: Tilman Schmidt @ 2010-08-08 12:55 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Hansjoerg Lipp, Karsten Keil, David S. Miller, Tejun Heo,
	Joe Perches, gigaset307x-common, netdev, kernel-janitors
In-Reply-To: <20100806082126.GT9031@bicker>

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

Am 06.08.2010 10:21 schrieb Dan Carpenter:
> I moved the kfree(cb) below the dereferences.

Thanks for finding and fixing that bug.

> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Tilman Schmidt <tilman@imap.cc>

> diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
> index 0ded364..707d9c9 100644
> --- a/drivers/isdn/gigaset/bas-gigaset.c
> +++ b/drivers/isdn/gigaset/bas-gigaset.c
> @@ -1914,11 +1914,13 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb)
>  	 * The next command will reopen the AT channel automatically.
>  	 */
>  	if (cb->len == 3 && !memcmp(cb->buf, "+++", 3)) {
> -		kfree(cb);
>  		rc = req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT);
>  		if (cb->wake_tasklet)
>  			tasklet_schedule(cb->wake_tasklet);
> -		return rc < 0 ? rc : cb->len;
> +		if (!rc)
> +			rc = cb->len;
> +		kfree(cb);
> +		return rc;
>  	}
>  
>  	spin_lock_irqsave(&cs->cmdlock, flags);

-- 
Tilman Schmidt                    E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply

* Re: [PATCH 11/18] pcmcia: do not use io_req_t when calling pcmcia_request_io()
From: Komuro @ 2010-08-08 13:07 UTC (permalink / raw)
  To: Dominik Brodowski
  Cc: alsa-devel, linux-usb, linux-serial, netdev, linux-pcmcia,
	linux-wireless, laforge, linux-ide, linux-mtd, Dominik Brodowski,
	Michael Buesch
In-Reply-To: <1281046014-7585-11-git-send-email-linux@dominikbrodowski.net>

Hi,

> 
>-    link->io.IOAddrLines =10;
>-    link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
>+    link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16;

link->io_lines should be set here?



>@@ -840,14 +839,15 @@ xirc2ps_config(struct pcmcia_device * link)
> 	}
> 	printk(KNOT_XIRC "no ports available\n");
>     } else {
>-	link->io.NumPorts1 = 16;
>+	link->io_lines = 10;
>+	link->resource[0]->end = 16;

Best Regards
Komuro

^ permalink raw reply

* [PATCH] xfrm: fix a possible leak of dev reference count.
From: Zhang JieJing @ 2010-08-08 13:34 UTC (permalink / raw)
  To: netdev; +Cc: Dan Carpenter, Zhang Jiejing

call dev_put(dev) on error path.

Signed-off-by: JieJing.Zhang <kzjeef@gmail.com>
---
 net/ipv4/xfrm4_policy.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 1705476..d2a4873 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -81,8 +81,10 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst,
struct net_device *dev,
 	dev_hold(dev);

 	xdst->u.rt.idev = in_dev_get(dev);
-	if (!xdst->u.rt.idev)
+	if (!xdst->u.rt.idev) {
+		dev_put(dev);
 		return -ENODEV;
+	}

 	xdst->u.rt.peer = rt->peer;
 	if (rt->peer)
-- 
1.7.0.4

^ permalink raw reply related

* [PATCH] pcnet_cs: Use pr_fmt and pr_<level>
From: Joe Perches @ 2010-08-08 14:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: netdev, linux-pcmcia, Dominik Brodowski, David Miller
In-Reply-To: <1281270725-25282-1-git-send-email-w.sang@pengutronix.de>

It looks as if the printks in get_ax88190 are
incorrect and were duplicated and superceded by a
test in pcnet_config, so I removed them.

Changed the level of the ax88190 test to KERN_NOTICE
to match the other message styles in pcnet_config.

Compiled but untested.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/pcmcia/pcnet_cs.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index e127923..0542fa4 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -28,6 +28,8 @@
 
 ======================================================================*/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -440,8 +442,6 @@ static hw_info_t *get_ax88190(struct pcmcia_device *link)
 	dev->dev_addr[i] = j & 0xff;
 	dev->dev_addr[i+1] = j >> 8;
     }
-    printk(KERN_NOTICE "pcnet_cs: this is an AX88190 card!\n");
-    printk(KERN_NOTICE "pcnet_cs: use axnet_cs instead.\n");
     return NULL;
 }
 
@@ -574,15 +574,15 @@ static int pcnet_config(struct pcmcia_device *link)
 	if ((if_port == 1) || (if_port == 2))
 	    dev->if_port = if_port;
 	else
-	    printk(KERN_NOTICE "pcnet_cs: invalid if_port requested\n");
+	    pr_notice("invalid if_port requested\n");
     } else {
 	dev->if_port = 0;
     }
 
     if ((link->conf.ConfigBase == 0x03c0) &&
 	(link->manf_id == 0x149) && (link->card_id == 0xc1ab)) {
-	printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n");
-	printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n");
+	pr_notice("this is an AX88190 card!\n");
+	pr_notice("use axnet_cs instead.\n");
 	goto failed;
     }
 
@@ -597,8 +597,8 @@ static int pcnet_config(struct pcmcia_device *link)
 	local_hw_info = get_hwired(link);
 
     if (local_hw_info == NULL) {
-	printk(KERN_NOTICE "pcnet_cs: unable to read hardware net"
-	       " address for io base %#3lx\n", dev->base_addr);
+	pr_notice("unable to read hardware net address for io base %#3lx\n",
+		  dev->base_addr);
 	goto failed;
     }
 
@@ -640,7 +640,7 @@ static int pcnet_config(struct pcmcia_device *link)
     SET_NETDEV_DEV(dev, &link->dev);
 
     if (register_netdev(dev) != 0) {
-	printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
+	pr_notice("register_netdev() failed\n");
 	goto failed;
     }
 
@@ -649,16 +649,16 @@ static int pcnet_config(struct pcmcia_device *link)
 	netdev_info(dev, "NE2000 (DL100%d rev %02x): ",
 	       (info->flags & IS_DL10022) ? 22 : 19, id);
 	if (info->pna_phy)
-	    printk("PNA, ");
+	    pr_cont("PNA, ");
     } else {
 	netdev_info(dev, "NE2000 Compatible: ");
     }
-    printk("io %#3lx, irq %d,", dev->base_addr, dev->irq);
+    pr_cont("io %#3lx, irq %d,", dev->base_addr, dev->irq);
     if (info->flags & USE_SHMEM)
-	printk (" mem %#5lx,", dev->mem_start);
+	pr_cont(" mem %#5lx,", dev->mem_start);
     if (info->flags & HAS_MISC_REG)
-	printk(" %s xcvr,", if_names[dev->if_port]);
-    printk(" hw_addr %pM\n", dev->dev_addr);
+	pr_cont(" %s xcvr,", if_names[dev->if_port]);
+    pr_cont(" hw_addr %pM\n", dev->dev_addr);
     return 0;
 
 failed:



^ permalink raw reply related

* Latest iproute2 breaks "ip route get" command
From: Fabio Comolli @ 2010-08-08 17:02 UTC (permalink / raw)
  To: netdev

Good morning.

The following logs should explain the problem. In short, the "ip route
get" command with iproute2 v. 2.6.35 does not output anything (and
exits with a 0). This breaks (for example) vpnc.

If I use iproute2 v. 2.6.34 everything is OK. This is with a 2.6.35 kernel.

Note: this happens not only using the default Archlinux package but
also if I download and compile the sources.

Please let me know if you need more details.

Best regards,
Fabio


---------------------------------------------------------------------------------------------------------------------------------------------
[root@ratbert] - [/var/cache/pacman/pkg] nslookup www.google.com
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
www.google.com	canonical name = www.l.google.com.
Name:	www.l.google.com
Address: 72.14.234.104

[root@ratbert] - [/var/cache/pacman/pkg] ip route get  72.14.234.104
72.14.234.104 via 192.168.1.1 dev wlan0  src 192.168.1.69
    cache  mtu 1500 advmss 1460 hoplimit 64
[root@ratbert] - [/var/cache/pacman/pkg] pacman -U
iproute2-2.6.35-1-i686.pkg.tar.xz
resolving dependencies...
looking for inter-conflicts...

Targets (1): iproute2-2.6.35-1

Total Download Size:    0.00 MB
Total Installed Size:   1.27 MB

Proceed with installation? [Y/n]
checking package integrity...
(1/1) checking for file conflicts

[############################################################] 100%
(1/1) upgrading iproute2

[############################################################] 100%
[root@ratbert] - [/var/cache/pacman/pkg] ip route get  72.14.234.104
[root@ratbert] - [/var/cache/pacman/pkg]
-------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply

* Re: [PATCH 32/42] drivers/net/bnx2x: Adjust confusing if indentation
From: Eilon Greenstein @ 2010-08-08 19:13 UTC (permalink / raw)
  To: Julia Lawall
  Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org, yanivr
In-Reply-To: <Pine.LNX.4.64.1008052226210.31692@ask.diku.dk>

On Thu, 2010-08-05 at 13:26 -0700, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
> 
> Outdent the code following the if.
> 
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable braces4@
> position p1,p2;
> statement S1,S2;
> @@
> 
> (
> if (...) { ... }
> |
> if (...) S1@p1 S2@p2
> )
> 
> @script:python@
> p1 << r.p1;
> p2 << r.p2;
> @@
> 
> if (p1[0].column == p2[0].column):
>   cocci.print_main("branch",p1)
>   cocci.print_secs("after",p2)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>

Acked-by: Eilon Greenstein <eilong@broadcom.com>
> ---
> This patch doesn't change the semantics of the code.  But it might not be
> what is intended.

This is indeed just bad alignment, thanks for the fix

^ permalink raw reply

* Re: [PATCH 32/42] drivers/net/bnx2x: Adjust confusing if indentation
From: Eilon Greenstein @ 2010-08-08 19:14 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Julia Lawall, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	yanivr
In-Reply-To: <20100806070749.GP9031@bicker>

On Fri, 2010-08-06 at 00:07 -0700, Dan Carpenter wrote:
> On Thu, Aug 05, 2010 at 10:26:38PM +0200, Julia Lawall wrote:
> > ---
> > This patch doesn't change the semantics of the code.  But it might not be
> > what is intended.
> > 
> 
> I think there may have been some if statements which were removed before
> the code was merged into the kernel?  Here is another one from that same
> function.  Someone can roll this in with your patch.
> 

Thanks Dan. We will send a more complete patch series for this file once
net-next is open again.

^ permalink raw reply

* Re: Latest iproute2 breaks "ip route get" command
From: Andreas Henriksson @ 2010-08-08 19:33 UTC (permalink / raw)
  To: Fabio Comolli, Ulrich Weber; +Cc: netdev

> The following logs should explain the problem. In short, the "ip route
> get" command with iproute2 v. 2.6.35 does not output anything (and
> exits with a 0). This breaks (for example) vpnc.

Seems to be caused by:

http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commitdiff;h=447928279c88b6581ae4cdc1b5ac0a9e755aff64

Have no idea if this is the correct fix, but it seemed like a likely typo
based on the changes in the above commit and that this brings the output back:


diff --git a/ip/iproute.c b/ip/iproute.c
index 711576e..86c7ab7 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -160,7 +160,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 	if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN)
 		ip6_multiple_tables = 1;
 
-	if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED))
+	if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED))
 		return 0;
 
 	if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) {



(PS. Sorry for not properly replying in thread, but todays mailing list
archives seems to be extremely afraid of exposing any real mail headers
making it hard to reply properly without having received the original mail.)

-- 
Andreas Henriksson

^ permalink raw reply related

* Re: Latest iproute2 breaks "ip route get" command
From: Fabio Comolli @ 2010-08-08 19:31 UTC (permalink / raw)
  To: Andreas Henriksson; +Cc: Ulrich Weber, netdev
In-Reply-To: <20100808193304.GA15380@amd64.fatal.se>

Yup, that seems to fix it.
You can add my Tested-By in case you need it.

Regards,
Fabio




On Sun, Aug 8, 2010 at 9:33 PM, Andreas Henriksson <andreas@fatal.se> wrote:
>> The following logs should explain the problem. In short, the "ip route
>> get" command with iproute2 v. 2.6.35 does not output anything (and
>> exits with a 0). This breaks (for example) vpnc.
>
> Seems to be caused by:
>
> http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commitdiff;h=447928279c88b6581ae4cdc1b5ac0a9e755aff64
>
> Have no idea if this is the correct fix, but it seemed like a likely typo
> based on the changes in the above commit and that this brings the output back:
>
>
> diff --git a/ip/iproute.c b/ip/iproute.c
> index 711576e..86c7ab7 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -160,7 +160,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
>        if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN)
>                ip6_multiple_tables = 1;
>
> -       if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED))
> +       if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED))
>                return 0;
>
>        if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) {
>
>
>
> (PS. Sorry for not properly replying in thread, but todays mailing list
> archives seems to be extremely afraid of exposing any real mail headers
> making it hard to reply properly without having received the original mail.)
>
> --
> Andreas Henriksson
>

^ permalink raw reply

* [PATCH] r6040: fix all checkpatch errors and warnings
From: Florian Fainelli @ 2010-08-08 20:08 UTC (permalink / raw)
  To: netdev, David Miller

This patch fixes a couple of errors and warnings spotted by checkpatch.pl:
- some lines were over 80 columns
- there were some whitespaces left

The call to printk is now replaced by a call to pr_info and the log-level
included in the driver version is now removed, so there are no longer false
positives on this warning.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 142c381..0a00850 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -200,7 +200,7 @@ struct r6040_private {
 	int old_duplex;
 };
 
-static char version[] __devinitdata = KERN_INFO DRV_NAME
+static char version[] __devinitdata = DRV_NAME
 	": RDC R6040 NAPI net driver,"
 	"version "DRV_VERSION " (" DRV_RELDATE ")";
 
@@ -224,7 +224,8 @@ static int r6040_phy_read(void __iomem *ioaddr, int phy_addr, int reg)
 }
 
 /* Write a word data from PHY Chip */
-static void r6040_phy_write(void __iomem *ioaddr, int phy_addr, int reg, u16 val)
+static void r6040_phy_write(void __iomem *ioaddr,
+					int phy_addr, int reg, u16 val)
 {
 	int limit = 2048;
 	u16 cmd;
@@ -348,8 +349,8 @@ static int r6040_alloc_rxbufs(struct net_device *dev)
 		}
 		desc->skb_ptr = skb;
 		desc->buf = cpu_to_le32(pci_map_single(lp->pdev,
-						desc->skb_ptr->data,
-						MAX_BUF_SIZE, PCI_DMA_FROMDEVICE));
+					desc->skb_ptr->data,
+					MAX_BUF_SIZE, PCI_DMA_FROMDEVICE));
 		desc->status = DSC_OWNER_MAC;
 		desc = desc->vndescp;
 	} while (desc != lp->rx_ring);
@@ -491,12 +492,14 @@ static int r6040_close(struct net_device *dev)
 
 	/* Free Descriptor memory */
 	if (lp->rx_ring) {
-		pci_free_consistent(pdev, RX_DESC_SIZE, lp->rx_ring, lp->rx_ring_dma);
+		pci_free_consistent(pdev,
+				RX_DESC_SIZE, lp->rx_ring, lp->rx_ring_dma);
 		lp->rx_ring = NULL;
 	}
 
 	if (lp->tx_ring) {
-		pci_free_consistent(pdev, TX_DESC_SIZE, lp->tx_ring, lp->tx_ring_dma);
+		pci_free_consistent(pdev,
+				TX_DESC_SIZE, lp->tx_ring, lp->tx_ring_dma);
 		lp->tx_ring = NULL;
 	}
 
@@ -547,7 +550,7 @@ static int r6040_rx(struct net_device *dev, int limit)
 			}
 			goto next_descr;
 		}
-		
+
 		/* Packet successfully received */
 		new_skb = netdev_alloc_skb(dev, MAX_BUF_SIZE);
 		if (!new_skb) {
@@ -556,13 +559,13 @@ static int r6040_rx(struct net_device *dev, int limit)
 		}
 		skb_ptr = descptr->skb_ptr;
 		skb_ptr->dev = priv->dev;
-		
+
 		/* Do not count the CRC */
 		skb_put(skb_ptr, descptr->len - 4);
 		pci_unmap_single(priv->pdev, le32_to_cpu(descptr->buf),
 					MAX_BUF_SIZE, PCI_DMA_FROMDEVICE);
 		skb_ptr->protocol = eth_type_trans(skb_ptr, priv->dev);
-		
+
 		/* Send to upper layer */
 		netif_receive_skb(skb_ptr);
 		dev->stats.rx_packets++;
@@ -710,8 +713,10 @@ static int r6040_up(struct net_device *dev)
 		return ret;
 
 	/* improve performance (by RDC guys) */
-	r6040_phy_write(ioaddr, 30, 17, (r6040_phy_read(ioaddr, 30, 17) | 0x4000));
-	r6040_phy_write(ioaddr, 30, 17, ~((~r6040_phy_read(ioaddr, 30, 17)) | 0x2000));
+	r6040_phy_write(ioaddr, 30, 17,
+			(r6040_phy_read(ioaddr, 30, 17) | 0x4000));
+	r6040_phy_write(ioaddr, 30, 17,
+			~((~r6040_phy_read(ioaddr, 30, 17)) | 0x2000));
 	r6040_phy_write(ioaddr, 0, 19, 0x0000);
 	r6040_phy_write(ioaddr, 0, 30, 0x01F0);
 
@@ -946,7 +951,7 @@ static const struct net_device_ops r6040_netdev_ops = {
 	.ndo_set_multicast_list = r6040_multicast_list,
 	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_validate_addr	= eth_validate_addr,
-	.ndo_set_mac_address 	= eth_mac_addr,
+	.ndo_set_mac_address	= eth_mac_addr,
 	.ndo_do_ioctl		= r6040_ioctl,
 	.ndo_tx_timeout		= r6040_tx_timeout,
 #ifdef CONFIG_NET_POLL_CONTROLLER
@@ -1039,7 +1044,7 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
 	u16 *adrp;
 	int i;
 
-	printk("%s\n", version);
+	pr_info("%s\n", version);
 
 	err = pci_enable_device(pdev);
 	if (err)
@@ -1113,7 +1118,8 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
 	/* Some bootloader/BIOSes do not initialize
 	 * MAC address, warn about that */
 	if (!(adrp[0] || adrp[1] || adrp[2])) {
-		netdev_warn(dev, "MAC address not initialized, generating random\n");
+		netdev_warn(dev, "MAC address not initialized, "
+					"generating random\n");
 		random_ether_addr(dev->dev_addr);
 	}
 

^ permalink raw reply related

* [PATCH] cpmac: fix all checkpatch errors and warnings
From: Florian Fainelli @ 2010-08-08 20:09 UTC (permalink / raw)
  To: netdev, David Miller

This patches fixes a couple of checkpatch warnings and errors:
- lines over 80 columns
- printk() instead of pr_cont()
- assignments in tests (if ((foo == bar())))

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index e1f6156..fe017eb 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -38,7 +38,7 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
-#include <asm/gpio.h>
+#include <linux/gpio.h>
 #include <asm/atomic.h>
 
 MODULE_AUTHOR("Eugene Konev <ejka@imfi.kspu.ru>");
@@ -108,7 +108,7 @@ MODULE_PARM_DESC(dumb_switch, "Assume switch is not connected to MDIO bus");
 #define CPMAC_RX_INT_CLEAR		0x019c
 #define CPMAC_MAC_INT_ENABLE		0x01a8
 #define CPMAC_MAC_INT_CLEAR		0x01ac
-#define CPMAC_MAC_ADDR_LO(channel) 	(0x01b0 + (channel) * 4)
+#define CPMAC_MAC_ADDR_LO(channel)	(0x01b0 + (channel) * 4)
 #define CPMAC_MAC_ADDR_MID		0x01d0
 #define CPMAC_MAC_ADDR_HI		0x01d4
 #define CPMAC_MAC_HASH_LO		0x01d8
@@ -227,7 +227,7 @@ static void cpmac_dump_regs(struct net_device *dev)
 	for (i = 0; i < CPMAC_REG_END; i += 4) {
 		if (i % 16 == 0) {
 			if (i)
-				printk("\n");
+				pr_cont("\n");
 			printk(KERN_DEBUG "%s: reg[%p]:", dev->name,
 			       priv->regs + i);
 		}
@@ -262,7 +262,7 @@ static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb)
 	for (i = 0; i < skb->len; i++) {
 		if (i % 16 == 0) {
 			if (i)
-				printk("\n");
+				pr_cont("\n");
 			printk(KERN_DEBUG "%s: data[%p]:", dev->name,
 			       skb->data + i);
 		}
@@ -873,7 +873,8 @@ static int cpmac_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 	return -EINVAL;
 }
 
-static void cpmac_get_ringparam(struct net_device *dev, struct ethtool_ringparam* ring)
+static void cpmac_get_ringparam(struct net_device *dev,
+						struct ethtool_ringparam *ring)
 {
 	struct cpmac_priv *priv = netdev_priv(dev);
 
@@ -888,7 +889,8 @@ static void cpmac_get_ringparam(struct net_device *dev, struct ethtool_ringparam
 	ring->tx_pending = 1;
 }
 
-static int cpmac_set_ringparam(struct net_device *dev, struct ethtool_ringparam* ring)
+static int cpmac_set_ringparam(struct net_device *dev,
+						struct ethtool_ringparam *ring)
 {
 	struct cpmac_priv *priv = netdev_priv(dev);
 
@@ -1012,8 +1014,8 @@ static int cpmac_open(struct net_device *dev)
 
 	priv->rx_head->prev->hw_next = (u32)0;
 
-	if ((res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED,
-			       dev->name, dev))) {
+	res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED, dev->name, dev);
+	if (res) {
 		if (netif_msg_drv(priv))
 			printk(KERN_ERR "%s: failed to obtain irq\n",
 			       dev->name);
@@ -1133,7 +1135,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
 	}
 
 	if (phy_id == PHY_MAX_ADDR) {
-		dev_err(&pdev->dev, "no PHY present, falling back to switch on MDIO bus 0\n");
+		dev_err(&pdev->dev, "no PHY present, falling back "
+					"to switch on MDIO bus 0\n");
 		strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
 		phy_id = pdev->id;
 	}
@@ -1169,7 +1172,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
 	priv->msg_enable = netif_msg_init(debug_level, 0xff);
 	memcpy(dev->dev_addr, pdata->dev_addr, sizeof(pdata->dev_addr));
 
-	snprintf(priv->phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
+	snprintf(priv->phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT,
+						mdio_bus_id, phy_id);
 
 	priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
 						PHY_INTERFACE_MODE_MII);
@@ -1182,7 +1186,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
 		goto fail;
 	}
 
-	if ((rc = register_netdev(dev))) {
+	rc = register_netdev(dev);
+	if (rc) {
 		printk(KERN_ERR "cpmac: error %i registering device %s\n", rc,
 		       dev->name);
 		goto fail;
@@ -1248,11 +1253,13 @@ int __devinit cpmac_init(void)
 
 	cpmac_mii->reset(cpmac_mii);
 
-	for (i = 0; i < 300; i++)
-		if ((mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE)))
+	for (i = 0; i < 300; i++) {
+		mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE);
+		if (mask)
 			break;
 		else
 			msleep(10);
+	}
 
 	mask &= 0x7fffffff;
 	if (mask & (mask - 1)) {

^ permalink raw reply related

* Re: Latest iproute2 breaks "ip route get" command
From: Andreas Henriksson @ 2010-08-08 19:52 UTC (permalink / raw)
  To: Fabio Comolli; +Cc: Ulrich Weber, netdev
In-Reply-To: <AANLkTim4h7rTJuF7UWAE-p_4NGkrwksUjoK6m2x5BubG@mail.gmail.com>

On sön, 2010-08-08 at 21:31 +0200, Fabio Comolli wrote:
> Yup, that seems to fix it.
> You can add my Tested-By in case you need it.

I'll let Ulrich Weber confirm it's the right fix and forward to Stephen
Hemminger. Just received an "out of office" notice saying he'll be back
11 august (wednesday), so I guess we'll have to wait a couple of days
for that.

//Andreas


^ permalink raw reply

* Re: [PATCH 2/2] igbvf.txt: Add igbvf Documentation
From: Jeff Kirsher @ 2010-08-09  0:25 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel, gospo, bphilips
In-Reply-To: <20100807.230156.25112206.davem@davemloft.net>

On Sat, Aug 7, 2010 at 23:01, David Miller <davem@davemloft.net> wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Tue, 03 Aug 2010 17:16:17 -0700
>
>> Adds documentation for the igbvf (igb virtual function driver).
>>
>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
>
> Tons of trailing whitespace, GIT nearly craps itself when I try
> to apply this.
>
> Please fix this, and also submit the fixed up 1/1 ixgbe.txt doc patch
> and even more importantly the ixgbe FCOE build fix you promised I'd
> have two nights ago :-)
>
> Thanks.
> --

I will get you everything tonight, sorry about not getting the ixgbe
FCOE build fix when I said I would.  I was expecting better internet
connectivity than what I had the last couple of days.

-- 
Cheers,
Jeff

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox