* [PATCH] Drivers: power: max8997_charger: Fixed coding style and irrelevant messages
@ 2015-09-29 21:22 Shivani Bhardwaj
2015-09-29 21:24 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Shivani Bhardwaj @ 2015-09-29 21:22 UTC (permalink / raw)
To: outreachy-kernel
Added blank line after declaration of variables
and commented out an unnecessary error print statement.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
drivers/power/max8997_charger.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/power/max8997_charger.c b/drivers/power/max8997_charger.c
index 0b2eab5..00127f3 100644
--- a/drivers/power/max8997_charger.c
+++ b/drivers/power/max8997_charger.c
@@ -106,6 +106,7 @@ static int max8997_battery_probe(struct platform_device *pdev)
if (pdata->eoc_mA) {
int val = (pdata->eoc_mA - 50) / 10;
+
if (val < 0)
val = 0;
if (val > 0xf)
@@ -149,7 +150,7 @@ static int max8997_battery_probe(struct platform_device *pdev)
charger = devm_kzalloc(&pdev->dev, sizeof(struct charger_data),
GFP_KERNEL);
if (charger == NULL) {
- dev_err(&pdev->dev, "Cannot allocate memory.\n");
+ /*dev_err(&pdev->dev, "Cannot allocate memory.\n");*/
return -ENOMEM;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH] Drivers: power: max8997_charger: Fixed coding style and irrelevant messages
2015-09-29 21:22 [PATCH] Drivers: power: max8997_charger: Fixed coding style and irrelevant messages Shivani Bhardwaj
@ 2015-09-29 21:24 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2015-09-29 21:24 UTC (permalink / raw)
To: Shivani Bhardwaj; +Cc: outreachy-kernel
On Wed, 30 Sep 2015, Shivani Bhardwaj wrote:
> Added blank line after declaration of variables
> and commented out an unnecessary error print statement.
See the comments on the other two patches. But another issue is that this
does two completely unrelated things. They should be in different
patches, so that if one of them turns out not to be a good idea, it will
be easier to just apply the other.
julia
> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
> ---
> drivers/power/max8997_charger.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/max8997_charger.c b/drivers/power/max8997_charger.c
> index 0b2eab5..00127f3 100644
> --- a/drivers/power/max8997_charger.c
> +++ b/drivers/power/max8997_charger.c
> @@ -106,6 +106,7 @@ static int max8997_battery_probe(struct platform_device *pdev)
>
> if (pdata->eoc_mA) {
> int val = (pdata->eoc_mA - 50) / 10;
> +
> if (val < 0)
> val = 0;
> if (val > 0xf)
> @@ -149,7 +150,7 @@ static int max8997_battery_probe(struct platform_device *pdev)
> charger = devm_kzalloc(&pdev->dev, sizeof(struct charger_data),
> GFP_KERNEL);
> if (charger == NULL) {
> - dev_err(&pdev->dev, "Cannot allocate memory.\n");
> + /*dev_err(&pdev->dev, "Cannot allocate memory.\n");*/
> return -ENOMEM;
> }
>
> --
> 2.1.0
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20150929212257.GA13394%40ubuntu.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-29 21:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 21:22 [PATCH] Drivers: power: max8997_charger: Fixed coding style and irrelevant messages Shivani Bhardwaj
2015-09-29 21:24 ` [Outreachy kernel] " Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.