Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1036027AbdD1O1F (ORCPT ); Fri, 28 Apr 2017 10:27:05 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:42254 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938127AbdD1O06 (ORCPT ); Fri, 28 Apr 2017 10:26:58 -0400 From: Vivien Didelot To: Andrew Lunn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli Subject: Re: [PATCH net-next 17/18] net: dsa: mv88e6xxx: support the VTU Page bit In-Reply-To: <20170428125353.GK13231@lunn.ch> References: <20170426155336.5937-1-vivien.didelot@savoirfairelinux.com> <20170426155336.5937-18-vivien.didelot@savoirfairelinux.com> <20170428125353.GK13231@lunn.ch> Date: Fri, 28 Apr 2017 10:25:15 -0400 Message-ID: <87vapo38z8.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 605 Lines: 26 Hi Andrew, Andrew Lunn writes: >> + if (val & GLOBAL_VTU_VID_PAGE) >> + entry->vid |= 0x1000; > > I'm undecided myself, so i will just bring it up for discussion. > > Maybe it would be more readable to say: > > entry->vid += 4096; > > ??? VID values are usually 12-bit. Marvell uses 13-bit VID values for the 88E6390 family. Because Marvell is Marvell, the 13th bit of the VID is the 14th bit of the VID register. It feels natural to me to stay bitwise here when handling VID values. That's not a big deal though, one can make it clearer later if needed. Thanks, Vivien