Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp505579ybx; Wed, 30 Oct 2019 19:11:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqy30vNd5g6kRGeGbb6uQZdbvfeXP96CduHjSoEFFL+dLRFZwpRIRzfGjJITipif4tImJz/b X-Received: by 2002:a17:907:42cc:: with SMTP id nz20mr1338811ejb.324.1572487864613; Wed, 30 Oct 2019 19:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572487864; cv=none; d=google.com; s=arc-20160816; b=Hj9wqUvrmFWEy+g4YP9tfRDmC69nT9TNZRDVdBg6PuCArsN3YKXppswum8OTGN2Too 25OR+WseJ3KJTN6vYy7cwbi61MJBDBG4lTfADlMERaAPm4LGSx8HOlBLdT+xhBiPvCmc xvwkseW9Ms3XpHUF41/Ni+0LLczDI9weZ+P7N5toX2XB1sWVKEdnlm1kj/2crvz/SpXl iTX9fkLo6gy6gnCCcrVFtsRQel9PtF5g6fOdoUVqLlmMkoNGijCEGRh8UP7f9YbBY6uR s47ne0s2aNTIyPCvWSkPf0b0BdJIJxHIGxn79qa2YYQzoZNALl4WJS/ZoVUuQ3oD05ZJ /PZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YI44zesxZRhYNZfnCnbeDYU2hmCekT4dtXSOSwje0n0=; b=k97J9KXZiY78cwfbJY9r8PYI+1xxl5MgP8lahyUqIhyfBDqG3pTzeJMf37iiIJs9kM WjdebXhCCnqjRNasqzHiXbV2kvj8SIx3yuEl6aWcnZbcwoErh17SMTqXu6ifIr94izyA PPUore2oRKpY5DyuujaqfLqcNNQfFdToQkZN4uTr5AojTPshvzY3i85X4Q+b+iWb0vJE zPw0ADaU0/sct4BBxk77/ZYunAQcaRlJh/SlCaL/IcQHxec5gJ/CvbgD0iNWIrz6YICb cteuAMRKATKEtXJVPKjbf0sThnRLR6zaFrvuvhlW2SZjN0OhQ2Y2rdIx464uQ3tNvzwl YdpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mZaA7iSb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c29si3163164edb.223.2019.10.30.19.10.41; Wed, 30 Oct 2019 19:11:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mZaA7iSb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726927AbfJaCJy (ORCPT + 99 others); Wed, 30 Oct 2019 22:09:54 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:33595 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbfJaCJo (ORCPT ); Wed, 30 Oct 2019 22:09:44 -0400 Received: by mail-qt1-f196.google.com with SMTP id y39so6419453qty.0; Wed, 30 Oct 2019 19:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YI44zesxZRhYNZfnCnbeDYU2hmCekT4dtXSOSwje0n0=; b=mZaA7iSbfheBiMmDBzz/dAyHv090K3ORpbbJUqXUxFIQMaDA9ziRVeihCsffN5uN2c yHUa215WqubXjXjyjNbPrF+jxLelqU9S9iGT3b0OQ0eKAJBuBVEyC9nR/pdhZGC2BpAq VZVLe8j2gQIDwCLkXnIu+jNBlAjjixTcBgGbzOlLgKH3KMejTEBn3LHIsiYW38lKuxJ1 HoX/pJSQ761SavJjmWXAbIQKxmCo7zoKVsGc3v4nhVJZTG0zGDuYdzWqrcpuBh3DbhAk PULQS/pRu7mehEetSBCLczuLQItfQ+z7U5N3sI0CEZEwj6OaXuyhy13H4dDOXsihcljT K4XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YI44zesxZRhYNZfnCnbeDYU2hmCekT4dtXSOSwje0n0=; b=t97dP2gAMpLZLWImrMxiHuFnLdItc/Zssa12Er0yUaSuWLdPZFpXNiOgkLGSPB7pKp aoMHZUvWiB6NAWRnTUxynvTIdeA0YOMsmdlEFJ8lFUvdwaya7sFIJbwO2XEvMFQt3IeI cS7qk0WHqtz4NF8mCDOZeb1fNLML6VVcHrSruMhCXaZs8UTAKD7WBIqdfVQFpL0xbyZy Fe6yZwze57r3UcIRXJNg/W5XPN3SbfLQoKYs7XJpUNyY97yG2jFNZj0qOH8p3Qg181vi NZXGUrVcdtwxz2dRHZjLHgLD49B9O/hykbwC1GGYPd2SvYM2MF5ShlNs0jCJqNTmq5RZ TyHw== X-Gm-Message-State: APjAAAWFMjv46eiMsuoOyDF84dZhSMaEkJnQ1H10k/8oZ3gJape4JRBL x5MF/bYe8eg0G/OBtXS8ayDs2Gw7 X-Received: by 2002:ac8:2430:: with SMTP id c45mr3298643qtc.328.1572487782440; Wed, 30 Oct 2019 19:09:42 -0700 (PDT) Received: from localhost (modemcable249.105-163-184.mc.videotron.ca. [184.163.105.249]) by smtp.gmail.com with ESMTPSA id q204sm1328006qke.39.2019.10.30.19.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2019 19:09:41 -0700 (PDT) From: Vivien Didelot To: "David S. Miller" Cc: linux-kernel@vger.kernel.org, Vivien Didelot , Florian Fainelli , Andrew Lunn , netdev@vger.kernel.org Subject: [PATCH net-next v2 6/7] net: dsa: remove limitation of switch index value Date: Wed, 30 Oct 2019 22:09:18 -0400 Message-Id: <20191031020919.139872-7-vivien.didelot@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191031020919.139872-1-vivien.didelot@gmail.com> References: <20191031020919.139872-1-vivien.didelot@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because there is no static array describing the links between switches anymore, we have no reason to force a limitation of the index value set by the device tree. Signed-off-by: Vivien Didelot --- net/dsa/dsa2.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 371f15042dad..ff2fa3950c62 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -711,8 +711,6 @@ static int dsa_switch_parse_member_of(struct dsa_switch *ds, return sz; ds->index = m[1]; - if (ds->index >= DSA_MAX_SWITCHES) - return -EINVAL; ds->dst = dsa_tree_touch(m[0]); if (!ds->dst) -- 2.23.0