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 BD1D6347FC0; Tue, 11 Nov 2025 02:50:23 +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=1762829425; cv=none; b=tV0+9y9kLeg1RV7xEt1KkwzXXzKW8Tqf65yp8Iq6QBYmY+d6R1Xv3nfr0qG2FTcDNH7nMRQBXs2y8RrPzFqTUcKUitBymAiNHtwHddujIArrDNJSCj5MDm+/uisISCaviAdWJaCvp8RJXgHfkSXYdHS6O61oIRnnUFQ0ReWadwM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762829425; c=relaxed/simple; bh=Ehkextsnb3H1bI4S73h04f+Wm9Tj3KpfitAGNJx3ZzM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WGA1aw2UbarelRfL0SqAnyoTigcsF0r2sGBKc6zZv+VALuEDyu7xhb0bdPVmcsuRStztqGQcjoBJUWo3WAPO81Y//kcWZ8xyfL4NoPdur67IgMApHo1G1yu3ukssho/cd5uK1ix4frH15TDoKpkuPvf+1NQbjHFFMKAIRtoTYyA= 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=5S6erjir; 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="5S6erjir" 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=EwS1vYGPntoB14ZBNepjn6wd0Qs2O/QKzmssltxVrc4=; b=5S6erjirSqsiHal63K5sq2xzv/ m/zJ5YJL77xPIVaNB1mENr7DhEUFA651SzaVNff4vdOv9rzZFvh+x3gZ1wol9kL/KJYHkyx71RX1N IeoQgyy9W3a/W2JKaLIA4+uNHvxl7OIEWdb6d2FGBxh/M6ayOMLdzT//HJ4luLpo6yVg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1vIeSR-00DaBn-5m; Tue, 11 Nov 2025 03:50:11 +0100 Date: Tue, 11 Nov 2025 03:50:11 +0100 From: Andrew Lunn To: Prabhakar Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Horatiu Vultur , Geert Uytterhoeven , Vladimir Oltean , Vadim Fedorenko , Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Biju Das , Fabrizio Castro , Lad Prabhakar Subject: Re: [PATCH net-next v2 2/3] net: phy: mscc: Consolidate probe functions into a common helper Message-ID: References: <20251107201232.282152-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20251107201232.282152-3-prabhakar.mahadev-lad.rj@bp.renesas.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: <20251107201232.282152-3-prabhakar.mahadev-lad.rj@bp.renesas.com> diff(1) has not made this easy... > +static int vsc85xx_probe_common(struct phy_device *phydev, > + const struct vsc85xx_probe_config *cfg, > + const u32 *default_led_mode) > + int ret; > + /* Check rate magic if needed (only for non-package PHYs) */ > + if (cfg->check_rate_magic) { > + ret = vsc85xx_edge_rate_magic_get(phydev); > + if (ret < 0) > + return ret; > + } > > vsc8531 = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531), GFP_KERNEL); > if (!vsc8531) > return -ENOMEM; > + /* Store rate magic if it was checked */ > + if (cfg->check_rate_magic) > + vsc8531->rate_magic = ret; I think we end up with something like the above? I would move the vsc85xx_edge_rate_magic_get() after kzalloc() just to keep it all together. Andrew --- pw-bot: cr