public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Hansjoerg Lipp <hjlipp@web.de>
Cc: Karsten Keil <kkeil@suse.de>,
	i4ldeveloper@listserv.isdn4linux.de,
	linux-usb-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, Tilman Schmidt <tilman@imap.cc>
Subject: Re: [PATCH 2/9] isdn4linux: Siemens Gigaset drivers - common module
Date: Tue, 14 Feb 2006 19:27:00 -0800	[thread overview]
Message-ID: <20060215032659.GB5099@suse.de> (raw)
In-Reply-To: <gigaset307x.2006.02.11.001.2@hjlipp.my-fqdn.de>

Overall, all of these look fine, I only have a few minor cleanup
comments here and there...


On Sat, Feb 11, 2006 at 03:52:27PM +0100, Hansjoerg Lipp wrote:
> --- linux-2.6.16-rc2/drivers/isdn/gigaset/gigaset.h	1970-01-01 01:00:00.000000000 +0100
> +++ linux-2.6.16-rc2-gig/drivers/isdn/gigaset/gigaset.h	2006-02-11 15:20:26.000000000 +0100
> @@ -0,0 +1,938 @@
> +/* Siemens Gigaset 307x driver
> + * Common header file for all connection variants
> + *
> + * Written by Stefan Eilers <Eilers.Stefan@epost.de>
> + *        and Hansjoerg Lipp <hjlipp@web.de>
> + *
> + * Version: $Id: gigaset.h,v 1.97.4.26 2006/02/04 18:28:16 hjlipp Exp $

$Id: isn't needed within the kernel tree :)

> + * ===========================================================================
> + */
> +
> +#ifndef GIGASET_H
> +#define GIGASET_H
> +
> +#include <linux/config.h>
> +#include <linux/kernel.h>
> +#include <linux/compiler.h>
> +#include <linux/types.h>
> +#include <asm/atomic.h>
> +#include <linux/spinlock.h>
> +#include <linux/isdnif.h>
> +#include <linux/usb.h>
> +#include <linux/skbuff.h>
> +#include <linux/netdevice.h>
> +#include <linux/ppp_defs.h>
> +#include <linux/timer.h>
> +#include <linux/interrupt.h>
> +#include <linux/tty.h>
> +#include <linux/tty_driver.h>
> +#include <linux/list.h>

asm #includes should be at the end of the list.

> +
> +#define GIG_VERSION {0,5,0,0}
> +#define GIG_COMPAT  {0,4,0,0}
> +
> +#define MAX_REC_PARAMS 10                         /* Max. number of params in response string */
> +#define MAX_RESP_SIZE 512                         /* Max. size of a response string */
> +#define HW_HDR_LEN 2                              /* Header size used to store ack info */

No tabs here, yet in other places in the file, you have tabs.  Try using
them everywhere.  Also try to follow the 80 column rule where ever
possible, as per the Documentation/CodingStyle file.

> +#define MAX_EVENTS 64                          /* size of event queue */
> +
> +#define RBUFSIZE 8192
> +#define SBUFSIZE 4096				/* sk_buff payload size */
> +
> +#define MAX_BUF_SIZE (SBUFSIZE - 2)		/* Max. size of a data packet from LL */
> +#define TRANSBUFSIZE 768			/* bytes per skb for transparent receive */
> +
> +/* compile time options */
> +#define GIG_MAJOR 0
> +
> +#define GIG_MAYINITONDIAL
> +#define GIG_RETRYCID
> +#define GIG_X75
> +
> +#define MAX_TIMER_INDEX 1000
> +#define MAX_SEQ_INDEX   1000
> +
> +#define GIG_TICK (HZ / 10)

What is this needed for?  Timeouts should be in real units, right?

> +/* redefine syslog macros to prepend module name instead of entire source path */
> +/* The space before the comma in ", ##" is needed by gcc 2.95 */

gcc 2.95 isn't supported by the kernel anymore :)

> +#undef info
> +#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", THIS_MODULE ? THIS_MODULE->name : "gigaset_hw" , ## arg)

