diff mbox

tps65090-charger: Delete an error message for a failed memory allocation in two functions

Message ID aa138aa9-d8c9-c6e3-7071-9fc642e7b248@users.sourceforge.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

SF Markus Elfring Dec. 16, 2017, 6:43 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 16 Dec 2017 19:32:02 +0100

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/power/supply/tps65090-charger.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Joe Perches Dec. 16, 2017, 6:53 p.m. UTC | #1
On Sat, 2017-12-16 at 19:43 +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 16 Dec 2017 19:32:02 +0100
> 
> Omit an extra message for a memory allocation failure in these functions.

Because???

Fix your commit message.

Say _WHY_ should this be applied.

Otherwise, just stop sending these patches.
SF Markus Elfring Dec. 16, 2017, 8:30 p.m. UTC | #2
>> Omit an extra message for a memory allocation failure in these functions.
> 
> Because???
> 
> Fix your commit message.
> 
> Say _WHY_ should this be applied.

I am still waiting for possibilities to improve also the corresponding
reference documentation somehow as you know it already.

Regards,
Markus
Julia Lawall Dec. 16, 2017, 8:36 p.m. UTC | #3
On Sat, 16 Dec 2017, SF Markus Elfring wrote:

> >> Omit an extra message for a memory allocation failure in these functions.
> >
> > Because???
> >
> > Fix your commit message.
> >
> > Say _WHY_ should this be applied.
>
> I am still waiting for possibilities to improve also the corresponding
> reference documentation somehow as you know it already.

If you require someone else to update the documentation to be able to
explain why the patch is useful, then it would seem that you do not know
why the patch is useful, and thus should not submit it.

julia


>
> Regards,
> Markus
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Joe Perches Dec. 16, 2017, 8:40 p.m. UTC | #4
On Sat, 2017-12-16 at 21:30 +0100, SF Markus Elfring wrote:
> > > Omit an extra message for a memory allocation failure in these functions.
> > 
> > Because???
> > 
> > Fix your commit message.
> > 
> > Say _WHY_ should this be applied.
> 
> I am still waiting for possibilities to improve also the corresponding
> reference documentation somehow as you know it already.

Don't submit any more patches until you do
have this resolved.
SF Markus Elfring Dec. 16, 2017, 8:47 p.m. UTC | #5
>> I am still waiting for possibilities to improve also the corresponding
>> reference documentation somehow as you know it already.
> 
> If you require someone else to update the documentation to be able to
> explain why the patch is useful,

My approach is to refer to the Linux allocation failure report.


> then it would seem that you do not know why the patch is useful,
> and thus should not submit it.

We tried to clarify other explanation approaches a few times.

But it seems that we are stuck with specific software aspects.
How would you like to see remaining open issues to be resolved there anyhow?

Regards,
Markus
SF Markus Elfring Dec. 16, 2017, 8:52 p.m. UTC | #6
>> I am still waiting for possibilities to improve also the corresponding
>> reference documentation somehow as you know it already.
> 
> Don't submit any more patches until you do have this resolved.

I imagine that some contributors will need to work better together
for this task.

It seems that I did not get any more constructive answers for my questions
in this direction so far.

Regards,
Markus
Sebastian Reichel Dec. 18, 2017, 5:24 p.m. UTC | #7
Hi,

On Sat, Dec 16, 2017 at 09:47:34PM +0100, SF Markus Elfring wrote:
> >> I am still waiting for possibilities to improve also the corresponding
> >> reference documentation somehow as you know it already.
> > 
> > If you require someone else to update the documentation to be able to
> > explain why the patch is useful,
> 
> My approach is to refer to the Linux allocation failure report.
> 
> 
> > then it would seem that you do not know why the patch is useful,
> > and thus should not submit it.
> 
> We tried to clarify other explanation approaches a few times.
> 
> But it seems that we are stuck with specific software aspects.
> How would you like to see remaining open issues to be resolved
> there anyhow?

FYI: I will drop this and (without any further notice) all future
patches from you, that do no follow the documented process in
Documentation/process/.

-- Sebastian
SF Markus Elfring Dec. 18, 2017, 5:32 p.m. UTC | #8
>> But it seems that we are stuck with specific software aspects.
>> How would you like to see remaining open issues to be resolved
>> there anyhow?
> 
> FYI: I will drop this and (without any further notice) all future
> patches from you, that do no follow the documented process in
> Documentation/process/.

Which details do you find that do not fit to this development specification
so far?

Are there any update suggestions left over which you could eventually accept?

Regards,
Markus
diff mbox

Patch

diff --git a/drivers/power/supply/tps65090-charger.c b/drivers/power/supply/tps65090-charger.c
index 1b4b5e09538e..43c44d2eaeca 100644
--- a/drivers/power/supply/tps65090-charger.c
+++ b/drivers/power/supply/tps65090-charger.c
@@ -202,10 +202,8 @@  static struct tps65090_platform_data *
 	unsigned int prop;
 
 	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-	if (!pdata) {
-		dev_err(&pdev->dev, "Memory alloc for tps65090_pdata failed\n");
+	if (!pdata)
 		return NULL;
-	}
 
 	prop = of_property_read_bool(np, "ti,enable-low-current-chrg");
 	pdata->enable_low_current_chrg = prop;
@@ -257,10 +255,8 @@  static int tps65090_charger_probe(struct platform_device *pdev)
 	}
 
 	cdata = devm_kzalloc(&pdev->dev, sizeof(*cdata), GFP_KERNEL);
-	if (!cdata) {
-		dev_err(&pdev->dev, "failed to allocate memory status\n");
+	if (!cdata)
 		return -ENOMEM;
-	}
 
 	platform_set_drvdata(pdev, cdata);