Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp766754ybj; Tue, 5 May 2020 07:16:16 -0700 (PDT) X-Google-Smtp-Source: APiQypIVKXFd1yEbJ7csyzLrjJ4/o/VFCJmOHczKjGJf315jL+hROkEJyizzcHw2j4N5XduwdYkj X-Received: by 2002:a05:6402:558:: with SMTP id i24mr2678958edx.347.1588688176289; Tue, 05 May 2020 07:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588688176; cv=none; d=google.com; s=arc-20160816; b=dGs5TRzt4dBpX3N90XKvnLrfrjb+2SVgHOq+igGPobrkNkFaEnufmhX2vOTn/fkgbk nVc+xiFo/8xYacUMcGHCRnTTdicWnnJ+yDnBa1UDZcC2JIbICIc2WOS8dhV1KSgDUhoI yozPYPpIGq12UhuKr0GlMDVL3zAdUQSXjgpsN+WBxoPUm8J3o5TLTo3ki1jUsm31l+9L /nPWIxx1EScxxjT6LG5pcf+CIY0JAUsi7fuNUwo+hUeqpx9fi+2Kq9wAnMOdME+HA3cg a/QgbY/pu0xDMUQBnkczuaxwzMwqXolJIWhBg4o5iVew6DOR2ocYtMUF4v58D4wc4cVf uwcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vUI7H3zEQ9H8QIwCQ24EAq2pWsz3laTp86kjJwGCy2A=; b=uE6zn85e4iXZti3PrC2nKnn+4vDv80eIKyzEePWgtyTe/qP6nabKVqrVs2WIFIVifH IHMQKQhUYgUtLTfxpt+vJBaenzkEJKG7TeFT4GS2ImatCTZpCmCQsAcajWciXk10G7pV Auwlp5pzHhB4UagFQhQHJyvQ6wikc1coir354NugbliVl4u+/atPBJnOK1+ebFwqcFh5 gQnVS1E2jZEDuyJqTH6u0nreGPuDBpc0Il8xFLKo0hqkhWNIEOvB8EV9JwnFCD408GKy h3pX/mjkxB9wGK6jQZaqcHIQ6gqtfjR2o8yVsrPsPNrMult7hgk9ZjcSQRFruRjcprNi V9ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YkZw8YQX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si1208500edf.212.2020.05.05.07.15.46; Tue, 05 May 2020 07:16:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YkZw8YQX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729315AbgEEONg (ORCPT + 99 others); Tue, 5 May 2020 10:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729146AbgEEONf (ORCPT ); Tue, 5 May 2020 10:13:35 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B1E4C061A0F; Tue, 5 May 2020 07:13:35 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id mq3so1186874pjb.1; Tue, 05 May 2020 07:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vUI7H3zEQ9H8QIwCQ24EAq2pWsz3laTp86kjJwGCy2A=; b=YkZw8YQXDccsDbBS4C0O5LMJGsSXIuT1ovPSHZeibMB4ZhJbetT5karBIQDGZyMu0k IBdRJNOVOa1GNEbhoAuCCrvOK95e4ExfkjwNMMqw8yyFSpe6/HZclQjj/o/y/DEjyXQf D8bD98dH4TU8N9iILFu6DwhyrLrlFYj24qKgldff3S35uVjPxaC8qpPHMbhOElowls51 NA+CUw+XfSpefYj0MsjjxqdD/1An+fcrvFfnPRdSVMHOAFB4Q7IZukrTfCHjNl6LuXlX SkcXFYf+6CloWECw34gLTvnp/U4XgJ2AEyem4IDuABqVEJH0tksWHndPxMQsIdIQQlgL 50zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vUI7H3zEQ9H8QIwCQ24EAq2pWsz3laTp86kjJwGCy2A=; b=T/TvscqHdAIbMR/l9sfaTewI3wA0V+khggHHL3YFmdAyCvd1e1LkHhj33RmC7V3klf YQyheZtE8PimCDkc/EdiMIdMFIMgDt8TxXDOGyG/Yr5tRNQotUji9SMxzDKF3l1Az5Rx Dy/Q2oF8vl9xexPWXa97iw6ZWr69rwrKXmE/ri5Yplg97c38W4Te9VQjuNBmYAydYWJn h6xm12uxfEfVlUWrZfSqwgwu68h/KLC0SvGgtyVGugdUCf1PhK0qW2NRbh04q31tNuz+ 9s0XkPbNT0RjVEeXVEx7Q3yN5Z8q3sdz2Y2SP1Fak01Ety715SdKOEyQ9Ln5+T+RVvrF N9Hg== X-Gm-Message-State: AGi0PuZYt4ZOwzb4DO6RhM+acBpokbvxX//GHQ0qfPzJHk7+6gVgz3lR DXSSWABZRi1x0PfVLxbe27g8OPLfqSVqDIYdUZk= X-Received: by 2002:a17:90a:37a3:: with SMTP id v32mr3401271pjb.2.1588688015023; Tue, 05 May 2020 07:13:35 -0700 (PDT) MIME-Version: 1.0 References: <20200505132905.10276-1-calvin.johnson@oss.nxp.com> <20200505132905.10276-4-calvin.johnson@oss.nxp.com> In-Reply-To: <20200505132905.10276-4-calvin.johnson@oss.nxp.com> From: Andy Shevchenko Date: Tue, 5 May 2020 17:13:28 +0300 Message-ID: Subject: Re: [net-next PATCH v3 3/5] phylink: Introduce phylink_fwnode_phy_connect() To: Calvin Johnson Cc: "Rafael J . Wysocki" , Russell King - ARM Linux admin , linux.cj@gmail.com, Jeremy Linton , Andrew Lunn , Florian Fainelli , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Greg Kroah-Hartman , Heikki Krogerus , Varun Sethi , "Rajesh V . Bikkina" , ACPI Devel Maling List , Linux Kernel Mailing List , Diana Madalina Craciun , netdev , Marcin Wojtas , Laurentiu Tudor , Makarand Pawagi , linux-arm Mailing List , Pankaj Bansal , "David S. Miller" , Heiner Kallweit Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 5, 2020 at 4:29 PM Calvin Johnson wrote: > > Define phylink_fwnode_phy_connect() to connect phy specified by > a fwnode to a phylink instance. ... > + int ret = 0; Redundant assignment. > + if ((IS_ERR(phy_fwnode)) && pl->cfg_link_an_mode == MLO_AN_PHY) No Lisp, please. > + return -ENODEV; ... > + phy_dev = fwnode_phy_find_device(phy_fwnode); > + fwnode_handle_put(phy_fwnode); Hmm... Isn't it racy? I mean if you put fwnode here the phy_dev may already be gone before you call phy_attach_direct, right? > + if (!phy_dev) > + return -ENODEV; > + > + ret = phy_attach_direct(pl->netdev, phy_dev, flags, > + pl->link_interface); > + if (ret) > + return ret; > + > + ret = phylink_bringup_phy(pl, phy_dev, pl->link_config.interface); > + if (ret) > + phy_detach(phy_dev); > + > + return ret; -- With Best Regards, Andy Shevchenko