Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1473604imm; Thu, 19 Jul 2018 02:13:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd49te25o1vFJyqhMZJ3hIlNsP4x0Ld37PqTvSTGvWr7ToatVh2LGXZU8SK/f0RnQe911Dp X-Received: by 2002:a17:902:bd44:: with SMTP id b4-v6mr9442452plx.144.1531991600616; Thu, 19 Jul 2018 02:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531991600; cv=none; d=google.com; s=arc-20160816; b=WbP4lKEBiA+rRMK4WE0gUbicF4I7n+YdNEoQ71d1ZU2eTMBjs1a+0pAKpGGkaN8Qps CoPoLZLjRCclAB84/PcxIaCFjJzjP43KVs/cGspiTFrghdT4A/3Nb23smbL+jS0zxzdw V9WAtqf0DMWv7gixwC2F2ApCjbAA9PQ0FwEVOy+ZAxICGGK+zLbUKdtL3u/ZlErvGrXG NgG7jP99AgsLxHbrqlkDt+4tj7O2NdNTKeG+dw/RqdK9bafYaWVlHLI/tMcez8/h4oRG mvUDqJjoSYY7VOr3T3jZ/PVPA0YDmFcvc0cIh7xMnI4CGvSe7LeQmO1pw/YpjeEKf2m3 Kiqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=vi5BaxU6s4IS/DS8JEFg2nRFFosXQSkND1rMGHc7/kA=; b=vLZPP9XlDrInYoP9Ls0T7Q0Fswz1rvWCukIe+bFii0p55klmnHcWvJVq/pTeIWtnlV 239keSNbWMXLT6wqxyB6qC1976COUdHSYfrJ0Rem+eLLVqrdvO3Gg61n+7XIleMTHIes z7zCTR3pRTRiqgGPKq9a2Tbyt3ZbHUKKsXqlNk/bIpsZILzFsqz/1tSjRyGYNrHq7Fyi bKFXHbcSOUrAaMbKXx+yK9CA5OtlpLpdHjx6VZc3HfAlBa0sAd95uDCdEvxsDTBJthYE HWABhAoepNBH2fRLshnJu0MxZovu/qEzfGNE0iIjKDmEJBZHnUCC2uHBuyB1GoECTITt UjaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=Y27Ll7Yr; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s126-v6si5884717pfc.222.2018.07.19.02.12.42; Thu, 19 Jul 2018 02:13:20 -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=@oracle.com header.s=corp-2018-07-02 header.b=Y27Ll7Yr; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730621AbeGSJxY (ORCPT + 99 others); Thu, 19 Jul 2018 05:53:24 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:60846 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726975AbeGSJxY (ORCPT ); Thu, 19 Jul 2018 05:53:24 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6J98SfK041306; Thu, 19 Jul 2018 09:09:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=vi5BaxU6s4IS/DS8JEFg2nRFFosXQSkND1rMGHc7/kA=; b=Y27Ll7YrvgvvXYBFQGeZovEg/+RqUaEuXAQ67ps++9cgWMbjgbUaOB0RDm827liu+Kla s+F5QXPhZyikQPbQc8XzS4g4LU2z5YCJt26j6TBUEhRwZ5RSWoYiGT1q14ewpXPOYrvO U0dwSuk+uXCjNYmJFexY6FvWAOSy2o7pY/gMHQh3/FXPulfzLp1UnITLXE+RNf9w/JE+ ZQdE9cX7TueE8FzYRWDEFFoSlWefCKA7jJqrfYu9f9Bn+H5Nrb7WgTL5doJbzaCWc/j+ NFysOZAWZIQ3y3XoYNOwX0wRFqbxu4SpqIczcnHyFXaCeRnQ0P1168WcXBT+/iN5omrH NA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2k7a3t9qkg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 09:09:47 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w6J99ixR019087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 09:09:44 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w6J99faR004935; Thu, 19 Jul 2018 09:09:41 GMT Received: from mwanda (/197.179.115.196) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Jul 2018 02:09:41 -0700 Date: Thu, 19 Jul 2018 12:09:29 +0300 From: Dan Carpenter To: Bartosz Golaszewski Cc: Bartosz Golaszewski , Sekhar Nori , Kevin Hilman , Russell King , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Lukas Wunner , Rob Herring , Florian Fainelli , Ivan Khoronzhuk , David Lechner , Greg Kroah-Hartman , Andrew Lunn , arm-soc , LKML , Linux-OMAP , netdev@vger.kernel.org Subject: Re: [PATCH v2 2/3] net: add support for nvmem to eth_platform_get_mac_address() Message-ID: <20180719090929.arbysqo2bk3esoar@mwanda> References: <20180719082028.26116-1-brgl@bgdev.pl> <20180719082028.26116-3-brgl@bgdev.pl> <20180719084503.tfv6jllsukk2zv3f@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8958 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=499 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807190100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Maybe it would be simpler as three separate functions: int of_eth_get_mac_address() <- rename existing function to this int nvmem_eth_get_mac_address() <- patch 2 int mtd_eth_nvmem_get_mac_address() patch 3 int ret; ret = of_eth_get_mac_address(dev, mac_addr); if (!ret) return 0; ret = nvmem_eth_get_mac_address(dev, mac_addr); if (ret == -EPROBEDEFER) return ret; if (!ret) return 0; ret = mtd_eth_nvmem_get_mac_address(dev, mac_addr); if (!ret) return 0; return -ENODEV; regards, dan carpenter