Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp212412rdb; Tue, 5 Dec 2023 03:28:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCR70rAxUKQ4YpbyPbM1sSRI5TWm8glCt1lVp0eWLnhPDTarCenIciWDxkdTgMVOBL+0c3 X-Received: by 2002:a05:6808:118a:b0:3b8:b063:6bb4 with SMTP id j10-20020a056808118a00b003b8b0636bb4mr6891582oil.99.1701775702841; Tue, 05 Dec 2023 03:28:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701775702; cv=none; d=google.com; s=arc-20160816; b=cr5Z9wlOBSggkN/d41pJm3lgiLdW+aNTU6oxwXeZnaeGNlW8gCLealwzaCy8G85To7 e3lvmb3xakgyGH7Vnij3XzwGfPwmykgqWTYEjymyrbY/ML8x3byOOalAflHzBYqqUtT2 PRLMSmIIR46Dwa+eJ5X6CEnxmcUeQsFmy8BRi3gbypbnx1RDB9677ZZ8y0oZhd8eI+Mv 0bTyg6G/ChcOSmJ8wJbD69pGNV3u1DqX0e4vbg0fhd4uWz672g5qqF0lemJhJuWaTGO9 lLVZpBDoYvuhru0Dt5isn7iZFwAISVtEqsiSW9U1JVS2cBAVCs11qa8R0E1mSJjO3huW /Avg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zQQyxGUKk4pbCHDpcs6JlELv+pOGJjJC9lYpip2lfKM=; fh=uN3ocIkZZpR4w8rHU+bEt9agKQQkMOlALS3h0ovprww=; b=GH9xzuvhy/qVY0Ifd/ewkR/ivvptwfGLaLU6ckzrspSGSQnBy6WPnG3ERiS/X7f+O8 mbx+i81YqW67zj7q6Wls/WtQTqigKVof8UmXGBtuyqTFVZk77hLPwgIRE6sa/rxMb6Gp FWuLpsp+k3XZ/03SPMNSRFIW78GAGq5mSKRptGD4A1tMIgiCrB01UVLsA7kxsk1QdvgJ HZRtm+lrWullAQIC0XYtR0sd8g4N+mhhBwqUBAAOyUe0hYJWKTVDu1oF9X3K0T+n2wst /QMgt8pp/NIMkWEp1qfVk+V/gobamytZSRrThvbRNKplkQRDi8OiGAdPa7/t9hj1riON vT4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PBLZAOhr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id r5-20020a632045000000b005bd039e5a04si9737279pgm.622.2023.12.05.03.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:28:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PBLZAOhr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 3DEB482277AC; Tue, 5 Dec 2023 03:28:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235622AbjLEL2G (ORCPT + 99 others); Tue, 5 Dec 2023 06:28:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345061AbjLEL1r (ORCPT ); Tue, 5 Dec 2023 06:27:47 -0500 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FEE230C2; Tue, 5 Dec 2023 03:25:02 -0800 (PST) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c9fc0b84d0so30993871fa.0; Tue, 05 Dec 2023 03:25:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701775472; x=1702380272; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zQQyxGUKk4pbCHDpcs6JlELv+pOGJjJC9lYpip2lfKM=; b=PBLZAOhrWtiXt3vkeGSG4M8uPM09Xxf2V+qgz2CdCpLOoFOHYtj8IcB24uEQEj6sVl fTImgtnmvAz+vfe7d1X0w7LloS0fKtLzU047CFrmK5Gm++qRMprK34nosmxM30aoUC+G KbeM5+BGvn8OTYOlU8weVjakCWenzUHanZRtNlsfPEgfq7dsDjPiMJiTwO6mRlMmsb28 w3H9aXsRamph5Z16gZ0jutNGcsbi1hmFPX0r2g63rM5vMN8e4OuS8+D00AevHSRKIXmh WHlqNaYl34Ijb7Ko+SeuJ0rBy2QqwKFxFNgCjUXZATDPd+2qVwpfY3+vloAzePpOIyh1 Cgeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701775472; x=1702380272; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zQQyxGUKk4pbCHDpcs6JlELv+pOGJjJC9lYpip2lfKM=; b=CHWo1PTqtQh9vIgfWvtOWjLB1+Rc6h48SqUrAi6UpRJb4CJ2KMVdrvMuYH+9Jj8J6d pHMt8A24JrRoVfPjqiFOK79yARD5CrYbc1hmwsBTx3JXwYe1Dg3PFl2WCgZ+k8xC8qjG iPtVlw3FZEB2KwIIQHhni6TLNTwsZMww3YT67EfKrWWej7e9icRIwYJOrLz/k5KoOkac 1SJBolQ2LE7XeNeqmtS8/qjxI2QiH2vpXTMOS2jQ3PIzgzoXxh1ntIAzIjr4Rkb7Q/Bk 3L0T3ptveQ6C3h2PoHhMKMiFC/W6pfnpoYF854GpsHuvwwSUNIYuDq4HIGjPoKkJoT3+ 3f4Q== X-Gm-Message-State: AOJu0YyoWXV+Y9sBDmGbDf73vewcQdIkQQsDz6gD75zFdhofEayqmrRy 60NmWVg8Y2SUgE5zj+9fytE= X-Received: by 2002:a2e:9284:0:b0:2c9:cf94:94bc with SMTP id d4-20020a2e9284000000b002c9cf9494bcmr3021288ljh.33.1701775471899; Tue, 05 Dec 2023 03:24:31 -0800 (PST) Received: from skbuf ([188.27.185.68]) by smtp.gmail.com with ESMTPSA id x12-20020a170906298c00b00a1cbb055575sm412662eje.180.2023.12.05.03.24.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:24:31 -0800 (PST) Date: Tue, 5 Dec 2023 13:24:29 +0200 From: Vladimir Oltean To: Serge Semin Cc: Andrew Lunn , Heiner Kallweit , Russell King , Alexandre Torgue , Jose Abreu , Jose Abreu , Maxime Chevallier , Tomer Maimon , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 01/16] net: pcs: xpcs: Drop sentinel entry from 2500basex ifaces list Message-ID: <20231205112429.bp6lpvj4klrfrrim@skbuf> References: <20231205103559.9605-1-fancer.lancer@gmail.com> <20231205103559.9605-2-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231205103559.9605-2-fancer.lancer@gmail.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 03:28:20 -0800 (PST) On Tue, Dec 05, 2023 at 01:35:22PM +0300, Serge Semin wrote: > There are currently two methods (xpcs_find_compat() and > xpcs_get_interfaces()) defined in the driver which loop over the available > interfaces. All of them rely on the xpcs_compat.num_interfaces field value > to get the number of interfaces. That field is initialized with the > ARRAY_SIZE(xpcs_*_interfaces) macro function call. Thus the interface > arrays are supposed to be filled with actual interface IDs and there is no > need in the dummy terminating ID placed at the end of the arrays. Let's > drop the redundant PHY_INTERFACE_MODE_MAX entry from the > xpcs_2500basex_interfaces list and the redundant > PHY_INTERFACE_MODE_MAX-based conditional statement from the > xpcs_get_interfaces() method then. It would help the readability of the commit message if you would split it into multiple paragraphs. > > Signed-off-by: Serge Semin > --- Reviewed-by: Vladimir Oltean