From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932433AbdJZXHx (ORCPT ); Thu, 26 Oct 2017 19:07:53 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:45433 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932334AbdJZXHt (ORCPT ); Thu, 26 Oct 2017 19:07:49 -0400 X-Google-Smtp-Source: ABhQp+RgoKfslZKtxPifes37NfJlAmZKIGe5Bszh8quMhfBG8NxXxQXfP+sRU0Ups0mA7cPwZosVqg== Subject: Re: [PATCH net-next 1/9] net: dsa: add dsa_is_unused_port helper To: Vivien Didelot , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn References: <20171026152259.3123-1-vivien.didelot@savoirfairelinux.com> <20171026152259.3123-2-vivien.didelot@savoirfairelinux.com> From: Florian Fainelli Message-ID: <23326961-af26-4865-14a1-6c284d530757@gmail.com> Date: Thu, 26 Oct 2017 16:07:44 -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: <20171026152259.3123-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 On 10/26/2017 08:22 AM, Vivien Didelot wrote: > As the comment above the chunk states, the b53 driver attempts to > disable the unused ports. But using ds->enabled_port_mask is misleading, > because this mask reports in fact the user ports. > > To avoid confusion and fix this, this patch introduces an explicit > dsa_is_unused_port helper which ensures the corresponding bit is not > masked in any of the switch port masks. > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian