Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23efcb73 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

wan: Update to current logging forms



Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c75bb2c6
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@
 *	Generic HDLC port Copyright (C) 2008 Krzysztof Halasa <khc@pm.waw.pl>
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
@@ -192,8 +194,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq)
	 */

	if (!request_region(iobase, 8, "Comtrol SV11")) {
		printk(KERN_WARNING "hostess: I/O 0x%X already in use.\n",
		       iobase);
		pr_warn("I/O 0x%X already in use\n", iobase);
		return NULL;
	}

@@ -221,7 +222,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq)

	if (request_irq(irq, z8530_interrupt, IRQF_DISABLED,
			"Hostess SV11", sv) < 0) {
		printk(KERN_WARNING "hostess: IRQ %d already in use.\n", irq);
		pr_warn("IRQ %d already in use\n", irq);
		goto err_irq;
	}

@@ -255,7 +256,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq)
	 */

	if (z8530_init(sv)) {
		printk(KERN_ERR "Z8530 series device not found.\n");
		pr_err("Z8530 series device not found\n");
		enable_irq(irq);
		goto free_dma;
	}
@@ -282,7 +283,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq)
	netdev->irq = irq;

	if (register_hdlc_device(netdev)) {
		printk(KERN_ERR "hostess: unable to register HDLC device.\n");
		pr_err("unable to register HDLC device\n");
		free_netdev(netdev);
		goto free_dma;
	}
+9 −9
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@
 *	2000-11-14	Henner Eisen	dev_hold/put, NETDEV_GOING_DOWN support
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -165,13 +167,11 @@ static netdev_tx_t lapbeth_xmit(struct sk_buff *skb,
		break;
	case X25_IFACE_CONNECT:
		if ((err = lapb_connect_request(dev)) != LAPB_OK)
			printk(KERN_ERR "lapbeth: lapb_connect_request "
			       "error: %d\n", err);
			pr_err("lapb_connect_request error: %d\n", err);
		goto drop;
	case X25_IFACE_DISCONNECT:
		if ((err = lapb_disconnect_request(dev)) != LAPB_OK)
			printk(KERN_ERR "lapbeth: lapb_disconnect_request "
			       "err: %d\n", err);
			pr_err("lapb_disconnect_request err: %d\n", err);
		/* Fall thru */
	default:
		goto drop;
@@ -180,7 +180,7 @@ static netdev_tx_t lapbeth_xmit(struct sk_buff *skb,
	skb_pull(skb, 1);

	if ((err = lapb_data_request(dev, skb)) != LAPB_OK) {
		printk(KERN_ERR "lapbeth: lapb_data_request error - %d\n", err);
		pr_err("lapb_data_request error - %d\n", err);
		goto drop;
	}
out:
@@ -220,7 +220,7 @@ static void lapbeth_connected(struct net_device *dev, int reason)
	struct sk_buff *skb = dev_alloc_skb(1);

	if (!skb) {
		printk(KERN_ERR "lapbeth: out of memory\n");
		pr_err("out of memory\n");
		return;
	}

@@ -237,7 +237,7 @@ static void lapbeth_disconnected(struct net_device *dev, int reason)
	struct sk_buff *skb = dev_alloc_skb(1);

	if (!skb) {
		printk(KERN_ERR "lapbeth: out of memory\n");
		pr_err("out of memory\n");
		return;
	}

@@ -277,7 +277,7 @@ static int lapbeth_open(struct net_device *dev)
	int err;

	if ((err = lapb_register(dev, &lapbeth_callbacks)) != LAPB_OK) {
		printk(KERN_ERR "lapbeth: lapb_register error - %d\n", err);
		pr_err("lapb_register error: %d\n", err);
		return -ENODEV;
	}

@@ -292,7 +292,7 @@ static int lapbeth_close(struct net_device *dev)
	netif_stop_queue(dev);

	if ((err = lapb_unregister(dev)) != LAPB_OK)
		printk(KERN_ERR "lapbeth: lapb_unregister error - %d\n", err);
		pr_err("lapb_unregister error: %d\n", err);

	return 0;
}
+3 −1
Original line number Diff line number Diff line
@@ -212,6 +212,8 @@ static const char rcsid[] =
 *
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
@@ -3242,7 +3244,7 @@ static inline void show_version(void)
	rcsdate++;
	tmp = strrchr(rcsdate, ' ');
	*tmp = '\0';
	printk(KERN_INFO "Cyclades-PC300 driver %s %s\n", rcsvers, rcsdate);
	pr_info("Cyclades-PC300 driver %s %s\n", rcsvers, rcsdate);
}				/* show_version */

