Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp177523imm; Wed, 3 Oct 2018 14:04:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV60qhBYbeFONCjc0+SirSLclIY93NyCN0AFpCUfmAytpDzkOILWVwljcb7cfq/35W3wFMXE0 X-Received: by 2002:a17:902:5993:: with SMTP id p19-v6mr3390306pli.260.1538600679672; Wed, 03 Oct 2018 14:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538600679; cv=none; d=google.com; s=arc-20160816; b=USSTXLvNet105B6TEvbKvFcdrlm/ikKV7hIWmhQN74mdYL/u5PbDHecDuYVMS41NOH 0PsYVvr0LaOIXtqaXd17LusrSG1d4/CwiN1Y+RFz/4DjDhwWCF3S5XUD/Dfjhxc4FI3X vVR0tFkzXe4L/WRnIjV0KvCGYdABMr3JOvmcbSWpGKavH3uKZsH1ou93ziSUoRh2KvHx hl8yl1ovrwTR7Ft5/MdD97oLDlOglukauzG/WFC1YPPLfvUdUO548LbaV/C0AyVLvEfB +nJWg1soe1mx6Jq+aB+Tp4HlJzNrq0vxe6dSNjQLFGLzsH7jwWW5omtkRkvvEcSVV3XK mkmw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=eT1z7kCaPNGd1B8QQr3yYO0fQSZS6ql4og4wbPEH0pE=; b=hAvu/u5Qtyfu1IdBqWuokQNj4/Q7ndzLawIjskviBxHjTQO9SfLmUT6aKhJ4ciEdWS G+nGcATpUll+Hy54kPpTmrK4gMkMLyjTs8dqYtXOhu1h1pFRFpS6HTHLlzOqN0/CdDzf 1fKVb8QD2StEU+nF6s3nCEwTzhjJosfKND8u9k2SGMtnmlA9B2BJGxA+2hx+XKP2VLFf yfW8nXimQhCHpwbV3m3xaUJvY7MOHWPljoJLhsKpC+dM7+NoEtw+bMOzxaJS19mqCPyb BuZMubkH2VMDJhLezZ4u25fod9wLNSTVJL4Q/o/5Vt1xerlHGa7wWWNYlTYTe2/mtHD9 EnBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ngv+saBE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si2488184pgt.95.2018.10.03.14.04.23; Wed, 03 Oct 2018 14:04:39 -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=@gmail.com header.s=20161025 header.b=Ngv+saBE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727221AbeJDDyV (ORCPT + 99 others); Wed, 3 Oct 2018 23:54:21 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46042 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbeJDDyU (ORCPT ); Wed, 3 Oct 2018 23:54:20 -0400 Received: by mail-pg1-f193.google.com with SMTP id t70-v6so2084156pgd.12; Wed, 03 Oct 2018 14:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=eT1z7kCaPNGd1B8QQr3yYO0fQSZS6ql4og4wbPEH0pE=; b=Ngv+saBEi757gu59/zsVBhNl8Dw8bgJoPAjQYA+/5V27qHYea3LO5lfTJBCobAD0YV 4dL2g/fU74cCN/U5TFetx+Rf7OJxzGY4ol1194P7KUupGE7G+1OmQh9UvhM2EyUqoIE8 MB+uXHWpGM+Em5zloHz/0yzmHTxP3AJb7ZwOQmgpOW2JKB63Fsd8I0W6QWtPN0uRdfYX Ys3j5f8qP8ui6rVLkn2SGEpdxGo5hWIawgMns9o9516gT5j4tw46O3iUJ3rwvOXty2E7 zxsJvOlRplHRRxSJ9Z7GsE8ODreHTLpRHQDQYhQpmzDRDr+yTLwNl8KiMXRqkgkQDe6Q hmTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eT1z7kCaPNGd1B8QQr3yYO0fQSZS6ql4og4wbPEH0pE=; b=clz6mjKvSu9N9CIdasj8WG428XcY236R0KpYpa0HUjmjEKOF4qnjUsVVyXESSLY5js pa46s/qHFDc+yH7A3iVZ9EMqet6BcdQi7J+S/sUpY1PwWwdskuvhPszURWLxToJYDOcQ pCWM9dSdOcXaxMXoRSKJXPxRZeaPCRRM33tS7Y/5PaWvw5fTJp1gAoedzRaGV4EkQb68 4OsW/nNhi5sYPwfJeYhLX+w8y3Df8FksgAl/K1IrW7Fv922+LeLh7tvVJy6SPXRGxrj6 6WtZIQORhnDrHG2MzlaJc5ymR5NcnQFoc3nXCZUf+F+CHHP3hsLeSG5o/rYvIWzpkv0Z Vm2A== X-Gm-Message-State: ABuFfojgaVnNHIDfcwmv55Cw+RYrUCtwfKvvl8L+VZsWfL1qCVUifpDf JeWzYcgeb5SMYAHOL+grP54= X-Received: by 2002:a63:f05:: with SMTP id e5-v6mr2840555pgl.84.1538600657175; Wed, 03 Oct 2018 14:04:17 -0700 (PDT) Received: from [10.69.78.41] ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id y4-v6sm3199749pfm.137.2018.10.03.14.04.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 14:04:15 -0700 (PDT) Subject: Re: [PATCH v2 00/29] at24: remove at24_platform_data To: Bartosz Golaszewski , Brian Norris , "David S . Miller" Cc: Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Boris Brezillon , Marek Vasut , Richard Weinberger , Grygorii Strashko , Srinivas Kandagatla , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Alban Bedel , Rob Herring , David Lechner , Andrew Lunn , linux-doc , Linux Kernel Mailing List , Linux ARM , linux-i2c , "open list:MEMORY TECHNOLOGY..." , Linux-OMAP , netdev , Bartosz Golaszewski , Brian Norris References: <20180810080526.27207-1-brgl@bgdev.pl> <20180831194643.GA62862@ban.mtv.corp.google.com> From: Florian Fainelli Message-ID: Date: Wed, 3 Oct 2018 14:04:10 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/3/2018 1:15 PM, Bartosz Golaszewski wrote: > pt., 31 sie 2018 o 21:46 Brian Norris napisaƂ(a): >> >> Hi, >> >> On Fri, Aug 10, 2018 at 10:04:57AM +0200, Bartosz Golaszewski wrote: >>> Most boards use the EEPROM to store the MAC address. This series adds >>> support for cell lookups to the nvmem framework, registers relevant >>> cells for all users, adds nvmem support to eth_platform_get_mac_address(), >>> converts davinci_emac driver to using it and replaces at24_platform_data >>> with device properties. >> >> We already have: >> >> of_get_nvmem_mac_address() (which does exactly what you're adding, >> except it's DT specific) >> of_get_mac_address() >> fwnode_get_mac_address() >> device_get_mac_address() >> >> and now you've taught me that this exists too: >> >> eth_platform_get_mac_address() >> >> These mostly don't share code, and with your series, they'll start to >> diverge even more as to what they support. Can you please help rectify >> that, instead of widening the gap? >> >> For instance, you can delete most of eth_platform_get_mac_address() and >> replace it with device_get_mac_address() [1]. And you could add your new >> stuff to fwnode_get_mac_address(). >> >> And important part to note here is that you code isn't just useful for >> ethernet -- it could be useful for Wifi devices too. So IMO, sticking it >> only in an "eth" function is the wrong move. >> >> Brian >> >> [1] arch_get_platform_mac_address() is the only part I wouldn't want to >> replicate into a truly generic helper. The following should be a no-op >> refactor, AIUI: >> > > The only user of arch_get_platform_mac_address() is sparc. It returns > an address that seems to be read from some kind of EEPROM. I'm not > familiar with this arch though. I'm wondering if we could somehow > seamlessly remove this call and then convert all users of > eth_platform_get_mac_address() to using device_get_mac_address()? > > David: I couldn't find a place in sparc code where any ethernet device > would be registered, so is there a chance that nobody is using it? SPARC uses a true Open Firmware implementation, so it would register drivers through the CONFIG_OF infrastructure. -- Florian