[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1303716634.1745.44.camel@Joe-Laptop>
Date: Mon, 25 Apr 2011 00:30:34 -0700
From: Joe Perches <joe@...ches.com>
To: Jimmy Chen (陳永達)
<jimmy.chen@...a.com>
Cc: linux-kernel@...r.kernel.org, gregkh@...e.de
Subject: RE: [PATCH 2/2] misc: add real function
open/read/write/ioctl/close for moxa_serial_io driver
On Mon, 2011-04-25 at 14:44 +0800, Jimmy Chen (陳永達) wrote:
> From: Jimmy Chen <jimmy.chen@...a.com>
>
> Add real function and GPL license.
> Check with script/checkpatch.pl
Just some trivia:
There is a mechanism used to prefix logging messages.
> diff --git a/drivers/misc/moxa_serial_io.c b/drivers/misc/moxa_serial_io.c
You could add
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
before any #include
> +#include <linux/module.h>
> +#include <linux/kernel.h>
[]
> +static int __init io_init_module(void)
> +{
> + unsigned char val;
> + printk(KERN_INFO "initializing MOXA SERIAL IO module\n");
And convert all the printks to pr_<level>
pr_info("Initializing module\n");
> +
> + if (misc_register(&dio_miscdev) != 0) {
> + printk(KERN_INFO "Moxa serial io driver: Register misc fail !\n");
pr_err("misc_register failed\n");
[]
> + printk(KERN_INFO "Moxa V2100 serial io driver, version "
> + MOXA_SERIAL_IO_VERSION ", " "init OK\n");
pr_info("Initialized version %s\n", MOXA_SERIAL_IO_VERSION);
> +static void __exit io_cleanup_module(void)
> +{
> + printk("cleaning up module\n");
pr_info("Removed\n");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists