From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753802AbdKIJE7 (ORCPT ); Thu, 9 Nov 2017 04:04:59 -0500 Received: from aibo.runbox.com ([91.220.196.211]:60972 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753578AbdKIJE4 (ORCPT ); Thu, 9 Nov 2017 04:04:56 -0500 Subject: Re: [PATCH net-next 1/6] net: dsa: remove trans argument from mdb ops To: Vivien Didelot , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli , Andrew Lunn References: <20171108171917.5965-1-vivien.didelot@savoirfairelinux.com> <20171108171917.5965-2-vivien.didelot@savoirfairelinux.com> From: Egil Hjelmeland Message-ID: <01a09219-c348-5aa5-c052-c8ea505c769d@egil-hjelmeland.no> Date: Thu, 9 Nov 2017 10:04:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171108171917.5965-2-vivien.didelot@savoirfairelinux.com> Content-Type: text/plain; charset=utf-8; format=flowed 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 On 08. nov. 2017 18:19, Vivien Didelot wrote: > The DSA switch MDB ops pass the switchdev_trans structure down to the > drivers, but no one is using them and they aren't supposed to anyway. > > Remove the trans argument from MDB prepare and add operations. > > - int (*port_mdb_prepare)(struct dsa_switch *ds, int port, > - const struct switchdev_obj_port_mdb *mdb, > - struct switchdev_trans *trans); > - void (*port_mdb_add)(struct dsa_switch *ds, int port, > - const struct switchdev_obj_port_mdb *mdb, > - struct switchdev_trans *trans); > + int (*port_mdb_prepare)(struct dsa_switch *ds, int port, > + const struct switchdev_obj_port_mdb *mdb); > + void (*port_mdb_add)(struct dsa_switch *ds, int port, > + const struct switchdev_obj_port_mdb *mdb); > int (*port_mdb_del)(struct dsa_switch *ds, int port, > const struct switchdev_obj_port_mdb *mdb); Hi Vivien Nice to get rid of "trans". I recall I was confused by this parameter. "Am I supposed to do something with this parameter?". But when at it. What about getting rid of switchdev_obj_port_mdb, making similar signatures as the new .port_fdb_xxx functions? Would that make sense? Egil