public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Ben Dooks <ben-linux@fluff.org>, linux-kernel@vger.kernel.org
Subject: Re: fs/fat - fix sparse warning
Date: Wed, 2 Nov 2005 19:04:01 +0100	[thread overview]
Message-ID: <20051102180401.GA4272@stusta.de> (raw)
In-Reply-To: <87zmophiwp.fsf@devron.myhome.or.jp>

On Mon, Oct 31, 2005 at 11:15:34PM +0900, OGAWA Hirofumi wrote:
> Ben Dooks <ben-linux@fluff.org> writes:
> 
> > move fat_cache_init/fat_cache_destroy to a common
> > header file in fs/fat so that inode.c and cache.c
> > see the same definition, and to stop warnings
> > from sparse about undeclared functions
> 
> The fs/fat/* has many internal functions, it is in
> include/linux/msdos_fs.h.  Please move those internal functions to one
> internal header (probably fs/fat/fat.h?).
> 
> This seems be just for sparse, please do real cleanup instead.

It's not only for sparse.

The -Wmissing-prototypes flag to gcc gives similar warnings, and I'm 
also cleaning up code for adding this flag to the CFLAGS.

Why?

It sometimes happens that the signature of a function changes and it is 
forgotten to update all prototypes.

If the prototype is in a header file, gcc tells about the mistake.

If the prototype is in the C file gcc can't help us and it might take 
some time until someone tracks the source of the nasty runtime problems 
this might cause.

It's your choice as subsystem maintainer which header file the 
prototypes should go into - it is only important that both the file with 
the actual function and all users of this function #include this header.

> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2005-11-02 18:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-31 11:36 fs/fat - fix sparse warning Ben Dooks
2005-10-31 13:27 ` Alexey Dobriyan
2005-10-31 14:15 ` OGAWA Hirofumi
2005-11-02 18:04   ` Adrian Bunk [this message]
2005-11-02 18:39     ` OGAWA Hirofumi

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=20051102180401.GA4272@stusta.de \
    --to=bunk@stusta.de \
    --cc=ben-linux@fluff.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    /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