Received: by 10.223.176.46 with SMTP id f43csp3786376wra; Mon, 22 Jan 2018 22:13:33 -0800 (PST) X-Google-Smtp-Source: AH8x224o7dc51HP6kffzUB/rrU1dou5WWw9gnSDwybk9eMPlLCAN2drzCOhoLJIqw29M8VKLJpjM X-Received: by 2002:a17:902:7891:: with SMTP id q17-v6mr4849560pll.184.1516688013404; Mon, 22 Jan 2018 22:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516688013; cv=none; d=google.com; s=arc-20160816; b=r7IIz5O+lQzqRwG2LkPJSvpmkLY+J2+2+cqBm6zpYQXUuRWqY+bpwAH905UKAr/HxN b36yDi7UTH9KHFYmHSe6RjCmO9o80SP31h/dyzR683PWCLTJBnXo7yhTgyI8IUNh20io YZTnOVNrImQcWvp9WiIL8hka261lTIzsISFRx8T60SoWu7anvTCMWCRDi7hPKEDHlP/O EhalfgRV74Y1SqSxv9RPncHQwoB6+55ytWUoxyhH8CoPxFFGafDk+2hTRDz+rBcKnR1J Z08Xt61B6oxWBrUJVj91lssuRRSlkdEGHF//pITW/35ar/vVJ6D7GvI9fvAkixA0r5J0 z8UA== 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=QDFOBFx2Qgmu4bi2mKT9+Tw0x/KQyKo6DSN1lQC/JIw=; b=ybvWIpRxHvsYPcAKAloZT7vl65hsWWRQ6dWJKK0yiD6bETKlnznde/71egEG/yzRyV fk3scGW69CzcMSocSD5gUfV9qg5Qt66qSKXs0wLRcYrxYwAPI/j3jV/RTuq41ENL4qbg Z2iv7pRcrLO8Zj2rWjEngIRYT8qSU9AJBYfACgbtDI4Ka3abNZF3XLPDcMP5s9MKXBda Y+BNqyfRyATJbPN0uMghQMkC+9skYVn54J/hFKgRlkReNFLKr9maVNQgnveSHO+I+9ef cFnDAra8j50k7eQLMj163YzpnL0PBusvJHh741MzCdUPgeKhxwr4J0O+9EST3rSJCfoG HLvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=wiaabPZ0; 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 p14-v6si4222019pli.680.2018.01.22.22.13.18; Mon, 22 Jan 2018 22:13:33 -0800 (PST) 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=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=wiaabPZ0; 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 S1751210AbeAWGMx (ORCPT + 99 others); Tue, 23 Jan 2018 01:12:53 -0500 Received: from mail-it0-f51.google.com ([209.85.214.51]:39176 "EHLO mail-it0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751202AbeAWGMv (ORCPT ); Tue, 23 Jan 2018 01:12:51 -0500 Received: by mail-it0-f51.google.com with SMTP id 68so12502614ite.4 for ; Mon, 22 Jan 2018 22:12:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QDFOBFx2Qgmu4bi2mKT9+Tw0x/KQyKo6DSN1lQC/JIw=; b=wiaabPZ0b/9m79Ty61XCqE0chUmtmcsleYY3ah1m8S0tF9BZ9anhyzf69hr0lO92SR fZrgCRYQo2F/C+JQjsMuArvMmLfvgHVJuQGamALNsHRfqhwxVn+QpGrwO0zAHqA36LQ2 ECVZAe0wMwrDf2ZXVZ7mA/qn79bq4r03Hp/Sj7Hsx+1JLaPrPRo5YesyUPztwcv68I75 idwMEJcYW3ge/H/MMELO6MzpbplXQv0ZhGqLwamJIqQNgD+r33jog/mW4ZzTzLgr9WKA RPPtJ4+dctj9eoVwjisd9EtBOuzhHQ/g5eI9Uzf/Ifd+yiwBtUAAeGjxpsUoJFyxRFmP Z2Ew== 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=QDFOBFx2Qgmu4bi2mKT9+Tw0x/KQyKo6DSN1lQC/JIw=; b=TQpuLRl7jNXd18shR8QTfAbGw7178S+n6ITmoG0qNULcZDpW/v5QhrlMSw33RA0AXn NNXOyKzHZLWy3lj4vuvyu0AmMgX57CBGY2CphxiVpQAPPgq5MGDU4Z8FHhpbSom3Tnkb g2/rlqH/ZnMabg52K9zelelUSC0Bg7vWy5cAz6IjmTaWvnr+7TqXeHEVZJ3gOxu68jHP Y8XjP771CERJGFb8kk7bRU5TADBVK9EIBN2NsUX2dm4QTv/WSsYb89ZSurAb4Y/cqmQh XqiHSvuvxGlUH4br/9mYv80na3gbtftCp5sFHj6v6rWosyjRNVwuqSd97mIYDC3vsHV1 e+ag== X-Gm-Message-State: AKwxyteDw+6vJSi3aMOnlNs1mXM8t9I50m7bEyYH8JxZLkF/pNM3I9hO YI1kIU4S4PpfmWXRP0+JY8CSEIA5kEERvGJ2Is4ta4ZzAyY= X-Received: by 10.36.91.210 with SMTP id g201mr2345767itb.50.1516687970443; Mon, 22 Jan 2018 22:12:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.201.12 with HTTP; Mon, 22 Jan 2018 22:12:49 -0800 (PST) In-Reply-To: References: <1516278704-17141-1-git-send-email-mw@semihalf.com> <1516278704-17141-2-git-send-email-mw@semihalf.com> From: Marcin Wojtas Date: Tue, 23 Jan 2018 07:12:49 +0100 Message-ID: Subject: Re: [net-next: PATCH v4 1/7] device property: Introduce fwnode_get_mac_address() To: "Rafael J. Wysocki" Cc: Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org, netdev , ACPI Devel Maling List , Graeme Gregory , David Miller , Russell King - ARM Linux , Rafael Wysocki , Andrew Lunn , Florian Fainelli , Antoine Tenart , Thomas Petazzoni , Gregory Clement , Stefan Chulski , Nadav Haklai , Neta Zur Hershkovits , Ard Biesheuvel , Grzegorz Jaszczyk , Tomasz Nowicki 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 Hi Rafael, > > if (res) > > return res; > > > > - return device_get_mac_addr(dev, "address", addr, alen); > > + return fwnode_get_mac_addr(fwnode, "address", addr, alen); > > +} > > +EXPORT_SYMBOL(fwnode_get_mac_address); > > That should be EXPORT_SYMBOL_GPL(). > > I have overlooked that previously, sorry about that. The series landed yesterday in net-next, so I need to send a fix on top. Would you be ok with single patch fixing all EXPORT_SYMBOL() occurences? Those would be 2 new routines: - fwnode_get_mac_address - fwnode_irq_get and 2 already existing in the file: - device_get_mac_address - fwnode_graph_parse_endpoint Please let know, how you prefer to handle it? Best regards, Marcin > > > + > > +/** > > + * device_get_mac_address - Get the MAC for a given device > > + * @dev: Pointer to the device > > + * @addr: Address of buffer to store the MAC in > > + * @alen: Length of the buffer pointed to by addr, should be ETH_ALEN > > + */ > > +void *device_get_mac_address(struct device *dev, char *addr, int alen) > > +{ > > + return fwnode_get_mac_address(dev_fwnode(dev), addr, alen); > > } > > EXPORT_SYMBOL(device_get_mac_address); > > Same here. > > Generally speaking, you should use EXPORT_SYMBOL_GPL() everywhere > unless there's a specific reason for not doing that in which cases > that specific reason has to be clearly spelled out at least in the > changelog of the patch, but really better in a code comment. > > > > > diff --git a/include/linux/property.h b/include/linux/property.h > > index f6189a3..35620e0 100644 > > --- a/include/linux/property.h > > +++ b/include/linux/property.h > > @@ -279,6 +279,8 @@ int device_get_phy_mode(struct device *dev); > > > > void *device_get_mac_address(struct device *dev, char *addr, int alen); > > > > +void *fwnode_get_mac_address(struct fwnode_handle *fwnode, > > + char *addr, int alen); > > struct fwnode_handle *fwnode_graph_get_next_endpoint( > > const struct fwnode_handle *fwnode, struct fwnode_handle *prev); > > struct fwnode_handle * > > --