Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2032047imm; Thu, 27 Sep 2018 06:26:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV62tSScXc8MhIpWBm9SXjsy3oj34ytCy1SHtIDnt/H4fBGQ/AqplWY64bR+mPsZBaizA73FQ X-Received: by 2002:a17:902:561:: with SMTP id 88-v6mr11032921plf.320.1538054812268; Thu, 27 Sep 2018 06:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538054812; cv=none; d=google.com; s=arc-20160816; b=jv4gIauA4sZ/UnFu53f8SwRE5XY/3iUiAJRo+mK8wqOJj79s5fSHcpUsqJCIiOldnE eg1BRp5nalwEvq5hMUoGKi3hIs7wbzvj0wuSerIBLtAGvLeTiPvjG96LCWYLytVHnJvm tdcLEDPJtgowoUhoHs36JRvqPefT4gvNd6x68qAKxkBTrZk5LdtFiGIL6LuRf5Dz/yfy /nze8Lvz8xfe8LlLuwzi2x6tRVpcp9gdBcS5RZ9p/ISeQesn4pvx5jt15/SItkQxmHT8 WfYeQRNCsg0fRfrr2mK1obuNGlhn5fTO0TGJjvzVcmIz8jMpFRlFN87JIUJSug/JIf5d OTWA== 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; bh=TmEo+4t6CnDlpFyrq6nfTpTy6+5A6qk7lpbjoQ0Ef2o=; b=YlTVc3Saadi5PKeeX6xHf/QSPZcewpperWmkhJcyp/PFYap8I/U36abDToVargwenP 6TFMSrZOnRUuFF00W7SwCQdFc3iozihT9LaGaqXeNa7UEHLW4lSC/cinzSR/o2VvLfbf 7ItsLKI1nwwIsQ0j/ja9tAAxvFMzxkU8Qyb8SOrP3mw+rY+yEEs3i2yZ5DFNQ2DSGbdN jqK+fku2+qESNJJd8HDcrSk1fWHHz6wvd9qJ96A8QcP6g1FZAi15DpioNVoEQFlHJmc6 Lypc9jiTILYTRNnRTPVUpee3SvJX+zqUy2MGFI9IorkbSnJAZUP/StBH1PmjyREmMhzV RQ0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=FFAyxXe2; 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 x7-v6si2060013plv.413.2018.09.27.06.26.27; Thu, 27 Sep 2018 06:26:52 -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=@lunn.ch header.s=20171124 header.b=FFAyxXe2; 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 S1727852AbeI0Tn3 (ORCPT + 99 others); Thu, 27 Sep 2018 15:43:29 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:47258 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbeI0Tn3 (ORCPT ); Thu, 27 Sep 2018 15:43:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=TmEo+4t6CnDlpFyrq6nfTpTy6+5A6qk7lpbjoQ0Ef2o=; b=FFAyxXe2YTmW1E3HZMiDN8bQerxdbywK3Y1dcY+ZdPWfFs6uUV1uQ+OyflQbxFE3PeIEHDj4EXXpFFPEb84e8AhstDzpE+Ov2HXN01MZAiMM13M1gZ1iMcju3awtZ0ecEEjybTK7bXuN0f0DUYisKZgX7CjmDBhY4kpSF7/HsSQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1g5WHz-0006VA-Lo; Thu, 27 Sep 2018 15:25:07 +0200 Date: Thu, 27 Sep 2018 15:25:07 +0200 From: Andrew Lunn To: Yangbo Lu Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, netdev@vger.kernel.org, Richard Cochran , "David S . Miller" , Ioana Radulescu , Greg Kroah-Hartman Subject: Re: [PATCH 1/2] net: dpaa2: move DPAA2 PTP driver out of staging/ Message-ID: <20180927132507.GB23375@lunn.ch> References: <20180927111228.46118-1-yangbo.lu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180927111228.46118-1-yangbo.lu@nxp.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 07:12:27PM +0800, Yangbo Lu wrote: > This patch is to move DPAA2 PTP driver out of staging/ > since the dpaa2-eth had been moved out. > > Signed-off-by: Yangbo Lu > --- > drivers/net/ethernet/freescale/Kconfig | 9 +-------- > drivers/net/ethernet/freescale/dpaa2/Kconfig | 15 +++++++++++++++ > drivers/net/ethernet/freescale/dpaa2/Makefile | 6 ++++-- > .../ethernet/freescale/dpaa2}/dprtc-cmd.h | 0 > .../rtc => net/ethernet/freescale/dpaa2}/dprtc.c | 0 > .../rtc => net/ethernet/freescale/dpaa2}/dprtc.h | 0 > .../rtc => net/ethernet/freescale/dpaa2}/rtc.c | 0 > .../rtc => net/ethernet/freescale/dpaa2}/rtc.h | 0 > drivers/staging/fsl-dpaa2/Kconfig | 8 -------- > drivers/staging/fsl-dpaa2/Makefile | 1 - > drivers/staging/fsl-dpaa2/rtc/Makefile | 7 ------- > 11 files changed, 20 insertions(+), 26 deletions(-) > create mode 100644 drivers/net/ethernet/freescale/dpaa2/Kconfig > rename drivers/{staging/fsl-dpaa2/rtc => net/ethernet/freescale/dpaa2}/dprtc-cmd.h (100%) > rename drivers/{staging/fsl-dpaa2/rtc => net/ethernet/freescale/dpaa2}/dprtc.c (100%) > rename drivers/{staging/fsl-dpaa2/rtc => net/ethernet/freescale/dpaa2}/dprtc.h (100%) > rename drivers/{staging/fsl-dpaa2/rtc => net/ethernet/freescale/dpaa2}/rtc.c (100%) > rename drivers/{staging/fsl-dpaa2/rtc => net/ethernet/freescale/dpaa2}/rtc.h (100%) Hi Yangbo Calling a ptp driver rtc.[ch] seems rather odd. Could you fixup the name, change it to ptp.[ch]. Also, some of the function names, and structures, rtc_probe->ptp_probe, rtc_remove->ptp_remove, rtc_match_id_table-> ptp_match_id_table, etc. ptp_dpaa2_adjfreq() probably should return err, not 0. ptp_dpaa2_gettime() again does not return the error. If fact, it seems like all the main functions ignore errors. kzalloc() could be changed to devm_kzalloc() to simplify the cleanup Can ptp_dpaa2_caps be made const? dpaa2_phc_index does not appear to be used. dev_set_drvdata(dev, NULL); is not needed. Can rtc_drv be made const? Is rtc.h used by anything other than rtc.c? It seems like it can be removed. It seems like there is a lot of code in dprtc.c which is unused. rtc.c does nothing with interrupts for example. Do you plan to make use of this extra code? Or can it be removed leaving just what is needed? struct dprtc_cmd_get_irq - Putting pad at the beginning of a struct seems very odd. And it is not the only example. Andrew