From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752609AbdEPQiN (ORCPT ); Tue, 16 May 2017 12:38:13 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:50780 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876AbdEPQiL (ORCPT ); Tue, 16 May 2017 12:38:11 -0400 Date: Tue, 16 May 2017 12:38:09 -0400 (EDT) Message-Id: <20170516.123809.1468879091622494215.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 1/2] net-next: stmmac: add adjust_link function From: David Miller In-Reply-To: <20170515114140.1676-1-clabbe.montjoie@gmail.com> References: <20170515114140.1676-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]); Tue, 16 May 2017 08:56:39 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Corentin Labbe Date: Mon, 15 May 2017 13:41:39 +0200 > My dwmac-sun8i serie will add some if (has_sun8i) to > stmmac_adjust_link() > Since the current stmmac_adjust_link() alreaady have lots of if (has_gmac/gmac4), > It is now better to create an adjust_link() function for each dwmac. > > So this patch add an adjust_link() function pointer, and move code out > of stmmac_adjust_link to it. > > Removing in the process stmmac_mac_flow_ctrl/stmmac_hw_fix_mac_speed > since there not used anymore. > > Signed-off-by: Corentin Labbe This will introduce crashes because you only added the adjust_link method to one of the two stmmac_ops instances in drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c Furthermore, a patch series should always have a header posting with subject of the format "[PATCH 0/N]: xxx" which describes at a high level what the patch series does as a whole, how it is doing it, and why it is doing it that way. Thank you.