Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5402056imu; Tue, 13 Nov 2018 06:07:50 -0800 (PST) X-Google-Smtp-Source: AJdET5eM7whettc2uaEKkqs33zLdNVKJtGldvKUizWwIi/PxfAY4zwi1ORKimo/WvwSjQH90KF2b X-Received: by 2002:a62:b24a:: with SMTP id x71mr3566612pfe.148.1542118069993; Tue, 13 Nov 2018 06:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542118069; cv=none; d=google.com; s=arc-20160816; b=ooViIQnMwACXZluW/ObEQGpi6ejFbL3POCLWuaHTzUOAGoPIZRT14++Op8BTv02mzD /kh610BO7l0YI7M1ALYy9/GCDEWXnYKSGTT7adeKfaLO7qyTtOPz9UMGyz+OrVx2T8DC 34MAGi3EMSOuD5dzZW1lTrmjOOw1YCVXHzn4VOb5ZbhWhYe0gKA3cjcZnRSZ+ESTdYIU OibGIJkTX8eDCH9UYCm7ELBbOkuhNC4xXSUJX53d+d3OU9jDKdHweSGVlDm1Y8765yDq xtHp/sbrYNDQSQZu/9TXlB7Q8MMRb2qjXuCgS+zgRsm7uqKRtes+Md1olCikYHDQXcE6 v4uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ow7Ut1GNJ0NN6XzS8yWgikbMVrG9z5cqZIlLq+KQDIE=; b=ryliO/7kToBTVG1U9wsDMIdlYliSutMuF8q3RJ6dA7TYz3fy5+pWF7bv2X9wqARb4z SiMPD/NqbvamrZ0ykIlTE5cvDRclrtKr8C7eyQro60x6on6jKu1oDeWVQwufWucrbtlb cSS26OzJ+dt/i+O76TjLG3GqO8uSSGEoWuyEgS9H9enK1NLVkNJkoxYO35wLmMBvcmyR yJQwBB1tk+XLd/zz2GO85gC7ZaZ3rjoPpBefxWbdnWO2dXUQryw8smrBU2+WosfO9Zl8 LZuBZIAAeQ7e0uxbEf7SWLaPswb8yOFhKYx3/Eq8kmvVo40dAkymUTwIuRT/JdCh6WFm DxJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=bv00UTRt; 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 e1-v6si18371973pfe.44.2018.11.13.06.07.25; Tue, 13 Nov 2018 06:07:49 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=bv00UTRt; 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 S2387943AbeKNAAf (ORCPT + 99 others); Tue, 13 Nov 2018 19:00:35 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37565 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387924AbeKNAAe (ORCPT ); Tue, 13 Nov 2018 19:00:34 -0500 Received: by mail-wm1-f68.google.com with SMTP id p2-v6so11485235wmc.2 for ; Tue, 13 Nov 2018 06:02:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ow7Ut1GNJ0NN6XzS8yWgikbMVrG9z5cqZIlLq+KQDIE=; b=bv00UTRtZfOTTESxlTwAP96Arhu8T5PCHrwxCFRnOc/Oew7CX7onM+8BVynHJ1ewPq H92YdHhZJxvAxuAQViJWKmgjAYYpAyxssPxW2bS73xu6kVuE1MeguhWX5zNNROFNt5IK Wkpq52HSVVGrkcsAPWyg78ES3X1G5fTD/xfkeux4KNE7/MgHAiXOzTffGrcjtKm9Zk3S 7XDqtNs/D3ERfaLn5rWXejg1atmqKKw22zrgVFAfiUhB7fq1hrNHA6aSNaav0JxqDX+2 eg51yFk5xxxQu8pxQgxFilbzRAe8Y2ynr3AO/XWyZVecGLfYoGdDWW7TlTuMAHRMwADY TCyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ow7Ut1GNJ0NN6XzS8yWgikbMVrG9z5cqZIlLq+KQDIE=; b=oGOAbzs4N8q4Z2vMidJZndSGyqD8DTmkOgiI/xIrBkzhcF/7dCVY5Krug3f5RBT0Dg t9sBcMc6pyrsz2tEN4TNrXkTFTGRVdmXMHw0C1W5mRMdEtPiQXMwSqaDd5lmncdz/AYM /tRhnWIDXln0Gg8Ii+Omwp8pbCG+v5lL3CS2/6RATkRsmh/XPGwsNllLs+izK+25nx3D o+SOHwP4QsSgeWiOd4a+SDAEU6HT+C04iNt74KEwwIjH1zJ53VdnFETws7GDTiuIJKUr UdPF/mq7tfPXbXd3xy/iTgAzkR3bXEioVUFVYE3lznTkidplBVUU/3JpK/9mSPf0D3EE stcA== X-Gm-Message-State: AGRZ1gJXnrw1Pg/ejdPMpq3a4Ni9jciQBHr7a9Z7ELETKCKR21Joa23U 1Y+pU72TH1AAS7jGCrr1bkvb6g== X-Received: by 2002:a1c:3c83:: with SMTP id j125-v6mr3222964wma.65.1542117735429; Tue, 13 Nov 2018 06:02:15 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id m69-v6sm16604122wmb.8.2018.11.13.06.02.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 06:02:14 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Nicolas Ferre , "David S . Miller" , Grygorii Strashko , Srinivas Kandagatla , Andrew Lunn , Florian Fainelli , Rob Herring , Frank Rowand , Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, netdev@vger.kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 12/25] of: net: kill of_get_nvmem_mac_address() Date: Tue, 13 Nov 2018 15:01:20 +0100 Message-Id: <20181113140133.17385-13-brgl@bgdev.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181113140133.17385-1-brgl@bgdev.pl> References: <20181113140133.17385-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski We've switched all users to nvmem_get_mac_address(). Remove the now dead code. Signed-off-by: Bartosz Golaszewski --- drivers/of/of_net.c | 39 --------------------------------------- include/linux/of_net.h | 6 ------ 2 files changed, 45 deletions(-) diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c index 53189d4022a6..810ab0fbcccb 100644 --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c @@ -81,42 +81,3 @@ const void *of_get_mac_address(struct device_node *np) return of_get_mac_addr(np, "address"); } EXPORT_SYMBOL(of_get_mac_address); - -/** - * Obtain the MAC address from an nvmem provider named 'mac-address' through - * device tree. - * On success, copies the new address into memory pointed to by addr and - * returns 0. Returns a negative error code otherwise. - * @np: Device tree node containing the nvmem-cells phandle - * @addr: Pointer to receive the MAC address using ether_addr_copy() - */ -int of_get_nvmem_mac_address(struct device_node *np, void *addr) -{ - struct nvmem_cell *cell; - const void *mac; - size_t len; - int ret; - - cell = of_nvmem_cell_get(np, "mac-address"); - if (IS_ERR(cell)) - return PTR_ERR(cell); - - mac = nvmem_cell_read(cell, &len); - - nvmem_cell_put(cell); - - if (IS_ERR(mac)) - return PTR_ERR(mac); - - if (len < ETH_ALEN || !is_valid_ether_addr(mac)) { - ret = -EINVAL; - } else { - ether_addr_copy(addr, mac); - ret = 0; - } - - kfree(mac); - - return ret; -} -EXPORT_SYMBOL(of_get_nvmem_mac_address); diff --git a/include/linux/of_net.h b/include/linux/of_net.h index 90d81ee9e6a0..9cd72aab76fe 100644 --- a/include/linux/of_net.h +++ b/include/linux/of_net.h @@ -13,7 +13,6 @@ struct net_device; extern int of_get_phy_mode(struct device_node *np); extern const void *of_get_mac_address(struct device_node *np); -extern int of_get_nvmem_mac_address(struct device_node *np, void *addr); extern struct net_device *of_find_net_device_by_node(struct device_node *np); #else static inline int of_get_phy_mode(struct device_node *np) @@ -26,11 +25,6 @@ static inline const void *of_get_mac_address(struct device_node *np) return NULL; } -static inline int of_get_nvmem_mac_address(struct device_node *np, void *addr) -{ - return -ENODEV; -} - static inline struct net_device *of_find_net_device_by_node(struct device_node *np) { return NULL; -- 2.19.1