Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967360AbdCXThQ (ORCPT ); Fri, 24 Mar 2017 15:37:16 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:43488 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967445AbdCXTgx (ORCPT ); Fri, 24 Mar 2017 15:36:53 -0400 Date: Fri, 24 Mar 2017 12:36:52 -0700 (PDT) Message-Id: <20170324.123652.1821802503059612387.davem@davemloft.net> To: clabbe.montjoie@gmail.com Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: stmmac: add set_mac to the stmmac_ops From: David Miller In-Reply-To: <20170323134022.18740-1-clabbe.montjoie@gmail.com> References: <20170323134022.18740-1-clabbe.montjoie@gmail.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / 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]); Fri, 24 Mar 2017 12:36:52 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 617 Lines: 17 From: Corentin Labbe Date: Thu, 23 Mar 2017 14:40:22 +0100 > Two different set_mac functions exists but stmmac_dwmac4_set_mac() is > only used for enabling and never for disabling. > So on dwmac4, the MAC RX/TX is never disabled. > > This patch add a generic function pointer set_mac() to stmmac_ops and > replace all call to stmmac_set_mac/stmmac_dwmac4_set_mac by a call to > this pointer. > > Since dwmac4_ops is const, set_mac cannot be modified after, and so dwmac4_ops > is duplioacted like dwmac4_dma_ops. > > Signed-off-by: Corentin Labbe Applied.