mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mark Rankilor <reodge@gmail.com>
Cc: "Henri Häkkinen" <henuxd@gmail.com>,
	devel@driverdev.osuosl.org, gregkh@suse.de,
	linux-kernel@vger.kernel.org, andrea.gelmini@gelma.net
Subject: Re: [PATCH] staging:comedi: Fixed coding convention issues.
Date: Sat, 12 Jun 2010 22:07:06 -0700	[thread overview]
Message-ID: <1276405626.1449.26.camel@Joe-Laptop.home> (raw)
In-Reply-To: <AANLkTimUt_Lhk6lG9spM9qjRT8T6PhEDVyOhh745lJhW@mail.gmail.com>

On Sun, 2010-06-13 at 10:14 +0800, Mark Rankilor wrote:
> 2010/6/12 Henri Häkkinen <henuxd@gmail.com>:
> > -                       printk
> > -                           (KERN_INFO "comedi: failed to increment module count, skipping\n");
> > +                       printk(KERN_INFO "comedi: failed to increment module "
> > +                              "count, skipping\n");
> 
> Regarding your breaking up of printk statements, although some of
> those lines do go over 80 characters, it is preferable to keep the
> strings together since then those are searchable within the code.
> 
> I figure it is quite acceptable to break the string after "comedi: ",
> so maybe that will fix the line length issue, otherwise it is
> preferable to keep the checkpatch warning in this case.

A couple of options for comedi:

1: Use #define pr_fmt(fmt) "comedi: " fmt
   pr_<level>(format, ...)

2: Create some comedi logging functions or macros like:
   	comedi_<level>(fmt, arg...) (ie: comedi_info, comedi_err, etc)
   where "comedi:" is always prefixed and an
   optional #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
   could be used.

That'd shorten line lengths quite a bit and add
some better standardization to comedi.



  reply	other threads:[~2010-06-13  5:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-12 10:14 Henri Häkkinen
2010-06-13  2:14 ` Mark Rankilor
2010-06-13  5:07   ` Joe Perches [this message]
2010-06-13  5:30     ` Joe Perches
2010-06-13 11:27       ` Henri Häkkinen
2010-06-13 18:11         ` Joe Perches
2010-06-17 22:51       ` Greg KH
2010-06-17 23:15         ` Joe Perches
2010-06-17 23:28           ` Greg KH
2010-06-17 23:47             ` Joe Perches
2010-06-18 12:16               ` Ian Abbott
2010-06-12 11:04 Henri Häkkinen
2010-06-14  6:34 Henri Häkkinen
2010-06-17 23:02 ` Greg KH

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=1276405626.1449.26.camel@Joe-Laptop.home \
    --to=joe@perches.com \
    --cc=andrea.gelmini@gelma.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=henuxd@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reodge@gmail.com \
    /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

all inboxes | Powered by JetHome®