From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56042C3A59E for ; Sat, 24 Aug 2019 20:52:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F8FA206BB for ; Sat, 24 Aug 2019 20:52:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nic.cz header.i=@nic.cz header.b="jWb8i2fb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727979AbfHXUwT (ORCPT ); Sat, 24 Aug 2019 16:52:19 -0400 Received: from mail.nic.cz ([217.31.204.67]:42372 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726464AbfHXUwS (ORCPT ); Sat, 24 Aug 2019 16:52:18 -0400 Received: from localhost (unknown [172.20.6.135]) by mail.nic.cz (Postfix) with ESMTPSA id E2C3A140B0B; Sat, 24 Aug 2019 22:52:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1566679937; bh=UW0mgm/VznWrGW0lGgrlw+qNAr49wgC7XHdO6vYj6Gc=; h=Date:From:To; b=jWb8i2fbqFnXm/cDIrsqTDKGThM4jcrFsmqInsNpvEh/5uL72ZxQV7nCziK3lS/Cu CadsocNwcqex24B0Iyy9XobsTIP0/RR1zt0Tpgy98OBQRkSGDOel+32V7RchadeHoS DD6ByxTTLBWp7YzWtlWUuFF7Xt5HGLQQvDyUfA2M= Date: Sat, 24 Aug 2019 22:52:16 +0200 From: Marek Behun To: Vivien Didelot Cc: netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli , Vladimir Oltean Subject: Re: [PATCH net-next v2 8/9] net: dsa: mv88e6xxx: support Block Address setting in hidden registers Message-ID: <20190824225216.264fe7b0@nic.cz> In-Reply-To: <20190824161328.GI32555@t480s.localdomain> References: <20190823212603.13456-1-marek.behun@nic.cz> <20190823212603.13456-9-marek.behun@nic.cz> <20190824161328.GI32555@t480s.localdomain> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: clamav-milter 0.100.3 at mail.nic.cz X-Virus-Status: Clean Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, 24 Aug 2019 16:13:28 -0400 Vivien Didelot wrote: > Hi Marek, >=20 > On Fri, 23 Aug 2019 23:26:02 +0200, Marek Beh=C3=BAn = wrote: > > -int mv88e6xxx_port_hidden_write(struct mv88e6xxx_chip *chip, int port,= int reg, > > - u16 val); > > +int mv88e6xxx_port_hidden_write(struct mv88e6xxx_chip *chip, int block= , int port, > > + int reg, u16 val); > > int mv88e6xxx_port_hidden_wait(struct mv88e6xxx_chip *chip); > > -int mv88e6xxx_port_hidden_read(struct mv88e6xxx_chip *chip, int port, = int reg, > > - u16 *val); > > +int mv88e6xxx_port_hidden_read(struct mv88e6xxx_chip *chip, int block,= int port, > > + int reg, u16 *val); =20 >=20 >=20 > There's something I'm having trouble to follow here. This series keeps > adding and modifying its own code. Wouldn't it be simpler for everyone > if you directly implement the final mv88e6xxx_port_hidden_{read,write} > functions taking this block argument, and update the code to switch to it? I wanted the commits to be atomic, in the sense that one commit does not do three different things at once. Renaming macros is cosmetic change, and moving functions to another file is a not a semantic change, while adding additional argument to functions is a semantic change. I can of course do all in one patch, but I though it would be better not to. > While at it, I don't really mind the "hidden" name, but is this the name > used in the documentation, if any? Yes, the registers are indeed named Hidden Registers in documentation.