From: Joe Perches <joe@perches•com>
To: SF Markus Elfring <elfring@users•sourceforge.net>,
netdev@vger•kernel.org, Alexey Dobriyan <adobriyan@gmail•com>,
Andrew Morton <akpm@linux-foundation•org>,
Augusto Mecking Caringi <augustocaringi@gmail•com>,
Bhumika Goyal <bhumirks@gmail•com>,
"David S. Miller" <davem@davemloft•net>,
David Windsor <dwindsor@gmail•com>,
Elena Reshetova <elena.reshetova@intel•com>,
Hans Liljestrand <ishkamiel@gmail•com>,
Jarod Wilson <jarod@redhat•com>,
Johannes Berg <johannes.berg@intel•com>,
Kees Cook <keescook@chromium•org>,
Mitchell Blank Jr <mitch@sfgoth•com>,
Roopa Prabhu <roopa@cumulusnetworks•com>
Cc: LKML <linux-kernel@vger•kernel.org>, kernel-janitors@vger•kernel.org
Subject: Re: [PATCH 1/3] net/atm: Delete an error message for a failed memory allocation in five functions
Date: Mon, 09 Oct 2017 21:18:25 -0700 [thread overview]
Message-ID: <1507609105.3552.18.camel@perches.com> (raw)
In-Reply-To: <5270f15b-5e97-0c3e-3e55-fbded48ae07d@users.sourceforge.net>
On Mon, 2017-10-09 at 22:49 +0200, SF Markus Elfring wrote:
> Omit extra messages for a memory allocation failure in these functions.
[]
> diff --git a/net/atm/mpc.c b/net/atm/mpc.c
> @@ -184,10 +184,8 @@ struct atm_mpoa_qos *atm_mpoa_add_qos(__be32 dst_ip, struct atm_qos *qos)
> }
>
> entry = kmalloc(sizeof(struct atm_mpoa_qos), GFP_KERNEL);
> - if (entry == NULL) {
> - pr_info("mpoa: out of memory\n");
> + if (!entry)
Unspecified change. Make sure your changelog is comprehensive.
> return entry;
> - }
> entry->ipaddr = dst_ip;
> entry->qos = *qos;
> @@ -473,10 +471,8 @@ static const uint8_t *copy_macs(struct mpoa_client *mpc,
> kfree(mpc->mps_macs);
> mpc->number_of_mps_macs = 0;
> mpc->mps_macs = kmalloc(num_macs * ETH_ALEN, GFP_KERNEL);
> - if (mpc->mps_macs == NULL) {
> - pr_info("(%s) out of mem\n", mpc->dev->name);
> + if (!mpc->mps_macs)
> return NULL;
etc...
next prev parent reply other threads:[~2017-10-10 4:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 20:48 [PATCH 0/3] net-ATM: Adjustments for several function implementations SF Markus Elfring
2017-10-09 20:49 ` [PATCH 1/3] net/atm: Delete an error message for a failed memory allocation in five functions SF Markus Elfring
2017-10-10 4:18 ` Joe Perches [this message]
2017-10-09 20:50 ` [PATCH 2/3] net/atm: Improve a size determination in 12 functions SF Markus Elfring
2017-10-09 20:52 ` [PATCH 3/3] net/atm: Adjust 121 checks for null pointers SF Markus Elfring
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=1507609105.3552.18.camel@perches.com \
--to=joe@perches$(echo .)com \
--cc=adobriyan@gmail$(echo .)com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=augustocaringi@gmail$(echo .)com \
--cc=bhumirks@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dwindsor@gmail$(echo .)com \
--cc=elena.reshetova@intel$(echo .)com \
--cc=elfring@users$(echo .)sourceforge.net \
--cc=ishkamiel@gmail$(echo .)com \
--cc=jarod@redhat$(echo .)com \
--cc=johannes.berg@intel$(echo .)com \
--cc=keescook@chromium$(echo .)org \
--cc=kernel-janitors@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=mitch@sfgoth$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=roopa@cumulusnetworks$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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