Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1908262imm; Thu, 9 Aug 2018 04:13:54 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzIE0xH2gDzn/o5TITiNkzUa8F1F5fWocaJcUVtw2zc/p20+TQX1qQmxztkw9jKMY7lBwoo X-Received: by 2002:a62:3001:: with SMTP id w1-v6mr1918521pfw.19.1533813234367; Thu, 09 Aug 2018 04:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533813234; cv=none; d=google.com; s=arc-20160816; b=G8gzoI0aOM/upzqLC1uux0uUkCqUb82KfmdTo+LMZlub3TQpuBt0Na6zDaNjT6CJ39 e4de7ypehgYY0r0d0bSqjvcnTc2gZHOA2mI1D3OcMN0D4fAF61wqUGkEXyU0Y2z4VA5L Rev847isk8iMnD1bCaIxaQ+IOsvSU0sFBeKQ5GVba5RxA7xyRU9aQU6zDQBw2BoH+GuL SCiXh9lTOQqovLSl52+mYTcfAl0xm7EqrprRjzdcANTXmQ/8vr/rUhTyF2XAusSJPnHo MsFuUoSjMJvpcDpewQViO1pkrVa/QgfrYmX14+95DX4SkoNzvllO3g3dGMePh9frZoBk JXYA== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Lah9RiRar2mkn3FzoHAkaxdIBc+cCvpeSzfLtPuGlQY=; b=sNxCJd/vYw5eOr3QyswHwjsRppmrPY5zPWY1+E8iVWK3DTl5pyKVfKHBor05aTxO7z lYBhV/iIkoBhPXY9SxIPYmu3vMVnS3jRXwWrm5cVE6NsAOA8ls9Fu1tsf3mY05+InAwX QawXZjNREHxSU4TI+jvA5xP6Aurh2sdXGArdetKahullUoz+34Rkk7NawBpVFOpyvmEv /Y7SSuwsa1VCGocyrpBeEW6wocc+ZjVunddTQSTyv8zpDjl93IU1auNRUx1NXBUMw3XH 3ACsS++97lSHimfPYsfTPeXO103gseSVVs1TG2oIed303l4CW88POQRwAGg75ZAvjdeT HqrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=gBf9msOm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y71-v6si6911719pgd.223.2018.08.09.04.13.39; Thu, 09 Aug 2018 04:13:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=gBf9msOm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730799AbeHINhM (ORCPT + 99 others); Thu, 9 Aug 2018 09:37:12 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:40034 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730453AbeHINhL (ORCPT ); Thu, 9 Aug 2018 09:37:11 -0400 Received: by mail-it0-f66.google.com with SMTP id h23-v6so1984503ita.5 for ; Thu, 09 Aug 2018 04:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Lah9RiRar2mkn3FzoHAkaxdIBc+cCvpeSzfLtPuGlQY=; b=gBf9msOmRSV2ZRLe2JtvoC1DyxEgyJ8L9JebfRd2GPp7HYnGqYhPi3/hp0+zcH4Q6g vRx3dOyJbFY7QGqAYvr1OlF5mjLTH18RA2db5VJPo9vvcD3myJaqZ45qc48x/roVEnnr JzF0xY335Ub2rAW+IiykLcBBWN7jikDbQpEVT77ocP3G/ja7vEjGB/16v89K4pQQy7Bo 8zeNuTq7Gy2DRvMM+fuqAw+e3Rhfx80n7UuRLfd1aQFiKwY2uQCTS1rZrS7xzsiBdBr8 jlIq1uD2mAk7DTRO8AzaZ7XHEeqO3JXzC7hn4LjVASe+j7hKFhC6ounQzIuRRK2tb+IX oNKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Lah9RiRar2mkn3FzoHAkaxdIBc+cCvpeSzfLtPuGlQY=; b=DzTx/Ipkl3KbkS0J1kn+JZW3h5Uzh3bXGAqAgqHhjoNzZ1hXujrwWOu99FwbDtm07l rd/UXwIDtppjcOa/KWbz/J1Ybc8tirM7D7y9ptJq8+lcU5gYohFWkYR7epn/YbVIx0au LEaGxMyLKgBoxE4He0e4U3ki9SBz0IICosSzDua+pQjgRhOJJRiQBEn6WDObdx5tYxSk T5rv98h3Wd4YMHpCTZ0/DacYA8mtUmTJbGVqeMKlt/UJ1FuG74xmiswgDLJka1kuepHb M9EZES1jRqW1205yFeaGNJTTChjazQXkXlf9ir1ZTj1PFLItWodjMVBQzF0NrUDkhSxi a1sQ== X-Gm-Message-State: AOUpUlFmc9CRSER/o5T3aI4wbtGMZ7E/YPUuUNQhZLFjqeMrbt/1VbPR ejmv47n1BZBQutWtR8R73iCmrsNREzSAkuASZmbPuw== X-Received: by 2002:a02:b70b:: with SMTP id g11-v6mr1449345jam.34.1533813168441; Thu, 09 Aug 2018 04:12:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5e:9403:0:0:0:0:0 with HTTP; Thu, 9 Aug 2018 04:12:47 -0700 (PDT) In-Reply-To: References: <20180808153150.23444-1-brgl@bgdev.pl> <20180808153150.23444-15-brgl@bgdev.pl> From: Bartosz Golaszewski Date: Thu, 9 Aug 2018 13:12:47 +0200 Message-ID: Subject: Re: [PATCH 14/28] net: split eth_platform_get_mac_address() into subroutines To: Andy Shevchenko Cc: Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Florian Fainelli , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Alban Bedel , Rob Herring , David Lechner , Andrew Lunn , Linux Documentation List , Linux Kernel Mailing List , linux-arm Mailing List , linux-i2c , "open list:MEMORY TECHNOLOGY..." , Linux OMAP Mailing List , netdev , Bartosz Golaszewski 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 2018-08-08 19:50 GMT+02:00 Andy Shevchenko : > On Wed, Aug 8, 2018 at 6:31 PM, Bartosz Golaszewski wrote: >> From: Bartosz Golaszewski >> >> We want do add more sources from which to read the MAC address. In >> order to avoid bloating this function too much, start by splitting it >> into subroutines, each of which takes care of reading the MAC from >> one source. > >> +static int mac_address_from_of(struct device *dev, u8 *mac_addr) >> { >> const unsigned char *addr; >> + struct device_node *np; >> > >> + np = dev_is_pci(dev) ? pci_device_to_OF_node(to_pci_dev(dev)) >> + : dev->of_node; > > I didn't get these manipulations. > > What the scenario when pci_dev->dev.of_node != dev->of_node? > > -- > With Best Regards, > Andy Shevchenko I'll add an additional patch that addresses it. Bart