static const struct net_device_ops cpc_netdev_ops = {
+32 −35
Original line number Diff line number Diff line
@@ -37,6 +37,8 @@
 *	Known problem: this driver wasn't tested on multiprocessor machine.
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ptrace.h>
@@ -200,8 +202,8 @@ sbni_isa_probe( struct net_device *dev )

		return  0;
	else {
		printk( KERN_ERR "sbni: base address 0x%lx is busy, or adapter "
			"is malfunctional!\n", dev->base_addr );
		pr_err("base address 0x%lx is busy, or adapter is malfunctional!\n",
		       dev->base_addr);
		return  -ENODEV;
	}
}
@@ -226,7 +228,6 @@ static void __init sbni_devsetup(struct net_device *dev)
int __init sbni_probe(int unit)
{
	struct net_device *dev;
	static unsigned  version_printed __initdata = 0;
	int err;

	dev = alloc_netdev(sizeof(struct net_local), "sbni", sbni_devsetup);
@@ -250,8 +251,7 @@ int __init sbni_probe(int unit)
		free_netdev(dev);
		return err;
	}
	if( version_printed++ == 0 )
		printk( KERN_INFO "%s", version );
	pr_info_once("%s", version);
	return 0;
}

@@ -326,7 +326,7 @@ sbni_pci_probe( struct net_device *dev )
		}

		if (pci_irq_line <= 0 || pci_irq_line >= nr_irqs)
			printk( KERN_WARNING
			pr_warn(
"WARNING: The PCI BIOS assigned this PCI card to IRQ %d, which is unlikely to work!.\n"
"You should use the PCI BIOS setup to assign a valid IRQ line.\n",
				pci_irq_line );
@@ -372,8 +372,7 @@ sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq )
		outb( 0, ioaddr + CSR0 );

		if( !irq ) {
			printk( KERN_ERR "%s: can't detect device irq!\n",
				dev->name );
			pr_err("%s: can't detect device irq!\n", dev->name);
			release_region( ioaddr, SBNI_IO_EXTENT );
			return NULL;
		}
@@ -386,7 +385,7 @@ sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq )
	/* Fill in sbni-specific dev fields. */
	nl = netdev_priv(dev);
	if( !nl ) {
		printk( KERN_ERR "%s: unable to get memory!\n", dev->name );
		pr_err("%s: unable to get memory!\n", dev->name);
		release_region( ioaddr, SBNI_IO_EXTENT );
		return NULL;
	}
@@ -415,21 +414,21 @@ sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq )
	if( inb( ioaddr + CSR0 ) & 0x01 )
		nl->state |= FL_SLOW_MODE;

	printk( KERN_NOTICE "%s: ioaddr %#lx, irq %d, "
		"MAC: 00:ff:01:%02x:%02x:%02x\n", 
	pr_notice("%s: ioaddr %#lx, irq %d, MAC: 00:ff:01:%02x:%02x:%02x\n",
		  dev->name, dev->base_addr, dev->irq,
		  ((u8 *)dev->dev_addr)[3],
		  ((u8 *)dev->dev_addr)[4],
		  ((u8 *)dev->dev_addr)[5]);

	printk( KERN_NOTICE "%s: speed %d, receive level ", dev->name,
	pr_notice("%s: speed %d",
		  dev->name,
		  ((nl->state & FL_SLOW_MODE) ? 500000 : 2000000)
		  / (1 << nl->csr1.rate));

	if( nl->delta_rxl == 0 )
		printk( "0x%x (fixed)\n", nl->cur_rxl_index ); 
		pr_cont(", receive level 0x%x (fixed)\n", nl->cur_rxl_index);
	else
		printk( "(auto)\n");
		pr_cont(", receive level (auto)\n");

#ifdef CONFIG_SBNI_MULTILINE
	nl->master = dev;
@@ -568,7 +567,7 @@ handle_channel( struct net_device *dev )
		 */
		csr0 = inb( ioaddr + CSR0 );
		if( !(csr0 & TR_RDY)  ||  (csr0 & RC_RDY) )
			printk( KERN_ERR "%s: internal error!\n", dev->name );
			netdev_err(dev, "internal error!\n");

		/* if state & FL_NEED_RESEND != 0 then tx_frameno != 0 */
		if( req_ans  ||  nl->tx_frameno != 0 )
@@ -851,7 +850,7 @@ prepare_to_send( struct sk_buff *skb, struct net_device *dev )

	/* nl->tx_buf_p == NULL here! */
	if( nl->tx_buf_p )
		printk( KERN_ERR "%s: memory leak!\n", dev->name );
		netdev_err(dev, "memory leak!\n");

	nl->outpos = 0;
	nl->state &= ~(FL_WAIT_ACK | FL_NEED_RESEND);
@@ -1179,16 +1178,15 @@ sbni_open( struct net_device *dev )

				((struct net_local *) (netdev_priv(*p)))
					->second = dev;
				printk( KERN_NOTICE "%s: using shared irq "
					"with %s\n", dev->name, (*p)->name );
				netdev_notice(dev, "using shared irq with %s\n",
					      (*p)->name);
				nl->state |= FL_SECONDARY;
				goto  handler_attached;
			}
	}

	if( request_irq(dev->irq, sbni_interrupt, IRQF_SHARED, dev->name, dev) ) {
		printk( KERN_ERR "%s: unable to get IRQ %d.\n",
			dev->name, dev->irq );
		netdev_err(dev, "unable to get IRQ %d\n", dev->irq);
		return  -EAGAIN;
	}

