From mboxrd@z Thu Jan 1 00:00:00 1970 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 BF8DC198A11; Wed, 3 Sep 2025 01:14:55 +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=1756862097; cv=none; b=LPtxhOmjPrd8T6shhJSh/q5YTnFAPzFUWp7+9H6sh+9yK5NcJz/f8ITj0/WhDPxoaHUMlJCqJoQstbf2PLGYsBaxH7HIy0QUFIjkugDkj0l26ubJzwzQB/KtpnLTOSHXJvWh4RoVxsqmPjqt+4VNrCj/qAtwAUHgCcBNZ+pLV0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756862097; c=relaxed/simple; bh=ZxnXYQ8ZkKMKvEsbk8LHc4SUdR1fAkcaWBlyyphdRu4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eLfmTfSAUy00RcDCKQPwxxKWqchxV0yO2tU0Cw94nG+uSz2IvefrWoBP/VhKIQdD4U42+yTJ1y4X3OEeG3y93grRddkZUpoShVNWu1cVIFJxSY+odbcY1HOMq5GHevWQMCPqw2wkKT2tK8kMAPXb8rf/YBI10MIdgSoGfUpDt3s= 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=aiI/kj9v; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="aiI/kj9v" 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=PZSY/HoeaD7tPrscM18IPaoiODDZTLWC3D2hVTC/ChY=; b=aiI/kj9vDKu+YDu6ZfZ40iYwyc nj8NmDoKeKf9KbrLqb7cU3VBgpbRiBBOvobSRIn0yl70JZo9/uV/uzComyW3fX9Gao+pcO4yecJR9 wuRl0nHlPnUwRVSeGwVvdq9KJpXxAOGOM3VTtrn24K6z6bRDbsUe/JkVisyOsHANhPDI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1utc59-006xR7-JQ; Wed, 03 Sep 2025 03:14:39 +0200 Date: Wed, 3 Sep 2025 03:14:39 +0200 From: Andrew Lunn To: Daniel Golle Cc: Hauke Mehrtens , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andreas Schirm , Lukas Stockmann , Alexander Sverdlin , Peter Christen , Avinash Jayaraman , Bing tao Xu , Liang Xu , Juraj Povazanec , "Fanni (Fang-Yi) Chan" , "Benny (Ying-Tsan) Weng" , "Livia M. Rosu" , John Crispin Subject: Re: [RFC PATCH net-next 1/6] net: dsa: lantiq_gswip: convert accessors to use regmap Message-ID: <010e24eb-953e-4d0a-845c-ba899b343e9a@lunn.ch> References: <97c2b3d65a0cd550922f809f6e6f51645ccc4ef9.1756855069.git.daniel@makrotopia.org> 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: <97c2b3d65a0cd550922f809f6e6f51645ccc4ef9.1756855069.git.daniel@makrotopia.org> > + if (ret) { > + WARN_ON_ONCE(1); WARN_ON_ONCE() returns the evaluation. So you can make this: > + if (WARN_ON_ONCE(ret) { > + dev_err(priv->dev, "failed to read switch register\n"); > + return 0; I personally think this looks better than having the (1). Andrew