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

Commit 05a24b23 authored by Joe Perches's avatar Joe Perches Committed by Michael Grzeschik
Browse files

arcnet: Convert printk to pr_<level>



Use the more current logging style.

Remove #define VERSION, use pr_info normally.
Add pr_fmt with "arcnet:" prefixes and KBUILD_MODNAME.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
parent a34c0932
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@
 * **********************
 */

#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/gfp.h>
#include <linux/init.h>
@@ -33,8 +35,6 @@
#include <linux/skbuff.h>
#include <linux/arcdevice.h>

#define VERSION "arcnet: raw mode (`r') encapsulation support loaded.\n"

static void rx(struct net_device *dev, int bufnum,
	       struct archdr *pkthdr, int length);
static int build_header(struct sk_buff *skb, struct net_device *dev,
@@ -56,7 +56,7 @@ static int __init arcnet_raw_init(void)
{
	int count;

	printk(VERSION);
	pr_info("%s\n", "raw mode (`r') encapsulation support loaded");

	for (count = 0; count < 256; count++)
		if (arc_proto_map[count] == arc_proto_default)
+11 −10
Original line number Diff line number Diff line
@@ -24,6 +24,9 @@
 *
 * **********************
 */

#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -36,8 +39,6 @@
#include <linux/io.h>
#include <linux/arcdevice.h>

#define VERSION "arcnet: RIM I (entirely mem-mapped) support\n"

/* Internal function declarations */

static int arcrimi_probe(struct net_device *dev);
@@ -83,20 +84,20 @@ static void arcrimi_copy_from_card(struct net_device *dev, int bufnum, int offse
static int __init arcrimi_probe(struct net_device *dev)
{
	if (BUGLVL(D_NORMAL)) {
		printk(VERSION);
		printk("E-mail me if you actually test the RIM I driver, please!\n");
		printk("Given: node %02Xh, shmem %lXh, irq %d\n",
		pr_info("%s\n", "RIM I (entirely mem-mapped) support");
		pr_info("E-mail me if you actually test the RIM I driver, please!\n");
		pr_info("Given: node %02Xh, shmem %lXh, irq %d\n",
			dev->dev_addr[0], dev->mem_start, dev->irq);
	}

	if (dev->mem_start <= 0 || dev->irq <= 0) {
		if (BUGLVL(D_NORMAL))
			printk("No autoprobe for RIM I; you must specify the shmem and irq!\n");
			pr_err("No autoprobe for RIM I; you must specify the shmem and irq!\n");
		return -ENODEV;
	}
	if (dev->dev_addr[0] == 0) {
		if (BUGLVL(D_NORMAL))
			printk("You need to specify your card's station ID!\n");
			pr_err("You need to specify your card's station ID!\n");
		return -ENODEV;
	}
	/* Grab the memory region at mem_start for MIRROR_SIZE bytes.
@@ -106,7 +107,7 @@ static int __init arcrimi_probe(struct net_device *dev)
	 */
	if (!request_mem_region(dev->mem_start, MIRROR_SIZE, "arcnet (90xx)")) {
		if (BUGLVL(D_NORMAL))
			printk("Card memory already allocated\n");
			pr_notice("Card memory already allocated\n");
		return -ENODEV;
	}
	return arcrimi_found(dev);
@@ -375,7 +376,7 @@ static int __init arcrimi_setup(char *s)
		return 1;
	switch (ints[0]) {
	default:		/* ERROR */
		printk("arcrimi: Too many arguments.\n");
		pr_err("Too many arguments\n");
	case 3:		/* Node ID */
		node = ints[3];
	case 2:		/* IRQ */
+8 −17
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
 *     <jojo@repas.de>
 */

#define VERSION "arcnet: v3.94 BETA 2007/02/08 - by Avery Pennarun et al.\n"
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/types.h>
@@ -114,18 +114,7 @@ static int __init arcnet_init(void)

	arcnet_debug = debug;

	printk("arcnet loaded.\n");

#ifdef ALPHA_WARNING
	if (BUGLVL(D_EXTRA)) {
		printk("arcnet: ***\n"
		"arcnet: * Read arcnet.txt for important release notes!\n"
		       "arcnet: *\n"
		       "arcnet: * This is an ALPHA version! (Last stable release: v3.02)  E-mail\n"
		       "arcnet: * me if you have any questions, comments, or bug reports.\n"
		       "arcnet: ***\n");
	}
#endif
	pr_info("arcnet loaded\n");

	/* initialize the protocol map */
	arc_raw_proto = arc_proto_default = arc_bcast_proto = &arc_proto_null;
@@ -133,9 +122,11 @@ static int __init arcnet_init(void)
		arc_proto_map[count] = arc_proto_default;

	if (BUGLVL(D_DURING))
		printk("arcnet: struct sizes: %Zd %Zd %Zd %Zd %Zd\n",
		       sizeof(struct arc_hardware), sizeof(struct arc_rfc1201),
		       sizeof(struct arc_rfc1051), sizeof(struct arc_eth_encap),
		pr_info("struct sizes: %Zd %Zd %Zd %Zd %Zd\n",
			sizeof(struct arc_hardware),
			sizeof(struct arc_rfc1201),
			sizeof(struct arc_rfc1051),
			sizeof(struct arc_eth_encap),
			sizeof(struct archdr));

	return 0;
+3 −3
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@
 * **********************
 */

#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/gfp.h>
#include <linux/init.h>
@@ -35,8 +37,6 @@
#include <linux/skbuff.h>
#include <linux/arcdevice.h>

#define VERSION "arcnet: cap mode (`c') encapsulation support loaded.\n"

/* packet receiver */
static void rx(struct net_device *dev, int bufnum,
	       struct archdr *pkthdr, int length)
@@ -259,7 +259,7 @@ static void arcnet_cap_init(void)

static int __init capmode_module_init(void)
{
	printk(VERSION);
	pr_info("%s\n", "cap mode (`c') encapsulation support loaded");
	arcnet_cap_init();
	return 0;
}
+5 −4
Original line number Diff line number Diff line
@@ -25,6 +25,9 @@
 *
 * **********************
 */

#define pr_fmt(fmt) "arcnet:" KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
@@ -41,8 +44,6 @@

#include <linux/io.h>

#define VERSION "arcnet: COM20020 ISA support (by David Woodhouse et al.)\n"

/* We cannot (yet) probe for an IO mapped card, although we can check that
 * it's where we were told it was, and even do autoirq.
 */
@@ -54,7 +55,7 @@ static int __init com20020isa_probe(struct net_device *dev)
	int err;

	if (BUGLVL(D_NORMAL))
		printk(VERSION);
		pr_info("%s\n", "COM20020 ISA support (by David Woodhouse et al.)");

	ioaddr = dev->base_addr;
	if (!ioaddr) {
@@ -193,7 +194,7 @@ static int __init com20020isa_setup(char *s)

	switch (ints[0]) {
	default:		/* ERROR */
		printk("com90xx: Too many arguments.\n");
		pr_info("Too many arguments\n");
	case 6:		/* Timeout */
		timeout = ints[6];
	case 5:		/* CKP value */
Loading