Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp559427ybj; Thu, 7 May 2020 02:12:44 -0700 (PDT) X-Google-Smtp-Source: APiQypJia+WsZwxgaxlTTxrDzD1YFB2rMrKtaTqw5PFNyclKLyMGyMr23jNXrMpJDztl6CoqBsLu X-Received: by 2002:a50:a624:: with SMTP id d33mr11250278edc.58.1588842764058; Thu, 07 May 2020 02:12:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588842764; cv=none; d=google.com; s=arc-20160816; b=z2sRIGIR/NscS/jMZn8uOYxxnh3EsIZ0Nd4OZFdLnKfEbpAys3OGHPUN8wmv8R9FhE E8Bt/ktRxY44nkOK/v1RuMPHZgIjsrZ1+jgw4HefXXTb//5J9eWiNlDcaWY+4jVefKIO 0sgmAoUhGMbmY0syKGTv30IbvBJJp4kT0ztkLG2zxmxJyFr2HUkg2nz1MCiY/9yn4fcE AlePWMJvLeHrVqEAtIn/6lh8tIAJ5FQF7aKBzURmLkgjCiji153ECee+yBTV5vh4WGZa 6bYSOce+dfI9/Atb70F1GYRM+53dYhqAH6tg3zJI6Bn15PAn9NaXmP/fc5w3acqAIZmP HB9g== 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=JBT6KrKPDV5CjqbR8NDCy7mpTcDdeEp7C5NBrNvcrDY=; b=c7Ikgkh2BL6hXeTNO/hzAVZn0wdsgIgcsGj1CYt95BbkzB0tRrrYGL+7BQR0YmZyuq MZWKOnOzGJyPHxvNnEcpAyOWvLcBk8i/ARX3tiH9mfVGUlQkbkggj19MIves06UIKxDZ f0lwYGqa7lV+MWTzNdOGkQ8aJNLjGvXSi68hgqkh9yDfbSRBp/1jIwSHzDo2V/8Bzf4C c5S93U7L0NyBrZYDOj0fs2PFxmC0yUnvsCg946xKsBmMHebvKeNRIZlVOFBUBoHFW5UP 39F8Z96sGQwG5RqxSegZlPfSOTq1LEeicPD7h9nRNBSOci6sLRMx2RL20+W2MruaHyM0 1lyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kVxUpNAU; 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 dn8si2518274edb.142.2020.05.07.02.12.19; Thu, 07 May 2020 02:12:44 -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=kVxUpNAU; 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 S1726029AbgEGJLB (ORCPT + 99 others); Thu, 7 May 2020 05:11:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgEGJLA (ORCPT ); Thu, 7 May 2020 05:11:00 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFE05C061A10; Thu, 7 May 2020 02:11:00 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id u10so1830978pls.8; Thu, 07 May 2020 02:11:00 -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=JBT6KrKPDV5CjqbR8NDCy7mpTcDdeEp7C5NBrNvcrDY=; b=kVxUpNAU2X5gF8L0wi+DyBySR80rdREgOTCndFcxAxZ5o1/ZAGVfUqtsWKwLF0Pa/u 5VlziewE/8fe6NnCkGc3Ph2U6L2/oSl/f8uR72qd3yHNwaqdpv2dvNMAW1V6ZK6GmZpF XufJCfMyHxhC43y07FPPo6k6b4e6UWM1L9UIseHpeJakHL2EDV8nuqNy1lOlb7/Lvovx +Qr8DuTQ62XSzBiO9K+0Sy9zPbrwHFV3jEPKUwqIHxZfJQ6mIwmROmv/B8yYWXUa1+Hd afZ9rgolKYC6b4dwrtUFVeaOonYWK/bbkkYwAxSkHn4eQ5RuvJlmrbmxTSe3vpUhlwXO i/9g== 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=JBT6KrKPDV5CjqbR8NDCy7mpTcDdeEp7C5NBrNvcrDY=; b=mKk58xCj7IrgyFPzlX4HP0/1UQ6jAl4gS3mGosze9G5sR1uZeD1PUBQnBF2WwnQEqO ohTdy693f95D52qms3rIreJhdaml6/nLBabmw7IbHCGJyYV8CI1RFCLllXRnMOfp6q5s 9XBIHF31rQxYMCypBjcxUJlAT5QUmTRG6CKCSxfXD2HJi50kgHR/3sDr81dsc3rO96YM Qi9cAodITc1BqfNmcWElFvgAHzlV/NT0PSgaJZEwLNi4UsEqAmQVNiHZ+MGqpH/yQwUU 5AEArHZJ9QPll3uy7mfhIhAxT8mHMU4y5VwY3CjkYZodgDnXbEnC5741KUeFcxPLyf8g jr4g== X-Gm-Message-State: AGi0Pubt88k8/P26Bs2QGLaij4qRkB0W5jV4afOfG+rn+dI0oiShJZN4 6HdH2pYkC/06F0iaZWrFOPCScPBZe6cEkGdT88g= X-Received: by 2002:a17:90a:340c:: with SMTP id o12mr13739254pjb.22.1588842660053; Thu, 07 May 2020 02:11:00 -0700 (PDT) MIME-Version: 1.0 References: <20200505132905.10276-1-calvin.johnson@oss.nxp.com> <20200505132905.10276-6-calvin.johnson@oss.nxp.com> <20200507074435.GA10296@lsv03152.swis.in-blr01.nxp.com> In-Reply-To: <20200507074435.GA10296@lsv03152.swis.in-blr01.nxp.com> From: Andy Shevchenko Date: Thu, 7 May 2020 12:10:48 +0300 Message-ID: Subject: Re: [net-next PATCH v3 5/5] net: mdiobus: Introduce fwnode_mdiobus_register_phy() 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 Thu, May 7, 2020 at 10:44 AM Calvin Johnson wrote: > > On Tue, May 05, 2020 at 05:22:00PM +0300, Andy Shevchenko wrote: > > On Tue, May 5, 2020 at 4:30 PM Calvin Johnson > > wrote: ... > > > + bool is_c45 = false; > > > > Redundant assignment, see below. > > > > > + const char *cp; > > > + u32 phy_id; > > > + int rc; > > > + fwnode_property_read_string(child, "compatible", &cp); > > > > Consider rc = ...; otherwise you will have UB below. > > > > > + if (!strcmp(cp, "ethernet-phy-ieee802.3-c45")) > > > > UB! > > Thanks for the comments! I've considered all of them. > What is UB, by the way? :)- Undefined Behaviour. -- With Best Regards, Andy Shevchenko