Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1240200
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Neil Armstrong <narmstrong@baylibre.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/5] net: dsa: add missing kfree on remove |
| Date | Tue, 06 Oct 2015 09:30:02 +0200 |
| Message-ID | <qguRc-7Jr-5@gated-at.bofh.it> (permalink) |
| References | <qfvZ0-4oI-27@gated-at.bofh.it> <qfw8F-4zM-5@gated-at.bofh.it> <qfwV6-5K3-55@gated-at.bofh.it> <qfD0t-60g-7@gated-at.bofh.it> |
| X-Original-To | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>, "David S. Miller" <davem@davemloft.net>, Florian Fainelli <f.fainelli@gmail.com>, Guenter Roeck <linux@roeck-us.net>, vivien.didelot@savoirfairelinux.com, Andrew Lunn <andrew@lunn.ch>, Fabian Frederick <fabf@skynet.be>, Pavel Nakonechny <pavel.nakonechny@skitlab.ru>, Joe Perches <joe@perches.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, nbd@openwrt.org |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=+Jf6fGc7cIPSGu4PrM9W7x/1XJKVaBL8KnKJv7EmcqA=; b=YWbS44KlYiDAKBYMx0mZx9yAM9ns8GTf+u33e1SjnJhUDWxPFeM0OL82V1piAJF+qS F3+qlTqW97W2eBmvVXnfXPmsyDKG8+nqDe2JM/+9lELwOzvbaIown+w5MSbjNAaMFyIZ XgMJBU3GOxUpA6P+NQHVQweK6NVrhC6IlsDd+aRFSAHLOVWWIUiAiDW0dBsRnfdA56kV x1xA3+6Q4+r8+EVQMoyqYnCI5D/Ead14qEIMrjY+KGabthHbAdeqS6dMf0qnrZlGoa9B dccc6492mFBYoPVtIhYwN1zwwbK9ggALfs2CWU5PMMPElwKTPO0Grs2RnWiUfT2iE+o4 xQ8A== |
| X-Gm-Message-State | ALoCoQn7m5nC5JUFSsvRp30W0Mef8wR3Hx94Z6kzi4ag8KyL+DO+XfnSfda0WDM0GW17G20KtGZk |
| X-Received | by 10.194.112.162 with SMTP id ir2mr39318513wjb.40.1444116333635; Tue, 06 Oct 2015 00:25:33 -0700 (PDT) |
| Organization | Baylibre |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 48 |
| X-Original-Date | Tue, 6 Oct 2015 08:25:33 +0100 |
| X-Original-Message-ID | <5613776D.8060103@baylibre.com> |
| X-Original-References | <560FE575.7000003@baylibre.com> <560FE731.6050600@cogentembedded.com> <560FF239.2060903@baylibre.com> <56104E99.5020105@cogentembedded.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1240200 |
Show key headers only | View raw
On 10/03/2015 10:54 PM, Sergei Shtylyov wrote:
> On 10/3/2015 6:20 PM, Neil Armstrong wrote:
>
>>> On 10/3/2015 5:25 PM, Neil Armstrong wrote:
>>>
>>>> To prevent memory leakage on unbinding, add missing kfree calls.
>>>>
>>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>>>> ---
>>>> net/dsa/dsa.c | 5 ++++-
>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
>>>> index c59fa5d..12cec40 100644
>>>> --- a/net/dsa/dsa.c
>>>> +++ b/net/dsa/dsa.c
>>>> @@ -914,8 +914,10 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst)
>>>> for (i = 0; i < dst->pd->nr_chips; i++) {
>>>> struct dsa_switch *ds = dst->ds[i];
>>>>
>>>> - if (ds != NULL)
>>>> + if (ds != NULL) {
>>>
>>> Didn;t scripts/checkpatch.pl complain here? just if (ds) is preferred in the networking code.
>>>
>>> MBR, Sergei
>>>
>> Yes,
>>
>> But I considered the cosmetic changes are not the subject of this serie.
>
> Formally, all the patches should be checkpatch-clean...
>
>> Neil
>
> MBR, Sergei
>
Sure,
How should I handle this case ?
A separate patch with the cosmetic change before the kfree addition ?
Neil
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/5] net: dsa: add missing kfree on remove Neil Armstrong <narmstrong@baylibre.com> - 2015-10-03 16:30 +0200
Re: [PATCH v2 1/5] net: dsa: add missing kfree on remove Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-03 16:40 +0200
Re: [PATCH v2 1/5] net: dsa: add missing kfree on remove Neil Armstrong <narmstrong@baylibre.com> - 2015-10-03 17:30 +0200
Re: [PATCH v2 1/5] net: dsa: add missing kfree on remove Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-04 00:00 +0200
Re: [PATCH v2 1/5] net: dsa: add missing kfree on remove Neil Armstrong <narmstrong@baylibre.com> - 2015-10-06 09:30 +0200
Re: [PATCH v2 1/5] net: dsa: add missing kfree on remove Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-06 13:20 +0200
csiph-web