Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933386AbdCaQdk (ORCPT ); Fri, 31 Mar 2017 12:33:40 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:41949 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933217AbdCaQdg (ORCPT ); Fri, 31 Mar 2017 12:33:36 -0400 Date: Fri, 31 Mar 2017 18:33:33 +0200 From: Andrew Lunn To: Vivien Didelot Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli Subject: Re: [PATCH net-next v2 2/9] net: dsa: mv88e6xxx: use 4-bit port for PVT data Message-ID: <20170331163333.GG12814@lunn.ch> References: <20170330213715.9666-1-vivien.didelot@savoirfairelinux.com> <20170330213715.9666-3-vivien.didelot@savoirfairelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170330213715.9666-3-vivien.didelot@savoirfairelinux.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 807 Lines: 37 > +/* Offset 0x1D: Misc Register */ > + > +static int mv88e6xxx_g2_misc_5_bit_port(struct mv88e6xxx_chip *chip, > + bool port_5_bit) > +{ > + u16 val; > + int err; > + > + err = mv88e6xxx_g2_read(chip, GLOBAL2_MISC, &val); > + if (err) > + return err; > + > + if (port_5_bit) > + val |= GLOBAL2_MISC_5_BIT_PORT; > + else > + val &= ~GLOBAL2_MISC_5_BIT_PORT; > + > + return mv88e6xxx_g2_write(chip, GLOBAL2_MISC, val); > +} > + > +int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip) > +{ > + return mv88e6xxx_g2_misc_5_bit_port(chip, false); > +} Hi Vivien Yes, i know, i'm nit-picking. The function naming is confusing here. What would you call this function: int mv88e6xxx_g2_misc_XXXXX(struct mv88e6xxx_chip *chip) { return mv88e6xxx_g2_misc_5_bit_port(chip, true); } Thanks Andrew