From: Simon Horman <horms@verge.net.au>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
spi-devel-general@lists.sourceforge.net,
linux-sh@vger.kernel.org
Subject: Re: [PATCH 1/3] SPI: spi_sh_msiof: cosmetic clean-up
Date: Tue, 25 Jan 2011 15:02:29 +1000 [thread overview]
Message-ID: <20110125050229.GA7183@verge.net.au> (raw)
In-Reply-To: <20110121170247.GB7477@angua.secretlab.ca>
On Fri, Jan 21, 2011 at 10:02:47AM -0700, Grant Likely wrote:
> On Fri, Jan 21, 2011 at 04:56:37PM +0100, Guennadi Liakhovetski wrote:
> > 1. sort headers alphabetically
> > 2. use fixed-size types u8, u16, u32 for register values and transferred data
> > 3. simplify some arithmetic operations
> > 4. remove leading spaces in front of labels
>
> There's actually good reason to leave these labels alone. Labels in
> column zero confuse diff and it gives the wrong function name. For
> example:
>
> diff --git a/drivers/spi/spi_sh_msiof.c b/drivers/spi/spi_sh_msiof.c
> index 658bd05..840164b 100644
> --- a/drivers/spi/spi_sh_msiof.c
> +++ b/drivers/spi/spi_sh_msiof.c
> @@ -682,7 +682,7 @@ err2:
> clk_put(p->clk);
> err1:
> spi_master_put(master);
> -err0:
> + err0:
> return ret;
> }
>
> See how the function name in the @@ line is 'err2' instead of
> sh_msiof_spi_probe() in this example? Indenting the labels by one
> space is an easy fix and is intentional.
>
> I've picked up the patch, but I've dropped the last two hunks.
Surely this is a bug in diff. Or perhaps put more politely,
diff isn't smart enough to realise a) this is C and b) xxx: isn't
a valid function name in C.
next prev parent reply other threads:[~2011-01-25 5:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 15:56 [PATCH 1/3] SPI: spi_sh_msiof: cosmetic clean-up Guennadi Liakhovetski
2011-01-21 17:02 ` Grant Likely
2011-01-21 17:10 ` Guennadi Liakhovetski
2011-01-21 19:12 ` Grant Likely
2011-01-25 5:02 ` Simon Horman [this message]
2011-01-25 5:26 ` Grant Likely
2011-01-25 5:47 ` Paul Mundt
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=20110125050229.GA7183@verge.net.au \
--to=horms@verge.net.au \
--cc=g.liakhovetski@gmx.de \
--cc=grant.likely@secretlab.ca \
--cc=linux-sh@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).