Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751097Ab0FMFHN (ORCPT ); Sun, 13 Jun 2010 01:07:13 -0400 Received: from mail.perches.com ([173.55.12.10]:1097 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850Ab0FMFHM (ORCPT ); Sun, 13 Jun 2010 01:07:12 -0400 Subject: Re: [PATCH] staging:comedi: Fixed coding convention issues. From: Joe Perches To: Mark Rankilor Cc: Henri =?ISO-8859-1?Q?H=E4kkinen?= , devel@driverdev.osuosl.org, gregkh@suse.de, linux-kernel@vger.kernel.org, andrea.gelmini@gelma.net In-Reply-To: References: <1276337681-4327-1-git-send-email-henuxd@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Sat, 12 Jun 2010 22:07:06 -0700 Message-ID: <1276405626.1449.26.camel@Joe-Laptop.home> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1465 Lines: 35 On Sun, 2010-06-13 at 10:14 +0800, Mark Rankilor wrote: > 2010/6/12 Henri Häkkinen : > > - 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_(format, ...) 2: Create some comedi logging functions or macros like: comedi_(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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/