From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Alvin" Subject: RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver Date: Mon, 15 Sep 2014 01:18:24 +0000 Message-ID: <4656BEB6164FC34F8171C6538F1A595B2E9915E6@SHSMSX101.ccr.corp.intel.com> References: <1410286081-16653-1-git-send-email-alvin.chen@intel.com> <1410286081-16653-2-git-send-email-alvin.chen@intel.com> <1410422381.7023.15.camel@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Return-path: Received: from mga09.intel.com ([134.134.136.24]:57199 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753038AbaIOBS2 convert rfc822-to-8bit (ORCPT ); Sun, 14 Sep 2014 21:18:28 -0400 In-Reply-To: Content-Language: en-US Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org Cc: "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "Kweh, Hock Leong" , "devicetree@vger.kernel.org" , "Ong, Boon Leong" , "gnurou@gmail.com" , "linus.walleij@linaro.org" , "linux-gpio@vger.kernel.org" , "sebastian@breakpoint.cc" , "grant.likely@linaro.org" , "Westerberg, Mika" , "dvhart@linux.intel.com" , "arnd@arndb.de" , atull , "Shevchenko, Andriy" > > > > > > static int dwapb_gpio_probe(struct platform_device *pdev) { > > > > + int i; > > > > struct resource *res; > > > > struct dwapb_gpio *gpio; > > > > - struct device_node *np; > > > > int err; > > > > - unsigned int offs = 0; > > > > + struct device *dev = &pdev->dev; > > > > + struct dwapb_platform_data *pdata = dev_get_platdata(dev); > > > > + bool is_pdata_alloc = !pdata; > > > > > > Please combine the int's in one line (int err, i;) and put them as > > > the last one on this list. It looks the same to the compiler of > > > course, but more uniform for human eyes :) > > > > Do you think it's a good idea? In this case I, for example, would like > > to see int err as a separate line at the end of definition block. It > > would be better to distinguish counters and return code storage. > > Moreover, often counters would be unsigned int. > > If they are both 'int' they should be combined. If 'i' is changed to be an > unsigned int they would be separate. Linus, do you have any idea about it? I think it is not a big issue. > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753108AbaIOBSb (ORCPT ); Sun, 14 Sep 2014 21:18:31 -0400 Received: from mga09.intel.com ([134.134.136.24]:57199 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753038AbaIOBS2 convert rfc822-to-8bit (ORCPT ); Sun, 14 Sep 2014 21:18:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,523,1406617200"; d="scan'208";a="602802923" From: "Chen, Alvin" To: "linus.walleij@linaro.org" CC: "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "Kweh, Hock Leong" , "devicetree@vger.kernel.org" , "Ong, Boon Leong" , "gnurou@gmail.com" , "linus.walleij@linaro.org" , "linux-gpio@vger.kernel.org" , "sebastian@breakpoint.cc" , "grant.likely@linaro.org" , "Westerberg, Mika" , "dvhart@linux.intel.com" , "arnd@arndb.de" , atull , "Shevchenko, Andriy" Subject: RE: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver Thread-Topic: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver Thread-Index: AQHP0ILxaGk/ya5Mn0yC06Al/AQx+A== Date: Mon, 15 Sep 2014 01:18:24 +0000 Message-ID: <4656BEB6164FC34F8171C6538F1A595B2E9915E6@SHSMSX101.ccr.corp.intel.com> References: <1410286081-16653-1-git-send-email-alvin.chen@intel.com> <1410286081-16653-2-git-send-email-alvin.chen@intel.com> <1410422381.7023.15.camel@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > > > static int dwapb_gpio_probe(struct platform_device *pdev) { > > > > + int i; > > > > struct resource *res; > > > > struct dwapb_gpio *gpio; > > > > - struct device_node *np; > > > > int err; > > > > - unsigned int offs = 0; > > > > + struct device *dev = &pdev->dev; > > > > + struct dwapb_platform_data *pdata = dev_get_platdata(dev); > > > > + bool is_pdata_alloc = !pdata; > > > > > > Please combine the int's in one line (int err, i;) and put them as > > > the last one on this list. It looks the same to the compiler of > > > course, but more uniform for human eyes :) > > > > Do you think it's a good idea? In this case I, for example, would like > > to see int err as a separate line at the end of definition block. It > > would be better to distinguish counters and return code storage. > > Moreover, often counters would be unsigned int. > > If they are both 'int' they should be combined. If 'i' is changed to be an > unsigned int they would be separate. Linus, do you have any idea about it? I think it is not a big issue. >