public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-scsi@vger.kernel.org, harvey.harrison@gmail.com
Subject: Re: [patch 08/17] scsi: replace remaining __FUNCTION__ occurrences
Date: Sun, 30 Mar 2008 09:08:27 -0500	[thread overview]
Message-ID: <1206886107.4224.12.camel@localhost.localdomain> (raw)
In-Reply-To: <20080328154518.1a178afa.akpm@linux-foundation.org>


On Fri, 2008-03-28 at 15:45 -0700, Andrew Morton wrote:
> On Fri, 28 Mar 2008 17:35:04 -0500
> James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> 
> > On Fri, 2008-03-28 at 14:48 -0700, akpm@linux-foundation.org wrote:
> > > From: Harvey Harrison <harvey.harrison@gmail.com>
> > > 
> > > __FUNCTION__ is gcc-specific, use __func__
> > 
> > I thought we basically agreed
> 
> No.

OK, so what are your reasons?  I've only heard the unpersuasive:

> 1) Currently there is a mix of __FUNCTION__ and __func__ in the
> kernel,
> and __func__ is ansi C (C99...)
> 
> 2) It's shorter
> 
> 3) When people look around to add new code, they will only see the one
> way the kernel does it.
> 
> None of which are very convincing, but there you go.


> > there was no point to this since if it
> > ever became an issue you can do 
> > 
> > #define __FUNCTION__ __func__
> > 
> > inside the include/compiler-xxx.h file
> > 
> 
> It's better to get things right at the original code site, rather than
> adding crufty back-compatibility macros.

What do you mean "get things right"?  __FUNCTION__ isn't even deprecated
in gcc (the deprecation was __FUNCTION__ string concatenation) ...
there's no sign it will ever be wrong.  It's also stylistically far more
consonant with __FILE__ and __LINE__.

> The patches are easy to prepare, easy to review and easy to merge.  There's
> no reason to not do so.

Except for the code churn in the drivers and the merge problems it
causes (The -mc tree already has this reverted in acpi to fix a merge
issue).  The greater issue is setting the bar too low for for mechanical
changes ... what's next?  C99 comments?  u32 -> uint32_t ... there are
tons of possible sweeping changes that could be justified on the above
grounds.

James



  parent reply	other threads:[~2008-03-30 14:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 21:48 [patch 08/17] scsi: replace remaining __FUNCTION__ occurrences akpm
2008-03-28 22:35 ` James Bottomley
2008-03-28 22:45   ` Andrew Morton
2008-03-28 22:48     ` Harvey Harrison
2008-03-30 14:08     ` James Bottomley [this message]
2008-03-30 15:07       ` Andrew Morton
2008-03-30 15:36         ` James Bottomley
2008-03-30 18:45           ` Harvey Harrison
2008-03-31 19:34 ` Mike Christie
2008-03-31 19:39   ` Andrew Morton

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=1206886107.4224.12.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-scsi@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