From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753844AbbJGLkw (ORCPT ); Wed, 7 Oct 2015 07:40:52 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:53195 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbbJGLku (ORCPT ); Wed, 7 Oct 2015 07:40:50 -0400 Date: Wed, 07 Oct 2015 04:56:33 -0700 (PDT) Message-Id: <20151007.045633.344434060767220177.davem@davemloft.net> To: narmstrong@baylibre.com Cc: f.fainelli@gmail.com, linux@roeck-us.net, vivien.didelot@savoirfairelinux.com, andrew@lunn.ch, fabf@skynet.be, pavel.nakonechny@skitlab.ru, joe@perches.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, nbd@openwrt.org, sergei.shtylyov@cogentembedded.com Subject: Re: [PATCH v3 0/5] net: dsa: complete and fix the dsa unbinding From: David Miller In-Reply-To: <5613DD2E.1070209@baylibre.com> References: <5613DD2E.1070209@baylibre.com> X-Mailer: Mew version 6.4 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 07 Oct 2015 04:40:50 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Neil Armstrong Date: Tue, 6 Oct 2015 15:39:42 +0100 > In order to cleanly unbind the dsa core, either as a module removal, > or a platform device unbind, switch the allocation the their devm_ > counterparts and complete the destroy functions. > > First, the missing kfree were added, the remove function were > completed then kfree were removed in favor to devm_ calls. > > The last patch is an way to cleanly exit the probe when no > switch is found in the discover process. > > The patches are based on the current net. > > v3: > - make checkpatch happy with 1/5 & 5/5 > - fix 5/5 exit path with a goto Series applied, thanks Neil.