All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Alexandre Rostovtsev <tetromino@gmail.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	Marcel Holtmann <marcel@holtmann.org>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, linux-laptop@vger.kernel.org
Subject: Re: [0/3] lenovo-sl-laptop : new driver for drivers/staging
Date: Sun, 15 Feb 2009 19:29:49 +0100	[thread overview]
Message-ID: <20090215182948.GA1286@cmpxchg.org> (raw)
In-Reply-To: <4ab4bbae0902150835h1158118wcb95be75d17ec37c@mail.gmail.com>

On Sun, Feb 15, 2009 at 11:35:32AM -0500, Alexandre Rostovtsev wrote:
> On Sun, Feb 15, 2009 at 7:29 AM, Henrique de Moraes Holschuh
> <hmh@hmh.eng.br> wrote:
> > We will be happy to review the driver in linux-acpi.  Submitting it as
> > a single patch against latest Linus is probably best.
> 
> I think I found the fan speed interface; I will resubmit to linux-acpi
> after I finish it.
> 
> > Oh, and it
> > should be checkpatch-clean if it isn't already.
> 
> Checkpatch complains about static variables initialized to 0. Since
> it's my first time writing kernel code, I have to ask what are
> probably obvious questions.
> 1. Why is initializing a static variable to 0 bad? or worse than
> initializing that variable to 1, or -1?
> 2. If I want to have a module parameter whose default value is 0, what
> should I do to stop checkpatch from complaining?

Static variables are initialized to zero automatically.

	static int foo;

is equivalent to

	static int foo = 0;

      reply	other threads:[~2009-02-15 18:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-14 10:12 [0/3] lenovo-sl-laptop : new driver for drivers/staging Alexandre Rostovtsev
2009-02-14 10:16 ` [1/3] lenovo-sl-laptop : driver source Alexandre Rostovtsev
2009-02-14 10:19   ` [2/3] lenovo-sl-laptop : documentation Alexandre Rostovtsev
2009-02-14 10:22     ` [3/3] lenovo-sl-laptop : kconfig etc Alexandre Rostovtsev
2009-02-14 14:52 ` [0/3] lenovo-sl-laptop : new driver for drivers/staging Christoph Hellwig
2009-02-14 15:59   ` Marcel Holtmann
2009-02-15 12:29     ` Henrique de Moraes Holschuh
2009-02-15 16:35       ` Alexandre Rostovtsev
2009-02-15 18:29         ` Johannes Weiner [this message]

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=20090215182948.GA1286@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=hch@infradead.org \
    --cc=hmh@hmh.eng.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-laptop@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=tetromino@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.