From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030279AbbJ1OhL (ORCPT ); Wed, 28 Oct 2015 10:37:11 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:34857 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966168AbbJ1OhI (ORCPT ); Wed, 28 Oct 2015 10:37:08 -0400 Subject: Re: [RFC PATCH v2 3/4] net: dsa: mv88e6xxx: add common and ppu remove function To: Andrew Lunn References: <5630D7FC.4010509@baylibre.com> <20151028143524.GF2307@lunn.ch> Cc: "David S. Miller" , Florian Fainelli , Guenter Roeck , vivien.didelot@savoirfairelinux.com, Fabian Frederick , Pavel Nakonechny , Joe Perches , netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Neil Armstrong Organization: Baylibre Message-ID: <5630DD8E.4000404@baylibre.com> Date: Wed, 28 Oct 2015 15:37:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151028143524.GF2307@lunn.ch> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, On 10/28/2015 03:35 PM, Andrew Lunn wrote: > On Wed, Oct 28, 2015 at 03:13:16PM +0100, Neil Armstrong wrote: >> diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c >> index b1b14f5..6287096 100644 >> --- a/drivers/net/dsa/mv88e6xxx.c >> +++ b/drivers/net/dsa/mv88e6xxx.c >> @@ -331,6 +331,16 @@ void mv88e6xxx_ppu_state_init(struct dsa_switch *ds) >> ps->ppu_timer.function = mv88e6xxx_ppu_reenable_timer; >> } >> >> +void mv88e6xxx_ppu_state_remove(struct dsa_switch *ds) >> +{ >> + struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); >> + >> + del_timer_sync(&ps->ppu_timer); >> + >> + cancel_work_sync(&ps->bridge_work); >> + flush_work(&ps->bridge_work); >> +} >> + > > You add this function, but you don't use it anywhere? Also, why > cancel bridge work, not ppu_work? Or has that been consolidated > in some patch i'm missing? > > Andrew > It's called in the next patch, in mv88e6131_remove for mv88e6131. Neil