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: Tue, 10 Oct 2017 04:18:25 +0000 [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...
WARNING: multiple messages have this Message-ID (diff)
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: 10+ 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:48 ` 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-09 20:49 ` SF Markus Elfring
2017-10-10 4:18 ` Joe Perches [this message]
2017-10-10 4:18 ` Joe Perches
2017-10-09 20:50 ` [PATCH 2/3] net/atm: Improve a size determination in 12 functions SF Markus Elfring
2017-10-09 20:50 ` SF Markus Elfring
2017-10-09 20:52 ` [PATCH 3/3] net/atm: Adjust 121 checks for null pointers SF Markus Elfring
2017-10-09 20:52 ` 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.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=augustocaringi@gmail.com \
--cc=bhumirks@gmail.com \
--cc=davem@davemloft.net \
--cc=dwindsor@gmail.com \
--cc=elena.reshetova@intel.com \
--cc=elfring@users.sourceforge.net \
--cc=ishkamiel@gmail.com \
--cc=jarod@redhat.com \
--cc=johannes.berg@intel.com \
--cc=keescook@chromium.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mitch@sfgoth.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.