From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21C22CAC582 for ; Tue, 9 Sep 2025 22:26:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BiQ13dOqOnXsiZgghf3DQszwbF/onSn/b414UPGS/a0=; b=R04f9XjxyWpcjY9fdBD7aIuhCG FP4f4mhjHXk1EzKsc0WeBDkiwOXcSKxLOOfyVirDhJcAvn9rZAhdfyKvGQ6hWy5M/RMPYDfYhzmPB fco69JqvsZKQOtVwGPL5AOKroWelvm2duH7o5erchYV3IuEv/IyKjSFdIQ5TLhEGXCzystKVfTEwV YBN0wjIunF+47ZAMM4IJSuMdfSNXjPHsVj0AcUwiAWRNjF5jH31suVvqKka5EEKBV8vderiMSuda6 yQYVmWsR91tZ/JukV472sc+6r+Yh+6L+IYnmxsayzmq8G2mbFXcqTslCe7rplVcKj9KJ7dETySOd8 DMwwx8cQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uw6mg-0000000AeGP-3Kjv; Tue, 09 Sep 2025 22:25:54 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uw6me-0000000AeFw-42UR; Tue, 09 Sep 2025 22:25:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 317B543D8D; Tue, 9 Sep 2025 22:25:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B288C4CEF4; Tue, 9 Sep 2025 22:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757456752; bh=645iNWZvifz2eZ9NwLWXL2PDwmHsJ84rWYVLdtzlJcw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eDguUCwpP9DVZVJwqqXIS/8y+jxOr7scjJ9bBrqVu1QLkosCL1Q5bmmUweG86WMZs WapvOtaFO0Fw14T0KpYJewJLFCHA76Ab0TaFT7asDgviu5k/H8ADlWe9OrPy8Kw1Vp +GlOVH0potqCtmkT7JGk8dRFFMFi67AP5up6zC90pM/j5RP4YTw9OQ1M3YgOvazV+q JUzlNqx+918BupWoYts7eeW05nAvLSc5m6AGmD06XxqXT1k4DmI5DycUEKNORgm+mj xD6tAQjEYLbpYjI2BRfhJLZnOKAyFsoiUeHZEb85mVW8JJY7RBnmMWpsZMie+iIIoB fXsdel/5IWekQ== Date: Tue, 9 Sep 2025 15:25:44 -0700 From: Nathan Chancellor To: Janne Grunau Cc: Sven Peter , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Alyssa Rosenzweig , Neal Gompa , Vinod Koul , Kishon Vijay Abraham I , Thinh Nguyen , Heikki Krogerus , Philipp Zabel , Frank Li , Ran Wang , Peter Chen , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, Hector Martin Subject: Re: [PATCH v2 18/22] phy: apple: Add Apple Type-C PHY Message-ID: <20250909222544.GA3282617@ax162> References: <20250906-atcphy-6-17-v2-0-52c348623ef6@kernel.org> <20250906-atcphy-6-17-v2-18-52c348623ef6@kernel.org> <20250908181259.GC89417@robin.jannau.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250908181259.GC89417@robin.jannau.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250909_152553_039714_D0B0EB32 X-CRM114-Status: GOOD ( 16.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 08, 2025 at 08:12:59PM +0200, Janne Grunau wrote: > On Sat, Sep 06, 2025 at 03:43:31PM +0000, Sven Peter wrote: > > diff --git a/drivers/phy/apple/atc.c b/drivers/phy/apple/atc.c > > new file mode 100644 > > index 0000000000000000000000000000000000000000..9213485234873fcaafeb1d1d9de3ddf07767d552 > > --- /dev/null > > +++ b/drivers/phy/apple/atc.c > > @@ -0,0 +1,2214 @@ > > [...] > > > +static int atcphy_load_tunables(struct apple_atcphy *atcphy) > > +{ > > + int ret; > > + struct { > > + const char *dt_name; > > + struct apple_tunable **tunable; > > + } tunables[] = { > > + { "apple,tunable-fuses", &atcphy->tunables.fuses }, > > + { "apple,tunable-axi2af", &atcphy->tunables.axi2af }, > > + { "apple,tunable-common", &atcphy->tunables.common }, > > + { "apple,tunable-lane0-usb", &atcphy->tunables.lane_usb3[0] }, > > + { "apple,tunable-lane1-usb", &atcphy->tunables.lane_usb3[1] }, > > + { "apple,tunable-lane0-cio", &atcphy->tunables.lane_usb4[0] }, > > + { "apple,tunable-lane1-cio", &atcphy->tunables.lane_usb4[1] }, > > + { "apple,tunable-lane0-dp", &atcphy->tunables.lane_displayport[0] }, > > + { "apple,tunable-lane1-dp", &atcphy->tunables.lane_displayport[1] }, > > + }; > > + > > + for (int i = 0; i < ARRAY_SIZE(tunables); i++) { > > + *tunables[i].tunable = > > + devm_apple_tunable_parse(atcphy->dev, atcphy->np, tunables[i].dt_name); > > + if (IS_ERR(tunables[i].tunable)) { > > + dev_err(atcphy->dev, "Failed to read tunable %s: %ld\n", > > + tunables[i].dt_name, PTR_ERR(tunables[i].tunable)); > > + return ret; > > ret is unitialized here, could be `return PTR_ERR(tunables[i].tunable);` > instead This could also use '%pe' to symbolically print the error name instead of the integer value. dev_err(atcphy->dev, "Failed to read tunable %s: %pe\n", tunables[i].dt_name, tunables[i].tunable); Cheers, Nathan