From patchwork Fri Jun 29 09:40:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10495965 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1CD946016C for ; Fri, 29 Jun 2018 09:41:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 068CE29708 for ; Fri, 29 Jun 2018 09:41:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC80B29779; Fri, 29 Jun 2018 09:41:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E08029708 for ; Fri, 29 Jun 2018 09:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935714AbeF2JlV (ORCPT ); Fri, 29 Jun 2018 05:41:21 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:39356 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935805AbeF2JlJ (ORCPT ); Fri, 29 Jun 2018 05:41:09 -0400 Received: by mail-wr0-f194.google.com with SMTP id b8-v6so8197534wro.6 for ; Fri, 29 Jun 2018 02:41:09 -0700 (PDT) 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; bh=u5DqzgH5fpoGJX2DCfyjILWRGPoFwgDmrRb4Q1YR2bg=; b=sVL77/ZJD73ZOrNYBNMI4Oy1fKUIyNDghcLEo2AE6NuvERvWvitrJKco+6zEw1rrjx BYEvGlq5j+jNb4FqItkxskFIV63fvFPCbw0w5sLqjXt1E4voL7eI93rUSlZbzEjE/+m7 TO/6L4EqTn2399keKOSyRX7WJhqWJU9X24vMRRC/umLMmjIjkqe3Fi5+15NXvznkTTWS t1CDJiU8dRhm07bCQWLxF+soEWSfMkeYj8sudkp7Uy4Sn7Aos0nnuezJmvrL5UHGTfI/ ZgxhtGLkD674XLfbbNcN2iLNN/OSBtxt5HE7DdRc4IWZU5hYatn8KvGhU6zbj2eUCvSw Km4w== 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; bh=u5DqzgH5fpoGJX2DCfyjILWRGPoFwgDmrRb4Q1YR2bg=; b=WHTC4KOuY4yvQCRJEjW0/lfFFXmnonKDCDs5WCv7bBwr1zXoymU3NztiCEX66eaGqI rm6/AwvAnCi0svGqF+1wPl+7ojtusw79WanVbOHfhhvKyjEebuIUkKvKLivnPHNS7c6j 92kzyi9MUe7u7vkU+1GkpmaMzKFfOHc1+s1j5Lqyuh9wLVCvPI+s5++d7xZTcsuc8XBw CT2k8MFi1go87qY77Juo4VxR+1P7nV2gkLLCFg7aGEmD6RnebBKYw2w3v9KRl4NZeQbo LLr40t7VDVizXscGwE1J52MZlsTV0xsONQQfgvB3dHUhTX2oH6oI7BCoTq80P4CrQIDW no9A== X-Gm-Message-State: APt69E2U3r1kr4L8hwiSNCFUXIFBXMmpEIhiLxZiSR2GTUCryCGH/HNJ s6qMzoPdX3W13BjpkQIfJ0ikFg== X-Google-Smtp-Source: AAOMgpdkYVIyRqQ9aENw5f8/jv/gl0RAPguEbmMrryxydRcGzIMIcpsKLbjKkwkENu9JBL7gQf/psQ== X-Received: by 2002:adf:f6c4:: with SMTP id y4-v6mr11216416wrp.4.1530265268615; Fri, 29 Jun 2018 02:41:08 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-NIC-1-55-10.w2-15.abo.wanadoo.fr. [2.15.147.10]) by smtp.gmail.com with ESMTPSA id d102-v6sm1386394wma.10.2018.06.29.02.41.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:41:07 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Lukas Wunner , Rob Herring , Florian Fainelli , Dan Carpenter , Ivan Khoronzhuk , David Lechner , Greg Kroah-Hartman , Andrew Lunn , Jonathan Corbet Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v4 18/18] ARM: davinci: remove dead code related to MAC address reading Date: Fri, 29 Jun 2018 11:40:39 +0200 Message-Id: <20180629094039.7543-19-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629094039.7543-1-brgl@bgdev.pl> References: <20180629094039.7543-1-brgl@bgdev.pl> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski There are no more users of davinci_get_mac_addr(). Remove it. Also remove the mac_addr field from the emac platform data struct. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/common.c | 15 --------------- include/linux/davinci_emac.h | 2 -- 2 files changed, 17 deletions(-) diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index bcb6a7ba84e9..0c6cc354a4aa 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c @@ -28,21 +28,6 @@ EXPORT_SYMBOL(davinci_soc_info); void __iomem *davinci_intc_base; int davinci_intc_type; -void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context) -{ - char *mac_addr = davinci_soc_info.emac_pdata->mac_addr; - off_t offset = (off_t)context; - - if (!IS_BUILTIN(CONFIG_NVMEM)) { - pr_warn("Cannot read MAC addr from EEPROM without CONFIG_NVMEM\n"); - return; - } - - /* Read MAC addr from EEPROM */ - if (nvmem_device_read(nvmem, offset, ETH_ALEN, mac_addr) == ETH_ALEN) - pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr); -} - static int __init davinci_init_id(struct davinci_soc_info *soc_info) { int i; diff --git a/include/linux/davinci_emac.h b/include/linux/davinci_emac.h index 05b97144d342..19888b27706d 100644 --- a/include/linux/davinci_emac.h +++ b/include/linux/davinci_emac.h @@ -19,7 +19,6 @@ struct mdio_platform_data { }; struct emac_platform_data { - char mac_addr[ETH_ALEN]; u32 ctrl_reg_offset; u32 ctrl_mod_reg_offset; u32 ctrl_ram_offset; @@ -46,5 +45,4 @@ enum { EMAC_VERSION_2, /* DM646x */ }; -void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context); #endif