Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp388075lqh; Thu, 28 Mar 2024 05:24:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhcO3tduxaVKBPgm7MLfcX/vJyikRrL6iIARbEjAiq12wK1+bn16Ikqlbog6U+jyl1tnXABigivrhFadh/aZAB9aDLV7QYh+O/PM9J7Q== X-Google-Smtp-Source: AGHT+IF0wpP+awFtxYy5cmAetk64bihtaBJgNMHZmDM3KREjz1JCg+YoM0cBdDEFr9nSuJKgiQE8 X-Received: by 2002:a05:6a00:13a1:b0:6ea:df69:aa80 with SMTP id t33-20020a056a0013a100b006eadf69aa80mr656028pfg.24.1711628677483; Thu, 28 Mar 2024 05:24:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711628677; cv=pass; d=google.com; s=arc-20160816; b=pF33s+io/WCoZYkSPeq5aPSHhMUER3hxtDOm2+FpDaAJB3XIfR+SciB8SAbNXdGKGE eYWj+camU3AWrNsKcTNNTLeIE+bIskycJGF/FdnL3gTGy3xvtQma34zcBFTrbq0v5Z4e qvinUtNcAq4v9SgfQDVGvj8RxLZZmTKzBIVM1iGYgTUJAnTUxIdz/5HFI1lLU+pnHH9C ZAE5gtro4jfUhsmqd0afelTUOogzI5gw77SKohQwKG1ywOfoQm1v2P+e4e3sA7Dr+OIX vwWowlZ2TFBa3yNSipmM6uzd1ZvYIAj+5ETK172bfuF+uS0OexTO3DZWNb/Rsgs43pu2 E/vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8unRPUJ/5NLXOy2GV/8QQoMtBxlZYcDA0JkZRYJPSXM=; fh=EIDyYCD643PSDPWJn1DAwzXG9uVAN9zutgG0ofe7kGI=; b=NMkpcn0B+hFzUBt9Uy9154RfYU4KcWhyK0kpbDBDz6pNraRQU2X1GX/IDXFdf9bFxU CXu+vsQN8wNscS6I1dKKjdw1OqluguSqkYhgoc/mofNivcXVPpq02ysOckXdVfTTo/Eo A6cLf5K4lTb5bvJyG9CnOuygTE+2V5RFV7lvvJUeVneucwrlojGRMoP1Ynbxi6A+Hv0v oijleZxSFqK6mJ1X70LR2vdnKXUHm5oVinJ2AGOQmXJqeZN2eX+iXEQoQm6KVKGcSoXV kYIIWAXG4x8fPuzcCyCpQ+sPy92cbNTHWt8C30Dugtp577N2WUMrhbjWgD4S46GKauJY PnwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="cgii5U/Z"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-122883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x18-20020a656ab2000000b005e44b47f272si1316090pgu.410.2024.03.28.05.24.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 05:24:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="cgii5U/Z"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-122883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 213F2291E26 for ; Thu, 28 Mar 2024 12:24:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E61417F49B; Thu, 28 Mar 2024 12:24:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="cgii5U/Z" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4F2F7F485; Thu, 28 Mar 2024 12:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711628659; cv=none; b=HMinkxwEPBcXU1gVL0bi9eo6o64hrA51Fc2WOT3easX0c+Gd3l60t9oGPufXcB3fa5swCy2bao7fjF1sGGsmx3u9Xru1N7MNH0L+BETiXYPfTXlcpE15QKtaPpMzpnEJSXZR0BgZVVdTaXyBO8nfWVcTAGAu+6wEcRWrl18U3nM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711628659; c=relaxed/simple; bh=+KCpP6QH6INCKmhY3rhkXinCYArDLnJgU17pzm7N1sM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VNpbRZhDoQ6LcwddvRm++hGPNBTDwn0Ct9l91p75f6K1SaRN34V844ato4/h+BpagLPd2JxBeuKlwo6p+bTnFTTyiSOc3svdZEXgINMo0U6vs0T99IAOjZfVtQtSr7LC/TSrrBRHgpSdhEHWb4qeu/ycVvxBLglJ8/nkq9GkSIQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=cgii5U/Z; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=8unRPUJ/5NLXOy2GV/8QQoMtBxlZYcDA0JkZRYJPSXM=; b=cgii5U/Zdj30Vfz4+zeTdE+LAO Wceqxp0Y0bklH/H+HFEbAhSOhK2yWdOTmvX32t8UmGpSJt1/nccyQcBHCZ5/PtoRNu2W0zBDiFgBS uZ6w8TsaVbd2TYRFQVJeVLfxqWZ9cohtpMU1DECoc1qdqcn2V7Lkq74uvf9RJ7ltp+f4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rponY-00BUi7-46; Thu, 28 Mar 2024 13:24:00 +0100 Date: Thu, 28 Mar 2024 13:24:00 +0100 From: Andrew Lunn To: Kory Maincent Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oleksij Rempel , Mark Brown , Frank Rowand , Heiner Kallweit , Russell King , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project Subject: Re: [PATCH net-next v6 10/17] net: pse-pd: Add support for PSE PIs Message-ID: References: <20240326-feature_poe-v6-0-c1011b6ea1cb@bootlin.com> <20240326-feature_poe-v6-10-c1011b6ea1cb@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240326-feature_poe-v6-10-c1011b6ea1cb@bootlin.com> > +.. code-block:: > + > + +-------------+ > + | PSE PI | > + 8 -----+ +-------------+ > + 7 -----+ Rail 1 | > + 6 -----+------+----------------------+ > + 5 -----+ | | > + 4 -----+ / Rail 2 | PSE 1 > + 3 -----+----? +-------------+ > + 2 -----+----+---------? | > + 1 -----+---? +-------------+ > + | > + +-------------+ Is ? a standard markup character? I don't remember seeing it used like this before. Maybe offset the connection for pins 1 and 2 from that of 3. I mean: > + 4 -----+ / Rail 2 | PSE 1 > + 3 -----+----? +-------------+ > + 2 -----+--------+-----? | > + 1 -----+-------? +-------------+ You version is a little ambiguous, pins 1, 2 & 3 could be interconnected at the +. The text does however make it clear they are not, but i don't see any harm in making the diagram clearer. > +static int of_load_single_pse_pi_pairset(struct device_node *node, > + struct pse_pi *pi, > + int pairset_num) > +{ > + struct device_node *pairset_np; > + const char *name; > + int ret; > + > + ret = of_property_read_string_index(node, "pairset-names", > + pairset_num, &name); > + if (ret) > + return ret; > + > + if (!strcmp(name, "alternative-a")) { > + pi->pairset[pairset_num].pinout = ALTERNATIVE_A; > + } else if (!strcmp(name, "alternative-b")) { > + pi->pairset[pairset_num].pinout = ALTERNATIVE_B; > + } else { > + pr_err("pse: wrong pairset-names value %s\n", name); > + return -EINVAL; Maybe include the node path in the error message? For a 24 port switch, it will help find a typo in one of the ports. I would do this for all error messages in this code. Please add my Reviewed-by on the next version. Andrew