@@ -1220,7 +1218,7 @@ sbni_close( struct net_device *dev )
	struct net_local  *nl = netdev_priv(dev);

	if( nl->second  &&  nl->second->flags & IFF_UP ) {
		printk( KERN_NOTICE "Secondary channel (%s) is active!\n",
		netdev_notice(dev, "Secondary channel (%s) is active!\n",
			      nl->second->name);
		return  -EBUSY;
	}
@@ -1363,8 +1361,8 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
			return -EFAULT;
		slave_dev = dev_get_by_name(&init_net, slave_name );
		if( !slave_dev  ||  !(slave_dev->flags & IFF_UP) ) {
			printk( KERN_ERR "%s: trying to enslave non-active "
				"device %s\n", dev->name, slave_name );
			netdev_err(dev, "trying to enslave non-active device %s\n",
				   slave_name);
			return  -EPERM;
		}

@@ -1417,8 +1415,7 @@ enslave( struct net_device *dev, struct net_device *slave_dev )

	spin_unlock( &snl->lock );
	spin_unlock( &nl->lock );
	printk( KERN_NOTICE "%s: slave device (%s) attached.\n",
		dev->name, slave_dev->name );
	netdev_notice(dev, "slave device (%s) attached\n", slave_dev->name);
	return  0;
}

@@ -1547,7 +1544,7 @@ sbni_setup( char *p )
				break;
	}
bad_param:
	printk( KERN_ERR "Error in sbni kernel parameter!\n" );
	pr_err("Error in sbni kernel parameter!\n");
	return 0;
}

+6 −5
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@
 *
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
@@ -190,7 +192,7 @@ static int slvl_setup(struct slvl_device *sv, int iobase, int irq)
	dev->irq = irq;

	if (register_hdlc_device(dev)) {
		printk(KERN_ERR "sealevel: unable to register HDLC device\n");
		pr_err("unable to register HDLC device\n");
		free_netdev(dev);
		return -1;
	}
@@ -215,8 +217,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq,
	 */

	if (!request_region(iobase, 8, "Sealevel 4021")) {
		printk(KERN_WARNING "sealevel: I/O 0x%X already in use.\n",
		       iobase);
		pr_warn("I/O 0x%X already in use\n", iobase);
		return NULL;
	}

@@ -267,7 +268,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq,

	if (request_irq(irq, z8530_interrupt, IRQF_DISABLED,
			"SeaLevel", dev) < 0) {
		printk(KERN_WARNING "sealevel: IRQ %d already in use.\n", irq);
		pr_warn("IRQ %d already in use\n", irq);
		goto err_request_irq;
	}

@@ -292,7 +293,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq,
	 */

	if (z8530_init(dev) != 0) {
		printk(KERN_ERR "Z8530 series device not found.\n");
		pr_err("Z8530 series device not found\n");
		enable_irq(irq);
		goto free_hw;
	}
Loading