public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: minor bug ?
Date: Tue, 01 Mar 2011 18:43:28 +0000	[thread overview]
Message-ID: <20110301184328.GW18043@bicker> (raw)
In-Reply-To: <20110301154301.GS18043@bicker>

On Tue, Mar 01, 2011 at 10:22:16AM -0800, Randy Dunlap wrote:
> Are these duplicates?
> 
> struct some_struct;
> 
> is used as a notice to the compiler that the struct * may be used without knowing
> what the struct looks like.  That keeps us from having to #include <struct.h>
> every time that only struct * is used (struct->member is not used).
> 

Right forward declarations.  But they're declared twice in the same
file.

To me this like one of those things that you would fix if you notice it,
but you wouldn't go out of your way to look for them.  They don't hurt
anything and it's sort of easy to make a mistake when you patch them.

When the original poster emails, my response is that it's great that 
people are reading the code and I like to encourage newbies.

But really if someone went through and systematically got rid of all the
duplicated forward declarations, I'd secretly wish that they did
something more productive and that I didn't have to review all the 
changes.  Those kind of changes don't make the kernel run better but
they can break the compile.

regards,
dan carpenter


  parent reply	other threads:[~2011-03-01 18:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 15:43 minor bug ? Dan Carpenter
2011-03-01 15:44 ` Prashant Shah
2011-03-01 17:39 ` Nicolas Kaiser
2011-03-01 17:53 ` Dan Carpenter
2011-03-01 18:22 ` Randy Dunlap
2011-03-01 18:43 ` Dan Carpenter [this message]
2011-03-01 18:50 ` Randy Dunlap

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=20110301184328.GW18043@bicker \
    --to=error27@gmail.com \
    --cc=kernel-janitors@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