From: madhuparnabhowmik04 at gmail.com (Madhuparna Bhowmik) Subject: [Linux-kernel-mentees] [PATCH 4/4] Driver: Power: Supply: abx500_chargalg: Fixed a few coding style errors Date: Sun, 29 Sep 2019 23:49:10 +0530 [thread overview] Message-ID: <20190929181906.GA21828@madhuparna-HP-Notebook> (raw) This patch fixes a few coding style errors and warnings detected by checkpatch.pl: WARNING: please, no space before tabs ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line WARNING: Unnecessary parentheses WARNING: Block comments use a trailing */ on a separate line WARNING: Prefer 'long' over 'long int' as the int is unnecessary Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com> --- drivers/power/supply/abx500_chargalg.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/power/supply/abx500_chargalg.c b/drivers/power/supply/abx500_chargalg.c index 23757fb10479..a779fcabe3c6 100644 --- a/drivers/power/supply/abx500_chargalg.c +++ b/drivers/power/supply/abx500_chargalg.c @@ -219,7 +219,7 @@ enum maxim_ret { * @chg_info: information about connected charger types * @batt_data: data of the battery * @susp_status: current charger suspension status - * @bm: Platform specific battery management information + * @bm: Platform specific battery management information * @curr_status: Current step status for over-current protection * @parent: pointer to the struct abx500 * @chargalg_psy: structure that holds the battery properties exposed by @@ -354,13 +354,13 @@ static int abx500_chargalg_check_charger_enable(struct abx500_chargalg *di) if (di->chg_info.charger_type & USB_CHG) { return di->usb_chg->ops.check_enable(di->usb_chg, - di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, - di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); + di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, + di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); } else if ((di->chg_info.charger_type & AC_CHG) && !(di->ac_chg->external)) { return di->ac_chg->ops.check_enable(di->ac_chg, - di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, - di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); + di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, + di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); } return 0; } @@ -865,7 +865,7 @@ static enum maxim_ret abx500_chargalg_chg_curr_maxim(struct abx500_chargalg *di) di->ccm.wait_cnt = 0; - if ((di->batt_data.inst_curr > di->ccm.original_iset)) { + if (di->batt_data.inst_curr > di->ccm.original_iset) { dev_dbg(di->dev, " Maximization Ibat (%dmA) too high" " (limit %dmA) (current iset: %dmA)!\n", di->batt_data.inst_curr, di->ccm.original_iset, @@ -967,7 +967,8 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data) /* * Initialize chargers if not already done. - * The ab8500_charger*/ + * The ab8500_charger + */ if (!di->ac_chg && ext->desc->type == POWER_SUPPLY_TYPE_MAINS) di->ac_chg = psy_to_ux500_charger(ext); @@ -1173,7 +1174,8 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data) switch (ext->desc->type) { case POWER_SUPPLY_TYPE_MAINS: /* AVG is used to indicate when we are - * in CV mode */ + * in CV mode + */ if (ret.intval) di->events.ac_cv_active = true; else @@ -1182,7 +1184,8 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data) break; case POWER_SUPPLY_TYPE_USB: /* AVG is used to indicate when we are - * in CV mode */ + * in CV mode + */ if (ret.intval) di->events.usb_cv_active = true; else @@ -1750,7 +1753,7 @@ static ssize_t abx500_chargalg_curr_step_show(struct abx500_chargalg *di, static ssize_t abx500_chargalg_curr_step_store(struct abx500_chargalg *di, const char *buf, size_t length) { - long int param; + long param; int ret; ret = kstrtol(buf, 10, ¶m); @@ -1783,7 +1786,7 @@ static ssize_t abx500_chargalg_en_show(struct abx500_chargalg *di, static ssize_t abx500_chargalg_en_store(struct abx500_chargalg *di, const char *buf, size_t length) { - long int param; + long param; int ac_usb; int ret; -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: madhuparnabhowmik04@gmail.com (Madhuparna Bhowmik) Subject: [Linux-kernel-mentees] [PATCH 4/4] Driver: Power: Supply: abx500_chargalg: Fixed a few coding style errors Date: Sun, 29 Sep 2019 23:49:10 +0530 [thread overview] Message-ID: <20190929181906.GA21828@madhuparna-HP-Notebook> (raw) Message-ID: <20190929181910.ZliRpghOGG8wbVFhNOrTavoooIflTf8P6GRP1vSCet4@z> (raw) This patch fixes a few coding style errors and warnings detected by checkpatch.pl: WARNING: please, no space before tabs ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line WARNING: Unnecessary parentheses WARNING: Block comments use a trailing */ on a separate line WARNING: Prefer 'long' over 'long int' as the int is unnecessary Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04 at gmail.com> --- drivers/power/supply/abx500_chargalg.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/power/supply/abx500_chargalg.c b/drivers/power/supply/abx500_chargalg.c index 23757fb10479..a779fcabe3c6 100644 --- a/drivers/power/supply/abx500_chargalg.c +++ b/drivers/power/supply/abx500_chargalg.c @@ -219,7 +219,7 @@ enum maxim_ret { * @chg_info: information about connected charger types * @batt_data: data of the battery * @susp_status: current charger suspension status - * @bm: Platform specific battery management information + * @bm: Platform specific battery management information * @curr_status: Current step status for over-current protection * @parent: pointer to the struct abx500 * @chargalg_psy: structure that holds the battery properties exposed by @@ -354,13 +354,13 @@ static int abx500_chargalg_check_charger_enable(struct abx500_chargalg *di) if (di->chg_info.charger_type & USB_CHG) { return di->usb_chg->ops.check_enable(di->usb_chg, - di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, - di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); + di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, + di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); } else if ((di->chg_info.charger_type & AC_CHG) && !(di->ac_chg->external)) { return di->ac_chg->ops.check_enable(di->ac_chg, - di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, - di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); + di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, + di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); } return 0; } @@ -865,7 +865,7 @@ static enum maxim_ret abx500_chargalg_chg_curr_maxim(struct abx500_chargalg *di) di->ccm.wait_cnt = 0; - if ((di->batt_data.inst_curr > di->ccm.original_iset)) { + if (di->batt_data.inst_curr > di->ccm.original_iset) { dev_dbg(di->dev, " Maximization Ibat (%dmA) too high" " (limit %dmA) (current iset: %dmA)!\n", di->batt_data.inst_curr, di->ccm.original_iset, @@ -967,7 +967,8 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data) /* * Initialize chargers if not already done. - * The ab8500_charger*/ + * The ab8500_charger + */ if (!di->ac_chg && ext->desc->type == POWER_SUPPLY_TYPE_MAINS) di->ac_chg = psy_to_ux500_charger(ext); @@ -1173,7 +1174,8 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data) switch (ext->desc->type) { case POWER_SUPPLY_TYPE_MAINS: /* AVG is used to indicate when we are - * in CV mode */ + * in CV mode + */ if (ret.intval) di->events.ac_cv_active = true; else @@ -1182,7 +1184,8 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data) break; case POWER_SUPPLY_TYPE_USB: /* AVG is used to indicate when we are - * in CV mode */ + * in CV mode + */ if (ret.intval) di->events.usb_cv_active = true; else @@ -1750,7 +1753,7 @@ static ssize_t abx500_chargalg_curr_step_show(struct abx500_chargalg *di, static ssize_t abx500_chargalg_curr_step_store(struct abx500_chargalg *di, const char *buf, size_t length) { - long int param; + long param; int ret; ret = kstrtol(buf, 10, ¶m); @@ -1783,7 +1786,7 @@ static ssize_t abx500_chargalg_en_show(struct abx500_chargalg *di, static ssize_t abx500_chargalg_en_store(struct abx500_chargalg *di, const char *buf, size_t length) { - long int param; + long param; int ac_usb; int ret; -- 2.17.1
next reply other threads:[~2019-09-29 18:19 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-29 18:19 madhuparnabhowmik04 [this message] 2019-09-29 18:19 ` [Linux-kernel-mentees] [PATCH 4/4] Driver: Power: Supply: abx500_chargalg: Fixed a few coding style errors Madhuparna Bhowmik 2019-09-30 8:23 ` gregkh 2019-09-30 8:23 ` Greg KH 2019-10-14 6:58 ` sre 2019-10-14 6:58 ` Sebastian Reichel
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=20190929181906.GA21828@madhuparna-HP-Notebook \ --to=linux-kernel-mentees@lists.linux-foundation.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: linkBe 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).