Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751635AbdIST4F (ORCPT ); Tue, 19 Sep 2017 15:56:05 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35906 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbdIST4C (ORCPT ); Tue, 19 Sep 2017 15:56:02 -0400 X-Google-Smtp-Source: AOwi7QADUARysxF6SFq86cfy7XIgsQS/nanK33/ZJXq/nzPkEfoNYh+OhIfCaUO5XR1VBIbuCIZoGQ== Subject: Re: [PATCH net-next 1/4] net: dsa: remove copy of master ethtool_ops To: Vivien Didelot , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn References: <20170919155700.14474-1-vivien.didelot@savoirfairelinux.com> <20170919155700.14474-2-vivien.didelot@savoirfairelinux.com> From: Florian Fainelli Message-ID: Date: Tue, 19 Sep 2017 12:55:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170919155700.14474-2-vivien.didelot@savoirfairelinux.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 525 Lines: 14 On 09/19/2017 08:56 AM, Vivien Didelot wrote: > There is no need to store a copy of the master ethtool ops, storing the > original pointer in DSA and the new one in the master netdev itself is > enough. > > In the meantime, set orig_ethtool_ops to NULL when restoring the master > ethtool ops and check the presence of the master original ethtool ops as > well as its needed functions before calling them. I clearly like memcpy() too much, this looks good: Reviewed-by: Florian Fainelli -- Florian