From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756972AbcK2KLe (ORCPT ); Tue, 29 Nov 2016 05:11:34 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34834 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755394AbcK2KLR (ORCPT ); Tue, 29 Nov 2016 05:11:17 -0500 Date: Tue, 29 Nov 2016 11:11:12 +0100 From: Richard Cochran To: Grygorii Strashko Cc: "David S. Miller" , netdev@vger.kernel.org, Mugunthan V N , Sekhar Nori , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Murali Karicheri , Wingman Kwok Subject: Re: [PATCH v2 08/13] net: ethernet: ti: cpts: move dt props parsing to cpts driver Message-ID: <20161129101112.GG3110@localhost.localdomain> References: <20161128230337.6731-1-grygorii.strashko@ti.com> <20161128230337.6731-9-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161128230337.6731-9-grygorii.strashko@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 28, 2016 at 05:03:32PM -0600, Grygorii Strashko wrote: > +static int cpts_of_parse(struct cpts *cpts, struct device_node *node) > +{ > + int ret = -EINVAL; > + u32 prop; > + > + if (of_property_read_u32(node, "cpts_clock_mult", &prop)) > + goto of_error; > + cpts->cc_mult = prop; Why not set cc.mult here at the same time? > + > + if (of_property_read_u32(node, "cpts_clock_shift", &prop)) > + goto of_error; > + cpts->cc.shift = prop; > + > + return 0; > + > +of_error: > + dev_err(cpts->dev, "CPTS: Missing property in the DT.\n"); > + return ret; > +} Thanks, Richard