From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381AbbGOK36 (ORCPT ); Wed, 15 Jul 2015 06:29:58 -0400 Received: from mail-bn1bon0133.outbound.protection.outlook.com ([157.56.111.133]:20400 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751681AbbGOK34 convert rfc822-to-8bit (ORCPT ); Wed, 15 Jul 2015 06:29:56 -0400 From: Yao Yuan To: Arnd Bergmann , "linux-arm-kernel@lists.infradead.org" CC: "vinod.koul@intel.com" , "stefan@agner.ch" , "dmaengine@vger.kernel.org" , "dan.j.williams@intel.com" , "linux-kernel@vger.kernel.org" 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+Rwk9xSEcOnp3cRLQAgAAGnwCAAAKCMA== Date: Wed, 15 Jul 2015 10:29:55 +0000 Message-ID: References: <1436952778-28000-1-git-send-email-yao.yuan@freescale.com> <1436952778-28000-2-git-send-email-yao.yuan@freescale.com> <3074236.7KNCYXgBBY@wuerfel> In-Reply-To: <3074236.7KNCYXgBBY@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.226.141] x-microsoft-exchange-diagnostics: 1;BL2PR03MB337;5:CJ118+gOE6NT361K9DnO2XWIWRuSm8twEPMngcr7Q4LHvwt+xDzfNe5oHYeTIcgLk73CtwKBPLVWBlrK1fJbwhN7rI1X1Lm+eeDOHkHtpIVTa5bBOPR0Quub+K5NJcoX/HfOpQdknOJzR19UJo4zJA==;24:vsUlxpkgzH7SE6CVFn+yEsl/wjtok5vBvVfCgwVxA1ZWT12h3/2d7oB38NhO/dRh7Y3fl6ThZT3rpMGPWORkU+8aO7PixxHVDPoNfABwADs=;20:XPPcoJMh55eApgglskryIwCS2hmg/uxIeelfq4lV/4HZWTynssskuG20yqeYh7+4n6QfL3DMtxEzu59Fu7HfCg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB337; bl2pr03mb337: 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:BL2PR03MB337;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB337; x-forefront-prvs: 0638FD5066 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(51704005)(377454003)(24454002)(13464003)(106116001)(5001770100001)(86362001)(40100003)(74316001)(2950100001)(122556002)(2900100001)(77096005)(62966003)(77156002)(33656002)(66066001)(102836002)(54356999)(87936001)(189998001)(2656002)(5002640100001)(46102003)(76176999)(50986999)(76576001)(5003600100002)(92566002)(2501003)(5001960100002)(19580405001)(19580395003);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB337;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: 15 Jul 2015 10:29:55.1096 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB337 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks. Best Regards, Yuan Yao > -----Original Message----- > From: Arnd Bergmann [mailto:arnd@arndb.de] > Sent: Wednesday, July 15, 2015 5:57 PM > To: linux-arm-kernel@lists.infradead.org > Cc: Yuan Yao-B46683; vinod.koul@intel.com; stefan@agner.ch; > dmaengine@vger.kernel.org; dan.j.williams@intel.com; linux- > kernel@vger.kernel.org > Subject: Re: [PATCH] dmaengine: fsl-edma: add PM suspend/resume support > > On Wednesday 15 July 2015 17:32:58 Yuan Yao wrote: > > +#ifdef CONFIG_PM > > +enum fsl_edma_pm_state { > > + RUNNING = 0, > > + SUSPENDED, > > +}; > > +#endif > > > > struct fsl_edma_hw_tcd { > > > > The #ifdefs here seem unnecessary, at least most of them, better just do this > all unconditionally. > > Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: yao.yuan@freescale.com (Yao Yuan) Date: Wed, 15 Jul 2015 10:29:55 +0000 Subject: [PATCH] dmaengine: fsl-edma: add PM suspend/resume support In-Reply-To: <3074236.7KNCYXgBBY@wuerfel> References: <1436952778-28000-1-git-send-email-yao.yuan@freescale.com> <1436952778-28000-2-git-send-email-yao.yuan@freescale.com> <3074236.7KNCYXgBBY@wuerfel> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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. Thanks. Best Regards, Yuan Yao > -----Original Message----- > From: Arnd Bergmann [mailto:arnd at arndb.de] > Sent: Wednesday, July 15, 2015 5:57 PM > To: linux-arm-kernel at lists.infradead.org > Cc: Yuan Yao-B46683; vinod.koul at intel.com; stefan at agner.ch; > dmaengine at vger.kernel.org; dan.j.williams at intel.com; linux- > kernel at vger.kernel.org > Subject: Re: [PATCH] dmaengine: fsl-edma: add PM suspend/resume support > > On Wednesday 15 July 2015 17:32:58 Yuan Yao wrote: > > +#ifdef CONFIG_PM > > +enum fsl_edma_pm_state { > > + RUNNING = 0, > > + SUSPENDED, > > +}; > > +#endif > > > > struct fsl_edma_hw_tcd { > > > > The #ifdefs here seem unnecessary, at least most of them, better just do this > all unconditionally. > > Arnd