Care to use the dev_info(), dev_err() and other dev_* friends instead of
rolling your own?  It gives you a much easier and standardised way of
identifying the driver and individual device that the message is
happening for.

thanks,

greg k-h

  parent reply	other threads:[~2006-02-15  3:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-11 14:52 [PATCH 0/9] isdn4linux: add drivers for Siemens Gigaset ISDN DECT PABX Hansjoerg Lipp
2006-02-11 14:52 ` [PATCH 1/9] isdn4linux: Siemens Gigaset drivers - Kconfigs and Makefiles Hansjoerg Lipp
2006-02-11 14:52   ` [PATCH 2/9] isdn4linux: Siemens Gigaset drivers - common module Hansjoerg Lipp
2006-02-11 14:52     ` [PATCH 3/9] isdn4linux: Siemens Gigaset drivers - event layer Hansjoerg Lipp
2006-02-11 14:52       ` [PATCH 4/9] isdn4linux: Siemens Gigaset drivers - isdn4linux interface Hansjoerg Lipp
2006-02-11 14:52         ` [PATCH 5/9] isdn4linux: Siemens Gigaset drivers - tty interface Hansjoerg Lipp
2006-02-11 14:52           ` [PATCH 6/9] isdn4linux: Siemens Gigaset drivers - procfs interface Hansjoerg Lipp
2006-02-11 14:52             ` [PATCH 7/9] isdn4linux: Siemens Gigaset drivers - direct USB connection Hansjoerg Lipp
2006-02-11 14:52               ` [PATCH 8/9] isdn4linux: Siemens Gigaset drivers - isochronous data handler Hansjoerg Lipp
2006-02-11 14:52                 ` [PATCH 9/9] isdn4linux: Siemens Gigaset drivers - M105 USB DECT adapter Hansjoerg Lipp
2006-02-15  3:35                   ` Greg KH
2006-02-15  3:33               ` [PATCH 7/9] isdn4linux: Siemens Gigaset drivers - direct USB connection Greg KH
2006-02-12 10:27             ` [PATCH 6/9] isdn4linux: Siemens Gigaset drivers - procfs interface Andrew Morton
2006-02-15  1:55               ` Tilman Schmidt
2006-02-15  3:22                 ` Andrew Morton
2006-02-15  3:30             ` Greg KH
2006-02-15  3:27     ` Greg KH [this message]
2006-02-21 17:01       ` advice on using dev_info(), dev_err() and friends (was: [PATCH 2/9] isdn4linux: Siemens Gigaset drivers - common module) Tilman Schmidt
2006-02-21 23:00         ` Greg KH
2006-02-15  4:13     ` [PATCH 2/9] isdn4linux: Siemens Gigaset drivers - common module Nishanth Aravamudan
2006-02-15  3:19   ` [PATCH 1/9] isdn4linux: Siemens Gigaset drivers - Kconfigs and Makefiles Greg KH
2006-02-16 21:30     ` Tilman Schmidt
2006-02-21 17:16     ` how to handle multi-part patch dependencies (was: [PATCH 1/9] isdn4linux: Siemens Gigaset drivers - Kconfigs and Makefiles) Tilman Schmidt
2006-02-21 23:01       ` Greg KH
2006-02-12 10:29 ` [PATCH 0/9] isdn4linux: add drivers for Siemens Gigaset ISDN DECT PABX Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2005-12-11 18:20 Hansjoerg Lipp
2005-12-11 18:20 ` [PATCH 1/9] isdn4linux: Siemens Gigaset drivers - Kconfigs and Makefiles Hansjoerg Lipp
2005-12-11 18:20   ` [PATCH 2/9] isdn4linux: Siemens Gigaset drivers - common module Hansjoerg Lipp
2005-12-12 17:54     ` Stephen Hemminger
2005-12-12 18:02     ` Stephen Hemminger

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=20060215032659.GB5099@suse.de \
    --to=gregkh@suse.de \
    --cc=hjlipp@web.de \
    --cc=i4ldeveloper@listserv.isdn4linux.de \
    --cc=kkeil@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=tilman@imap.cc \
    /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