Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646286 > unrolled thread

[PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-05-21 10:30 +0200
Last post2017-05-21 12:50 +0200
Articles 7 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/3] zswap: Delete an error message for a failed memory  allocation in zswap_dstmem_prepare() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-21 10:30 +0200
    Re: [PATCH 3/3] zswap: Delete an error message for a failed memory  allocation in zswap_dstmem_prepare() Wolfram Sang <wsa@the-dreams.de> - 2017-05-21 10:50 +0200
      Re: zswap: Delete an error message for a failed memory allocation in  zswap_dstmem_prepare() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-21 11:50 +0200
        Re: zswap: Delete an error message for a failed memory allocation in  zswap_dstmem_prepare() Wolfram Sang <wsa@the-dreams.de> - 2017-05-21 12:00 +0200
          Re: Using best practices for big software change possibilities SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-21 12:20 +0200
            Re: Using best practices for big software change possibilities Wolfram Sang <wsa@the-dreams.de> - 2017-05-21 12:30 +0200
              Re: Using best practices for big software change possibilities SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-21 12:50 +0200

#1646286 — [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-21 10:30 +0200
Subject[PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()
Message-ID<tJupr-5nU-5@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 21 May 2017 09:29:25 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 mm/zswap.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/zswap.c b/mm/zswap.c
index 3f0a9a1daef4..ed7312291df9 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -374,7 +374,6 @@ static int zswap_dstmem_prepare(unsigned int cpu)
-	if (!dst) {
-		pr_err("can't allocate compressor buffer\n");
+	if (!dst)
 		return -ENOMEM;
-	}
+
 	per_cpu(zswap_dstmem, cpu) = dst;
 	return 0;
 }
-- 
2.13.0

[toc] | [next] | [standalone]


#1646291

FromWolfram Sang <wsa@the-dreams.de>
Date2017-05-21 10:50 +0200
Message-ID<tJuIN-5uw-7@gated-at.bofh.it>
In reply to#1646286

[Multipart message — attachments visible in raw view] — view raw

Markus, can you please stop CCing me on every of those patches?

> Omit an extra message for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

And why do you create a patch for every occasion in the same file? Do
you want to increase your patch count?

[toc] | [prev] | [next] | [standalone]


#1646299 — Re: zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-21 11:50 +0200
SubjectRe: zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()
Message-ID<tJvES-63O-11@gated-at.bofh.it>
In reply to#1646291
> Markus, can you please stop CCing me on every of those patches?

Yes, of course.


>> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf

Did I interpret any information from your presentation slides in an
inappropriate way?


> And why do you create a patch for every occasion in the same file?

This can occasionally happen when I am more unsure about the change acceptance
for a specific place.


> Do you want to increase your patch count?

This can also happen as a side effect if such a source code search pattern
will point hundreds of places out for further software development considerations.
How would you prefer to clarify the remaining update candidates there?

Regards,
Markus

[toc] | [prev] | [next] | [standalone]


#1646303 — Re: zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

FromWolfram Sang <wsa@the-dreams.de>
Date2017-05-21 12:00 +0200
SubjectRe: zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()
Message-ID<tJvOy-660-15@gated-at.bofh.it>
In reply to#1646299

[Multipart message — attachments visible in raw view] — view raw

Markus,

> > Markus, can you please stop CCing me on every of those patches?
> 
> Yes, of course.

Thanks!

> >> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> 
> Did I interpret any information from your presentation slides in an
> inappropriate way?

Have you read my LWN article "Best practices for a big patch series"?

https://lwn.net/Articles/585782/

> > And why do you create a patch for every occasion in the same file?
> 
> This can occasionally happen when I am more unsure about the change acceptance
> for a specific place.

Why were you unsure here?

> This can also happen as a side effect if such a source code search pattern
> will point hundreds of places out for further software development considerations.
> How would you prefer to clarify the remaining update candidates there?

Maybe the article mentioned can provice further guidance?

Have a nice sunday,

   Wolfram

[toc] | [prev] | [next] | [standalone]


#1646304 — Re: Using best practices for big software change possibilities

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-21 12:20 +0200
SubjectRe: Using best practices for big software change possibilities
Message-ID<tJw7T-6tV-5@gated-at.bofh.it>
In reply to#1646303
> Have you read my LWN article "Best practices for a big patch series"?
> 
> https://lwn.net/Articles/585782/

Yes.


>> This can also happen as a side effect if such a source code search pattern
>> will point hundreds of places out for further software development considerations.
>> How would you prefer to clarify the remaining update candidates there?
> 
> Maybe the article mentioned can provice further guidance?

Partly, yes.

I am trying to achieve some software improvements also for special change patterns.
This approach can trigger corresponding communication difficulties.
How do you think about to resolve them by additional means besides mail exchange?

Regards,
Markus

[toc] | [prev] | [next] | [standalone]


#1646306 — Re: Using best practices for big software change possibilities

FromWolfram Sang <wsa@the-dreams.de>
Date2017-05-21 12:30 +0200
SubjectRe: Using best practices for big software change possibilities
Message-ID<tJwhz-6xf-3@gated-at.bofh.it>
In reply to#1646304

[Multipart message — attachments visible in raw view] — view raw

> How do you think about to resolve them by additional means besides mail exchange?

That can work. E.g. meeting at conferences often solved mail
communication problems.

For now, I still wonder why you were unsure about grouping the changes
into one patch? Maybe there is something to be learned?

[toc] | [prev] | [next] | [standalone]


#1646313 — Re: Using best practices for big software change possibilities

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-21 12:50 +0200
SubjectRe: Using best practices for big software change possibilities
Message-ID<tJwAV-6Es-5@gated-at.bofh.it>
In reply to#1646306
>> How do you think about to resolve them by additional means besides mail exchange?
> 
> That can work.

I am curious to find out which other communication means could really help here.


> E.g. meeting at conferences often solved mail communication problems.

I find my resources too limited at the moment to attend conferences on site.

How are the chances for further clarification by ordinary telephone calls?


> For now, I still wonder why you were unsure about grouping the changes
> into one patch?

I am varying the patch granularity for affected software areas to some degree.
But I came also places along where I got an impression for higher uncertainty.


> Maybe there is something to be learned?

This is also generally possible.

Would you like to extend the scope for the change pattern around questionable
error messages from a single source file to whole subsystem trees in Linux?

Regards,
Markus

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web