From: Joe Perches <joe@perches.com>
To: "Jimmy Chen (陳永達)" <jimmy.chen@moxa.com>
Cc: linux-kernel@vger.kernel.org, gregkh@suse.de
Subject: RE: [PATCH 2/2] misc: add real function open/read/write/ioctl/close for moxa_serial_io driver
Date: Mon, 25 Apr 2011 00:30:34 -0700 [thread overview]
Message-ID: <1303716634.1745.44.camel@Joe-Laptop> (raw)
In-Reply-To: <ECB3782BB8F03341905DD923270296115F67B2@mhqms01.moxa.com>
On Mon, 2011-04-25 at 14:44 +0800, Jimmy Chen (陳永達) wrote:
> From: Jimmy Chen <jimmy.chen@moxa.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");
next prev parent reply other threads:[~2011-04-25 7:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 6:44 [PATCH 2/2] misc: add real function open/read/write/ioctl/close for moxa_serial_io driver Jimmy Chen (陳永達)
2011-04-25 7:30 ` Joe Perches [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-04-25 2:28 [PATCH 1/2] misc: add option in menu to support MOXA V2100 serial io driver Jimmy Chen (陳永達)
2011-04-25 2:35 ` [PATCH 2/2] misc: add real function open/read/write/ioctl/close for moxa_serial_io driver Jimmy Chen (陳永達)
2011-04-25 2:47 ` Joe Perches
2011-04-25 3:01 ` Greg KH
2011-04-25 3:44 ` Jimmy Chen (陳永達)
2011-04-25 14:13 ` Greg KH
2011-04-26 9:01 ` Jimmy Chen (陳永達)
2011-04-26 13:20 ` Greg KH
2011-04-25 11:40 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1303716634.1745.44.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=gregkh@suse.de \
--cc=jimmy.chen@moxa.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox