Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp217945rdb; Tue, 5 Dec 2023 03:39:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMebAeyyWQ8ujyOaGsJI/zAEIcVWpP2BUL9IEhKfmpXHg9CzeKd+G4NNAwlRA5HdggKe1F X-Received: by 2002:a05:6a20:7492:b0:189:c46d:9790 with SMTP id p18-20020a056a20749200b00189c46d9790mr7062018pzd.30.1701776380031; Tue, 05 Dec 2023 03:39:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701776380; cv=none; d=google.com; s=arc-20160816; b=1AfPGYEHWfO+b9MSekRLJCkUXWGJDlt6wsfavC2fxbidPg5SpehFsyrfS9oso0nBsW WH5ZSYq8rM8BXj3mXsjm+jU/y6ZWx2EXaT/oJvHAUXAvm3cGmSVTOkjCIUTpqpCq8vzs W3iuLVLKQNPQrRdwxCpKLM9PQHrjQS9K1u+FYh+zeaU3mFcyy1ldppD/aerfQLHF7vXC RyrxhIDs1OeoHKL32fz1wJHe1d4wNNx9TBynQdzWRtNR0z6iuNW7ZjcZUbCQmMvq9MIm wB9GWa9vHV1gMPm25EHBOMKsu4WrEvKk4lBkKsOA6mcvUyAfaZmOEYWD/YqzSQ+9208l 0kcA== 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=y6buYNz993iCGb+jfBAh+xTF839hKLJuyBWYlwBk8YQ=; fh=eKlnhI9a4UTV/1Y+BPKY/OGzRnYeoIPkxWMpAQTDs6c=; b=ReBuHZaH/9P0hygSjHO/P/YZu3qP9qWSTYpypTcTVayr/i8B5+hUYkHz4C/1dzZ2St VLh/MeisMinqLzaJXzyEUqja5G440E5r43ZnJuvI1HEOPkK/xxkcdcZ9dCWc9V6Gmf5p NK3Js8XqfQEVqN4HABxbWkGEdZ/oMJbvUcnMJZdu45VY5S1tvOSlgD+K6/CQUASNSdRT k9riU+KeMldQLhmfW4+jP7RCiBI0DDNuYLIKtGMTmSKbqX2ocOh7ES1LXDPvGAiuLXfi Gr0JEcJvEpF+E9SwymU9C6q74S1HOqodJiqiWFMUqMHVXS+wCHiVDrfLbRs3P1mqSXMI REgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JXdQ3aPC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s14-20020a63d04e000000b0059d25cedc79si9440974pgi.767.2023.12.05.03.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:39:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JXdQ3aPC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 6B61F82289AB; Tue, 5 Dec 2023 03:39:37 -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 S1346891AbjLELjV (ORCPT + 99 others); Tue, 5 Dec 2023 06:39:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345137AbjLELjU (ORCPT ); Tue, 5 Dec 2023 06:39:20 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D31B985; Tue, 5 Dec 2023 03:39:26 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-50bdec453c8so4459750e87.3; Tue, 05 Dec 2023 03:39:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701776365; x=1702381165; 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=y6buYNz993iCGb+jfBAh+xTF839hKLJuyBWYlwBk8YQ=; b=JXdQ3aPCGvspU+SqH42lcZn2eQBtXdMIyhQeN2pO6+1F0unGhjiYYgqhKhvmOi7ZCV pTxvAX2k/mhUWsMj1nAUSTwY6Ys0N1rPiF3K1rMMvjInTwhml5Fz7mJH+hiUir/Lkl0D 5rjzOr4zTItQoN0AIIvfb/EKOcVXu8LpMDKk6K6BpHrPHGUJYjtyiI8ImLmQ1cAsndg+ eU50tr8tznujQeM5vlL7qvRaKjzSjW7yLA/yAHLtvbV3JFn9Alud2Hyo8WrImaadS7y/ MoN/kRQqdglgHzAFgdQt3tJBvPX7pd2IPn7SVZepmlCLGPJQG4Mqg9pm4rga4DlPW4XF Ky3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701776365; x=1702381165; 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=y6buYNz993iCGb+jfBAh+xTF839hKLJuyBWYlwBk8YQ=; b=GHyA0+uqUhFhi1kBpI1Zc3otudqZekvSSO+LfTgYC3iY6d7ctZWnBfQKbaFxT6xOX/ tgEkaFOc4LjTRvrLkKz3Zft/h9SBumBArZ87s8v0Pv8Q0SgERvyrh+cmJDrWtB3aeRrk U+i8AiIzxv8Ds1lORKydTYguXZLFAAlP536Co5gQoiB8KlkCXP43Uz0yQXGT5QD29qKK KvPgM4O/EJ7WY4cOPo11algxPD4wIx3U3P6MTIXt0aU/kFQrBmH16RfCEcPAl/QyRLUX Oa/zL4iq28vJ0r1Rlz0my3atCgraohTog+tP2tewgutxnkP2ntVclH7f4CR56v78Zws8 PtlQ== X-Gm-Message-State: AOJu0Yz9J1epxldZ0ZXj0E9eEUr0WBMj0HHTntKo+xyQMSrAK56EuYMd Glka0cywJ6LtDnSxeiiFzCg= X-Received: by 2002:a05:6512:3d8e:b0:50b:e637:b319 with SMTP id k14-20020a0565123d8e00b0050be637b319mr2982528lfv.14.1701776364975; Tue, 05 Dec 2023 03:39:24 -0800 (PST) Received: from mobilestation ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id o5-20020ac24bc5000000b0050c017fffe4sm210928lfq.122.2023.12.05.03.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:39:24 -0800 (PST) Date: Tue, 5 Dec 2023 14:39:22 +0300 From: Serge Semin To: Vladimir Oltean 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: References: <20231205103559.9605-1-fancer.lancer@gmail.com> <20231205103559.9605-2-fancer.lancer@gmail.com> <20231205112429.bp6lpvj4klrfrrim@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231205112429.bp6lpvj4klrfrrim@skbuf> 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:39:37 -0800 (PST) On Tue, Dec 05, 2023 at 01:24:29PM +0200, Vladimir Oltean wrote: > 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. Yeah, creating sometimes overcomplicated log messages is my eternal problem.) Ok. I'll split it up. > > > > > Signed-off-by: Serge Semin > > --- > > Reviewed-by: Vladimir Oltean Thanks. -Serge(y)