Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752817AbcDFSKw (ORCPT ); Wed, 6 Apr 2016 14:10:52 -0400 Received: from mail-by2on0131.outbound.protection.outlook.com ([207.46.100.131]:35036 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752424AbcDFSKs convert rfc822-to-8bit (ORCPT ); Wed, 6 Apr 2016 14:10:48 -0400 From: Hartley Sweeten To: Ian Abbott , Sudip Mukherjee , Greg Kroah-Hartman CC: "linux-kernel@vger.kernel.org" , "devel@driverdev.osuosl.org" Subject: RE: [PATCH] staging: comedi: das1800: remove unused variable Thread-Topic: [PATCH] staging: comedi: das1800: remove unused variable Thread-Index: AQHRj0ayv1HPe+Sq10ymMrFhplG7AZ98JfPwgACMW4CAABC+AIAAdyIw Date: Wed, 6 Apr 2016 17:55:36 +0000 Message-ID: References: <1459866185-1722-1-git-send-email-sudipm.mukherjee@gmail.com> <5704D9AD.4050807@mev.co.uk> <5704E7B8.6000707@mev.co.uk> In-Reply-To: <5704E7B8.6000707@mev.co.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mev.co.uk; dkim=none (message not signed) header.d=none;mev.co.uk; dmarc=none action=none header.from=visionengravers.com; x-originating-ip: [184.183.19.121] x-ms-office365-filtering-correlation-id: 81371a64-ec03-4a79-f799-08d35e44a854 x-microsoft-exchange-diagnostics: 1;BN3PR0101MB1058;5:1bjuAMiL/foj3SJ7ALbNydWY38yw3fe9CQZe14XfwSJM7hD4US8ZCfkow7LWAPcOkBoWnGPaFxiYHCQ5oIO65znnaml39BnPSjHMOPnxbm6P9vcNcB5eSb3abWfQ6glc00IX5/o7bDW34lyEbEQ9WQ==;24:wOYGWjjg/jA/fy8/gcMfs/xhAEr62VMMWlZfgFlkQHzBsow8ugi6XxJSIKBrnN0C3jzf/pxbG939A5OyCdAPriIQfo3PLPKjvn3cHkAmvDU= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0101MB1058; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040074)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041046)(6043046);SRVR:BN3PR0101MB1058;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0101MB1058; x-forefront-prvs: 0904004ECB x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(24454002)(74316001)(4326007)(5004730100002)(2906002)(50986999)(2950100001)(81166005)(54356999)(5002640100001)(76176999)(106116001)(10400500002)(77096005)(87936001)(5003600100002)(586003)(66066001)(33656002)(1220700001)(1096002)(2900100001)(3846002)(6116002)(86362001)(102836003)(92566002)(5001770100001)(93886004)(11100500001)(3280700002)(19580395003)(80792005)(122556002)(189998001)(19580405001)(3660700001)(5008740100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0101MB1058;H:BN3PR0101MB1057.prod.exchangelabs.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: visionengravers.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2016 17:55:36.1643 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d698601f-af92-4269-8099-fd6f11636477 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0101MB1058 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1868 Lines: 46 On Wednesday, April 06, 2016 3:41 AM, Ian Abbott wrote: > On 06/04/16 10:41, Ian Abbott wrote: >> On 06/04/16 02:21, Hartley Sweeten wrote: >>> On Tuesday, April 05, 2016 7:23 AM, Sudip Mukherjee wrote: >>>> The variable unipolar was never used. >>>> >>>> Signed-off-by: Sudip Mukherjee >>>> --- >>>> >>>> There may be a chance that reading from DAS1800_CONTROL_C is necessary >>>> before reading from DAS1800_STATUS. If that is true then please discard >>>> this patch. >>> >>> Actually the driver has a bug here. >>> >>> The analog input samples should be munged if the inputs are >>> configured for bipolar mode. >>> >>> I have a series almost ready that cleans up this driver and fixes the >>> bug. >> >> Hi Hartley, can the bug fix be placed at the top of your patch series? >> Thanks. >> Just posted the patch. It's a bit more involved than your fix in the comedi.org code but I think it's more complete. > The bug has been there forever (even in the "out-of-tree" version from > comedi.org, where I have just fixed it). There have been patches applied > to reformat and remove the incorrect bits of code, including > a142785d7c9d ("Staging: comedi: das1800: fixed multiple brace coding > style issues and pointer declaration style errors") and 82d28561b7e0 > ("staging: comedi: Remove if condition."). The latter patch, > 82d28561b7e0, mainly served to hide the bug further! Looks like both of those patches might have originated from one of the outreachy programs that Greg deals with. If you think this needs to be fixed in any of the stable trees, I can split it to match your comedi.org fix (to fix the stable trees) and a second patch for the additional cleanup. This is an old legacy ISA board and, as you stated, the bug has been there forever so I'm not sure if the backport is worth it. Regards, Hartley