From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754535AbbGPIRm (ORCPT ); Thu, 16 Jul 2015 04:17:42 -0400 Received: from mail-bl2on0147.outbound.protection.outlook.com ([65.55.169.147]:48111 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753693AbbGPIRj convert rfc822-to-8bit (ORCPT ); Thu, 16 Jul 2015 04:17:39 -0400 From: Yao Yuan To: Arnd Bergmann , "linux-arm-kernel@lists.infradead.org" CC: "vinod.koul@intel.com" , "dmaengine@vger.kernel.org" , "dan.j.williams@intel.com" , "linux-kernel@vger.kernel.org" , "stefan@agner.ch" Subject: RE: [PATCH] dmaengine: fsl-edma: add PM suspend/resume support Thread-Topic: [PATCH] dmaengine: fsl-edma: add PM suspend/resume support Thread-Index: AQHQvuIIHiVEsscjaU+Rwk9xSEcOnp3cRLQAgAAGnwCAAAKCMIAAULiAgAEeSNA= Date: Thu, 16 Jul 2015 08:01:38 +0000 Message-ID: References: <1436952778-28000-1-git-send-email-yao.yuan@freescale.com> <3074236.7KNCYXgBBY@wuerfel> <2042080.Y9rzRSQLpW@wuerfel> In-Reply-To: <2042080.Y9rzRSQLpW@wuerfel> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arndb.de; dkim=none (message not signed) header.d=none; x-originating-ip: [199.59.231.64] x-microsoft-exchange-diagnostics: 1;BL2PR03MB338;5:h8IcveeRA7JdhCFI8xqfgo8MYXfP/nLbEirWfuoPe6wgOyvGAluUK9xv35rYQJktYZaSx3tNf96ocJvxVzDaNvp0F6aiTf1dgcek9s/UUXRE2QZeO9NzGS+4ahDmkC/5nMNPfBolgbJWbiKTAgUFMw==;24:q5SXsW7jVakWoh5gkLmYx5EQWkVoUUo7e6YQj2Uh1UWSHoJRXNUZdPb6nrYi9yDCi5hGbQ6XGIVj0XytnGn/gHAQDwt7oFMQvkzqkFhpSp0=;20:JWx29zOtHMhzCOHIGlGmEsTBbnckz+9CAk19phZbuns9rThwBcnbNa4svP0KxgVUqK4s+HCP5K2pzYwO+Ej8FA== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB338; bl2pr03mb338: X-MS-Exchange-Organization-RulesExecuted x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BL2PR03MB338;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB338; x-forefront-prvs: 0639027A9E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(53754006)(24454002)(66066001)(93886004)(102836002)(5002640100001)(77096005)(5001770100001)(2656002)(87936001)(46102003)(86362001)(76576001)(76176999)(50986999)(54356999)(2501003)(2900100001)(2950100001)(106116001)(5003600100002)(189998001)(99286002)(33656002)(77156002)(62966003)(92566002)(5001960100002)(74316001)(122556002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB338;H:BL2PR03MB338.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2015 08:01:38.3639 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB338 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, Ok, I will remove the #ifdef in the next version. Thanks. Hi All, Is there any others comments? Thanks for your review. Best Regards, Yuan Yao On Wednesday, July 15, 2015 10:55 PM Arnd wrote: > On Wednesday 15 July 2015 10:29:55 Yao Yuan wrote: > > Hi Arnd, > > > > Thanks for your review. > > And can you give me more information? > > In my opinion, The fsl_edma_pm_state will just be used when CONFIG_PM > > support. So why not use the #ifdefs to remove the unnecessary code? Since > the PM will not be selected in many use cases. > > I would consider code readability more important than saving a few instructions, > and the #ifdef interrupts the reading flow. > Another aspect is that the compiler does not produce warnings for incorrect > code in an #ifdef, so we try to use e.g. 'if (IS_ENABLED(CONFIG_FOO))' > instead of '#ifdef CONFIG_FOO' wherever possible. > > Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: yao.yuan@freescale.com (Yao Yuan) Date: Thu, 16 Jul 2015 08:01:38 +0000 Subject: [PATCH] dmaengine: fsl-edma: add PM suspend/resume support In-Reply-To: <2042080.Y9rzRSQLpW@wuerfel> References: <1436952778-28000-1-git-send-email-yao.yuan@freescale.com> <3074236.7KNCYXgBBY@wuerfel> <2042080.Y9rzRSQLpW@wuerfel> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Arnd, Ok, I will remove the #ifdef in the next version. Thanks. Hi All, Is there any others comments? Thanks for your review. Best Regards, Yuan Yao On Wednesday, July 15, 2015 10:55 PM Arnd wrote: > On Wednesday 15 July 2015 10:29:55 Yao Yuan wrote: > > Hi Arnd, > > > > Thanks for your review. > > And can you give me more information? > > In my opinion, The fsl_edma_pm_state will just be used when CONFIG_PM > > support. So why not use the #ifdefs to remove the unnecessary code? Since > the PM will not be selected in many use cases. > > I would consider code readability more important than saving a few instructions, > and the #ifdef interrupts the reading flow. > Another aspect is that the compiler does not produce warnings for incorrect > code in an #ifdef, so we try to use e.g. 'if (IS_ENABLED(CONFIG_FOO))' > instead of '#ifdef CONFIG_FOO' wherever possible. > > Arnd