Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932675AbcLPBWB (ORCPT ); Thu, 15 Dec 2016 20:22:01 -0500 Received: from mail-db5eur01on0048.outbound.protection.outlook.com ([104.47.2.48]:17920 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753772AbcLPBVv (ORCPT ); Thu, 15 Dec 2016 20:21:51 -0500 From: Stuart Yoder To: Laurentiu Tudor , "gregkh@linuxfoundation.org" CC: "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" , "agraf@suse.de" , "arnd@arndb.de" , Leo Li , Ioana Ciornei , "Catalin Horghidan" , Ruxandra Ioana Radulescu , Roy Pledge , Haiying Wang Subject: RE: [PATCH v3 7/9] bus: fsl-mc: dpio: add the DPAA2 DPIO service interface Thread-Topic: [PATCH v3 7/9] bus: fsl-mc: dpio: add the DPAA2 DPIO service interface Thread-Index: AQHSTCUfEupUkiu08kyagN+nZ0GyZqD0oGSAgBUQGGA= Date: Thu, 15 Dec 2016 22:43:29 +0000 Message-ID: References: <1480632094-3621-1-git-send-email-stuart.yoder@nxp.com> <1480632094-3621-8-git-send-email-stuart.yoder@nxp.com> <584170E6.3030103@nxp.com> In-Reply-To: <584170E6.3030103@nxp.com> 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=stuart.yoder@nxp.com; x-originating-ip: [162.203.173.167] x-microsoft-exchange-diagnostics: 1;VI1PR0401MB2637;7:FYwTDtHdt9gOlZUDJ7akpuWR5gT09ICcDEWYN/cXi9P1BTHhWJeUEPcdIB9WWYppBA45nv2DnN2Seh40E42O6A/jjm1No1RXUtZBTz6uylsEZXlgSbfp+0NzYkoTo6gtMH1s5CWNziTfVYkPHY4PniQZ/AnZeKg/g7ln3ZYSbyCvFEml2FiLEX3YD0sKMmA9IpSWBnotWt8t5Lvz0UMkHgqTlNAyjn2989mDOjUZUXyscPBwt+38KAx8SIN/rYboeJEGy+oQ81Nc6QxMIWQxWMFrB9vjDQYl61UdxeNrXKapaDnAozP54HSGAw/48VIfBwL2A3mYqYDCSU3JtkCeY+ZmQQqhSLTD1N/+GRnvV+eU+bzjEzxcCC5K416aHYQdflzUKe62dzycPBCbcJzdYPZ6x1Lw7fqJDJtO1jcJoSEs/qRkSwkALHtovEUWWJkkSIMrc5JY0qHOD+CK8+12Sg== x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39450400003)(39410400002)(39840400002)(39860400002)(39850400002)(199003)(189002)(5001770100001)(7736002)(92566002)(2501003)(38730400001)(105586002)(76576001)(4326007)(3280700002)(305945005)(229853002)(8936002)(106116001)(106356001)(102836003)(6116002)(6436002)(9686002)(189998001)(3846002)(3660700001)(97736004)(5660300001)(77096006)(8676002)(101416001)(50986999)(2950100002)(54356999)(6506006)(68736007)(76176999)(74316002)(7696004)(86362001)(2906002)(33656002)(81156014)(66066001)(122556002)(81166006)(25786008)(2900100001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB2637;H:VI1PR0401MB2638.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; x-ms-office365-filtering-correlation-id: f60e9e1f-5b92-44fb-04b4-08d4253bca97 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:VI1PR0401MB2637; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(6047074)(6072148);SRVR:VI1PR0401MB2637;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0401MB2637; x-forefront-prvs: 0157DEB61B spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2016 22:43:29.6103 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2637 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 uBG1M5Df020910 Content-Length: 1684 Lines: 50 > > +struct dpaa2_io *dpaa2_io_create(const struct dpaa2_io_desc *desc) > > +{ > > + struct dpaa2_io *obj = kmalloc(sizeof(*obj), GFP_KERNEL); > > + > > + if (!obj) > > + return NULL; > > + > > + /* check if CPU is out of range (-1 means any cpu) */ > > + if (desc->cpu >= num_possible_cpus()) > > We leak 'obj' on this error path. Will fix. > > + > > +/** > > + * dpaa2_io_service_rearm() - Rearm the notification for the given DPIO service. > > + * @service: the given DPIO service. > > s/@service/@d/ Will fix. > > +/** > > + * dpaa2_io_store_next() - Determine when the next dequeue result is available. > > + * @s: the dpaa2_io_store object. > > + * @is_last: indicate whether this is the last frame in the pull command. > > + * > > + * When an object driver performs dequeues to a dpaa2_io_store, this function > > + * can be used to determine when the next frame result is available. Once > > + * this function returns non-NULL, a subsequent call to it will try to find > > + * the next dequeue result. > > + * > > + * Note that if a pull-dequeue has a NULL result because the target FQ/channel > > + * was empty, then this function will also return NULL (rather than expecting > > + * the caller to always check for this. As such, "is_last" can be used to > > + * differentiate between "end-of-empty-dequeue" and "still-waiting". > > + * > > + * Return dequeue result for a valid dequeue result, or NULL for empty dequeue. > > + */ > > +struct dpaa2_dq *dpaa2_io_store_next(struct dpaa2_io_store *s, int *is_last) > > "bool *is_last"? Same comment here as on the other patch...let's get Roy's input on this and make it a TODO if deemed a good idea. Thanks, Stuartt