All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	Randy Dunlap <rdunlap@xenotime.net>,
	linux-scsi@vger.kernel.org
Subject: Re: Questions about scsi.c
Date: Tue, 30 Oct 2007 17:23:25 -0500	[thread overview]
Message-ID: <200710301723.25767.rob@landley.net> (raw)
In-Reply-To: <1193755409.3321.19.camel@localhost.localdomain>

On Tuesday 30 October 2007 9:43:29 am James Bottomley wrote:
> On Tue, 2007-10-30 at 08:34 -0400, Jeff Garzik wrote:
> > Randy Dunlap wrote:
> > > On Thu, 25 Oct 2007 16:40:35 -0500 Rob Landley wrote:
> > >> On Thursday 25 October 2007 12:32:41 pm Randy Dunlap wrote:
> > >>> !E is for exported symbols and that file has none.
> > >>> USe !I instead.
> > >>
> > >> So how do I handle a case like drivers/ata/libata-core.c which has
> > >> EXPORT_SYMBOL() calls for functions that live in (and are documented
> > >> in) other files, such as ata_scsi_ioctl() in
> > >> drivers/ata/libata-scsi.c?
...
> > Yeah I tended to prefer that all exports be in one place, rather than
> > scattered around and difficult to evaluate en masse :)
>
> My personal preference (and how I code) is export at the bottom of the
> function.  However, it's one of those stylistic things that I'm happy to
> have people code however they want (either everything at the bottom of
> the file or all exports at the bottom of the exported function) as long
> as they follow the current style of whatever file they're patching.

Actually, this one is written up in CodingStyle:

> In source files, separate functions with one blank line.  If the function
> is exported, the EXPORT* macro for it should follow immediately after the
> closing function brace line.  E.g.:
>
> int system_is_up(void)
> {
>         return system_state == SYSTEM_RUNNING;
> }
> EXPORT_SYMBOL(system_is_up);

The functional problem is that when the EXPORT_SYMBOL() is in a different file 
entirely, the documentation infrastructure doesn't pick up that it's an 
exported function.

> James

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

      reply	other threads:[~2007-10-30 22:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 11:06 Questions about scsi.c Rob Landley
2007-10-25 15:40 ` Randy Dunlap
2007-10-25 18:25   ` Rob Landley
2007-10-25 17:32     ` Randy Dunlap
2007-10-25 19:30       ` Rob Landley
2007-10-25 21:40       ` Rob Landley
2007-10-25 20:49         ` Randy Dunlap
2007-10-25 23:13           ` Rob Landley
2007-10-30 12:34           ` Jeff Garzik
2007-10-30 14:43             ` James Bottomley
2007-10-30 22:23               ` Rob Landley [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=200710301723.25767.rob@landley.net \
    --to=rob@landley.net \
    --cc=James.Bottomley@steeleye.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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.