From: joe@perches.com (Joe Perches)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/25] drivers/i2c: Use static const char arrays
Date: Mon, 13 Sep 2010 13:16:07 -0700 [thread overview]
Message-ID: <1284408967.26719.36.camel@Joe-Laptop> (raw)
In-Reply-To: <4C8E84A0.1010606@jic23.retrosnub.co.uk>
On Mon, 2010-09-13 at 21:08 +0100, Jonathan Cameron wrote:
> Commit message is somewhat inaccurate...
Yeah, sorry 'bout that.
That's what I get for using a script.
I did write an intro with more complete description.
> > diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
> > @@ -881,7 +881,7 @@ stu300_probe(struct platform_device *pdev)
> > }
> >
> > bus_nr = pdev->id;
> > - clk_name[3] += (char)bus_nr;
> > + sprintf(clk_name, "I2C%c", '0' + bus_nr);
> I'm guessing that there are never more than a couple of these.
> Why is this method a better bet than just putting %d?
It tries to standardize the style use and it avoids possible
future checkpatch warnings of:
char foo[] = "bar"
char array could possibly be static const.
There was another use with "%1.1d" somewhere.
The end result is the same, so I don't really care much
if this sort of change is applied or not. The possible
checkpatch message could just be considered noise but
Mike Frysinger seemed to prefer it, so I thought I could
try to accommodate him.
cheers, Joe
next prev parent reply other threads:[~2010-09-13 20:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 19:47 [PATCH 00/25] treewide-next: Use static const char arrays Joe Perches
2010-09-13 19:47 ` [PATCH 05/25] drivers/i2c: " Joe Perches
2010-09-13 19:56 ` Russell King - ARM Linux
2010-09-13 20:08 ` Jonathan Cameron
2010-09-13 20:16 ` Joe Perches [this message]
2010-09-14 7:36 ` Lothar Waßmann
2010-09-14 12:57 ` Jonathan Cameron
2010-09-14 19:48 ` Russell King - ARM Linux
2010-09-14 23:23 ` Ben Dooks
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=1284408967.26719.36.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.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