Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758933AbbKSRiF (ORCPT ); Thu, 19 Nov 2015 12:38:05 -0500 Received: from mail-bn1bon0146.outbound.protection.outlook.com ([157.56.111.146]:51809 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755403AbbKSRiD convert rfc822-to-8bit (ORCPT ); Thu, 19 Nov 2015 12:38:03 -0500 From: Hartley Sweeten To: Ian Abbott , "driverdev-devel@linuxdriverproject.org" CC: Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 0/8] staging: comedi: some comedi_write() changes Thread-Topic: [PATCH 0/8] staging: comedi: some comedi_write() changes Thread-Index: AQHRIipNACbvPmUncUCc75edtDtiN56jmN5w Date: Thu, 19 Nov 2015 17:23:51 +0000 Message-ID: References: <1447869311-21955-1-git-send-email-abbotti@mev.co.uk> In-Reply-To: <1447869311-21955-1-git-send-email-abbotti@mev.co.uk> 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=HartleyS@visionengravers.com; x-originating-ip: [184.183.19.121] x-microsoft-exchange-diagnostics: 1;BN3PR0101MB1060;5:yRXhhKMKoaChOI5qfvl/MF0ev8l1+PC42io0uxuVP+54HrnDTzrqYw7zqyERGCX8RrpPWEpiYXfpYKfhNORX8OK/yWQ/YgJvf750d0OSe030gMUwMmG1PeoPP/GgDjflWP3ca36ummCZEsoLeLxyGw==;24:WmICY7NOow/xa4eQuK62DfTFteac8SLCg0g05QB40ND6iFI20FtdK664oq6dkpdeGTnLJ/1FDM+iSzmXq916vYgI6SCwnb2iAOIpqzxSO0w=;20:SQEFIOBD19gWtIfI192EDFgWH47de3OP/PNXHqozqHHRyeQmW3Pf+BW5lU08x26d/gkMGBpvcdtQ0tmKd0nErA== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0101MB1060; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(156620851176556); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001);SRVR:BN3PR0101MB1060;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0101MB1060; x-forefront-prvs: 07658B8EA3 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(164054003)(24454002)(199003)(377454003)(5004730100002)(19580395003)(74316001)(106356001)(5008740100001)(6116002)(5003600100002)(77096005)(10400500002)(40100003)(122556002)(2900100001)(586003)(5007970100001)(3846002)(19580405001)(2950100001)(92566002)(5001770100001)(66066001)(11100500001)(86362001)(2501003)(106116001)(105586002)(87936001)(189998001)(5001960100002)(76176999)(33656002)(97736004)(102836003)(81156007)(101416001)(80792005)(50986999)(5002640100001)(54356999);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0101MB1060;H:BN3PR0101MB1057.prod.exchangelabs.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2015 17:23:51.8572 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d698601f-af92-4269-8099-fd6f11636477 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0101MB1060 X-Microsoft-Exchange-Diagnostics: 1;BN3PR0101MB1171;2:4KsSbdct/2Ggs9xyjyKfKuN0RAoQozcUXyCIWLXD/gAciixrxfPf47OZ8tE0SdTMzNnfeI6gD07MlJhxVIU4iM0LHd/FiHAQ50Qjx3t8CG6IHMno206RXbME4j+nJsBtcBlWeUb8/ivbH65b1y91oNJU9nh7251oTJ3N3gMeU3Y=;23:AjvkOzSgu74lSJw4OEUuJ1dzJ1rJYkwni3DhNTCE2Vc605aaCw7z9bPN6FovDYUiBLBe2+aB7wVvZ/KtIVdZwc5CW1jVcfO1mvvrskct0VjuBv2RAtVh7nkhXsL5+IQXCimK556PxPZhpD1CWa2sfh0Q/3PVVWMY+OFEqcxLy8H5bxyf0qt4W/Ee6uMDAYzS X-OriginatorOrg: visionengravers.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 32 On Wednesday, November 18, 2015 10:55 AM, Ian Abbott wrote: > Tidy up the "write" file operation handler, `comedi_write()` a bit and > improve the error handling. > > 1) staging: comedi: rearrange comedi_write() code > 2) staging: comedi: do extra checks for becoming non-busy for "write" > 3) staging: comedi: make some variables unsigned in comedi_write() > 4) staging: comedi: avoid bad truncation of a size_t in comedi_write() > 5) staging: comedi: allow buffer wraparound in comedi_write() > 6) staging: comedi: return error on "write" if no command set up > 7) staging: comedi: simplify returned errors for comedi_write() > 8) staging: comedi: check for more errors for zero-length write > > drivers/staging/comedi/comedi_fops.c | 124 ++++++++++++++++------------------- > 1 file changed, 56 insertions(+), 68 deletions(-) Ian, Other than the minor nit-pick in patch 1 about the 'count == 0' when becoming non-busy (the same situation is in comedi_read), this looks good to me. It also makes the 'write' look more like the 'read'. Thanks, Reviewed-by: H Hartley Sweeten -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/