From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034820AbcKAJWX (ORCPT ); Tue, 1 Nov 2016 05:22:23 -0400 Received: from mail-ve1eur01on0055.outbound.protection.outlook.com ([104.47.1.55]:31118 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1034780AbcKAJWU (ORCPT ); Tue, 1 Nov 2016 05:22:20 -0400 X-Greylist: delayed 92572 seconds by postgrey-1.27 at vger.kernel.org; Tue, 01 Nov 2016 05:22:20 EDT From: Noam Camus To: Thomas Gleixner CC: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "daniel.lezcano@linaro.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer Thread-Topic: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer Thread-Index: AQHSM0n/vOaIr9qvK0aJNO3BBkqkA6DC1OUAgAEC9IA= Date: Tue, 1 Nov 2016 09:07:38 +0000 Message-ID: References: <1477899468-5494-1-git-send-email-noamca@mellanox.com> <1477899468-5494-3-git-send-email-noamca@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=noamca@mellanox.com; x-originating-ip: [212.179.42.66] x-ms-office365-filtering-correlation-id: 15926b3b-0508-47b7-f639-08d402368706 x-microsoft-exchange-diagnostics: 1;DB6PR0501MB2520;7:ibDncsCgOVgTcNoWnjDb8/JiEG0sbslBkMaqa7LCRenjrwUkccT2mkdiX0CDSERwh5kre5PEQ5j1jmqpeVGwa0Gam9U/4MTgKpJTKRB+/GtZZtCNKo8/Lt/NgqIRfo2+8tAND80XvW0AkDQx4Amd6w8xBO/uoBnGer/aC1pYSvCpuv0W3568S2k+ag2jTr7t3BujqMlLm+HeljR7UTrZBDlJfbmgTQLYE1pY+mBalFbwuXjH4RDdlP74XOkpkt94r5qKXoguVoTg6Mx4ZWWh1dXRijqabU25d7KP4OoLMJrpxwLk+zk6yq3QFTGFhkTPJ/wI+NnLtR2wzOBM1I0smXliiI+Qclze6jCi20MoGb0= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0501MB2520; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026);SRVR:DB6PR0501MB2520;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0501MB2520; x-forefront-prvs: 01136D2D90 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(199003)(377454003)(189002)(2906002)(7736002)(2950100002)(6916009)(9686002)(2900100001)(5002640100001)(7696004)(305945005)(68736007)(3660700001)(5660300001)(110136003)(19580405001)(8936002)(19580395003)(7846002)(77096005)(33656002)(92566002)(3280700002)(122556002)(74316002)(86362001)(76576001)(81166006)(6116002)(4326007)(8676002)(586003)(101416001)(81156014)(11100500001)(3846002)(97736004)(50986999)(54356999)(106356001)(76176999)(189998001)(66066001)(105586002)(102836003)(106116001)(10400500002)(87936001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0501MB2520;H:DB6PR0501MB2518.eurprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Nov 2016 09:07:38.1901 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2520 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uA19NbKK001882 > From: Thomas Gleixner [mailto:tglx@linutronix.de] > Sent: Monday, October 31, 2016 7:40 PM >> >> static unsigned long nps_timer_rate; >> +static int nps_get_timer_clk(struct device_node *node, > >Please don't glue variables and functions together w/o a new line. That's horrible to read. Will be fixed in V4 >> +static int __init nps_setup_clocksource(struct device_node *node) >> { >> int ret, cluster; >> + struct clk *clk; >> >> for (cluster = 0; cluster < NPS_CLUSTER_NUM; cluster++) >> nps_msu_reg_low_addr[cluster] = >> nps_host_reg((cluster << NPS_CLUSTER_OFFSET), >> NPS_MSU_BLKID, NPS_MSU_TICK_LOW); >> >> - ret = clk_prepare_enable(clk); >> - if (ret) { >> - pr_err("Couldn't enable parent clock\n"); >> - return ret; >> - } >> - >> - nps_timer_rate = clk_get_rate(clk); >> + nps_get_timer_clk(node, &nps_timer_rate, clk); >Why are you ignoring the return code? It was handled before your change ... Will be fixed in V4 Regards, Noam From mboxrd@z Thu Jan 1 00:00:00 1970 From: Noam Camus Subject: RE: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer Date: Tue, 1 Nov 2016 09:07:38 +0000 Message-ID: References: <1477899468-5494-1-git-send-email-noamca@mellanox.com> <1477899468-5494-3-git-send-email-noamca@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Language: en-US Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thomas Gleixner Cc: "robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "mark.rutland-5wv7dgnIgG8@public.gmane.org" , "daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: devicetree@vger.kernel.org > From: Thomas Gleixner [mailto:tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org]=20 > Sent: Monday, October 31, 2016 7:40 PM >> =20 >> static unsigned long nps_timer_rate; >> +static int nps_get_timer_clk(struct device_node *node, > >Please don't glue variables and functions together w/o a new line. That's = horrible to read. Will be fixed in V4 >> +static int __init nps_setup_clocksource(struct device_node *node) >> { >> int ret, cluster; >> + struct clk *clk; >> =20 >> for (cluster =3D 0; cluster < NPS_CLUSTER_NUM; cluster++) >> nps_msu_reg_low_addr[cluster] =3D >> nps_host_reg((cluster << NPS_CLUSTER_OFFSET), >> NPS_MSU_BLKID, NPS_MSU_TICK_LOW); >> =20 >> - ret =3D clk_prepare_enable(clk); >> - if (ret) { >> - pr_err("Couldn't enable parent clock\n"); >> - return ret; >> - } >> - >> - nps_timer_rate =3D clk_get_rate(clk); >> + nps_get_timer_clk(node, &nps_timer_rate, clk); >Why are you ignoring the return code? It was handled before your change ..= . Will be fixed in V4 Regards, Noam -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html