From: Joe Perches <joe@perches.com>
To: Jesper Falk <jesperfalk94@gmail.com>
Cc: anton@enomsg.org, dwmw2@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Power: ab8500: Fixed coding style issues
Date: Sun, 05 Jan 2014 17:05:58 -0800 [thread overview]
Message-ID: <1388970358.5808.37.camel@joe-AO722> (raw)
In-Reply-To: <1388969418-30376-1-git-send-email-jesperfalk94@gmail.com>
On Mon, 2014-01-06 at 01:50 +0100, Jesper Falk wrote:
> Fixed coding style.
It'd be nice to change some of these arrays to const too like:
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h
index 3301b20..9fa8c0c 100644
--- a/include/linux/mfd/abx500.h
+++ b/include/linux/mfd/abx500.h
@@ -287,8 +287,8 @@ struct abx500_bm_data {
int gnd_lift_resistance;
int n_chg_out_curr;
int n_chg_in_curr;
- int *chg_output_curr;
- int *chg_input_curr;
+ const int *chg_output_curr;
+ const int *chg_input_curr;
const struct abx500_maxim_parameters *maxi;
const struct abx500_bm_capacity_levels *cap_levels;
struct abx500_battery_type *bat_type;
> diff --git a/drivers/power/ab8500_bmdata.c b/drivers/power/ab8500_bmdata.c
[]
> @@ -448,19 +448,19 @@ static const struct abx500_bm_charger_parameters chg = {
> * AB8500 values
> */
> static int ab8500_charge_output_curr_map[] = {
static const int
> - 100, 200, 300, 400, 500, 600, 700, 800,
> - 900, 1000, 1100, 1200, 1300, 1400, 1500, 1500,
> + 100, 200, 300, 400, 500, 600, 700, 800,
> + 900, 1000, 1100, 1200, 1300, 1400, 1500, 1500,
> };
>
> static int ab8540_charge_output_curr_map[] = {
here too
> - 0, 0, 0, 75, 100, 125, 150, 175,
> - 200, 225, 250, 275, 300, 325, 350, 375,
> - 400, 425, 450, 475, 500, 525, 550, 575,
> - 600, 625, 650, 675, 700, 725, 750, 775,
> - 800, 825, 850, 875, 900, 925, 950, 975,
> - 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175,
> - 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375,
> - 1400, 1425, 1450, 1500, 1600, 1700, 1900, 2000,
> + 0, 0, 0, 75, 100, 125, 150, 175,
> + 200, 225, 250, 275, 300, 325, 350, 375,
> + 400, 425, 450, 475, 500, 525, 550, 575,
> + 600, 625, 650, 675, 700, 725, 750, 775,
> + 800, 825, 850, 875, 900, 925, 950, 975,
> + 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175,
> + 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375,
> + 1400, 1425, 1450, 1500, 1600, 1700, 1900, 2000,
> };
>
> /*
> @@ -468,19 +468,19 @@ static int ab8540_charge_output_curr_map[] = {
> * AB8500 values
> */
> static int ab8500_charge_input_curr_map[] = {
> - 50, 98, 193, 290, 380, 450, 500, 600,
> - 700, 800, 900, 1000, 1100, 1300, 1400, 1500,
> + 50, 98, 193, 290, 380, 450, 500, 600,
> + 700, 800, 900, 1000, 1100, 1300, 1400, 1500,
> };
here 3
> static int ab8540_charge_input_curr_map[] = {
> - 25, 50, 75, 100, 125, 150, 175, 200,
> - 225, 250, 275, 300, 325, 350, 375, 400,
> - 425, 450, 475, 500, 525, 550, 575, 600,
> - 625, 650, 675, 700, 725, 750, 775, 800,
> - 825, 850, 875, 900, 925, 950, 975, 1000,
> - 1025, 1050, 1075, 1100, 1125, 1150, 1175, 1200,
> - 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400,
> - 1425, 1450, 1475, 1500, 1500, 1500, 1500, 1500,
> + 25, 50, 75, 100, 125, 150, 175, 200,
> + 225, 250, 275, 300, 325, 350, 375, 400,
> + 425, 450, 475, 500, 525, 550, 575, 600,
> + 625, 650, 675, 700, 725, 750, 775, 800,
> + 825, 850, 875, 900, 925, 950, 975, 1000,
> + 1025, 1050, 1075, 1100, 1125, 1150, 1175, 1200,
> + 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400,
> + 1425, 1450, 1475, 1500, 1500, 1500, 1500, 1500,
> };
and here.
prev parent reply other threads:[~2014-01-06 1:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 0:50 Jesper Falk
2014-01-06 1:05 ` Joe Perches [this message]
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=1388970358.5808.37.camel@joe-AO722 \
--to=joe@perches.com \
--cc=anton@enomsg.org \
--cc=dwmw2@infradead.org \
--cc=jesperfalk94@gmail.com \
--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
all inboxes | Powered by JetHome®