lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CO2PR01MB2088DE5D9B90F129786D21A4D0480@CO2PR01MB2088.prod.exchangelabs.com>
Date:	Tue, 17 May 2016 17:14:23 +0000
From:	Hartley Sweeten <HartleyS@...ionengravers.com>
To:	Ian Abbott <abbotti@....co.uk>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 01/14] staging: comedi: daqboard2000: remove commented out
 code

On Tuesday, May 17, 2016 2:53 AM, Ian Abbott wrote:
> Remove some commented out code.  Some of it uses constructs that don't
> exist in the driver, and probably come from the source code for the MS
> Windows driver.
>
> Signed-off-by: Ian Abbott <abbotti@....co.uk>
> ---
>  drivers/staging/comedi/drivers/daqboard2000.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
> index 57ab668..8c9a024 100644
> --- a/drivers/staging/comedi/drivers/daqboard2000.c
> +++ b/drivers/staging/comedi/drivers/daqboard2000.c
> @@ -278,9 +278,7 @@ struct daqboard2000_private {
>  
>  static void writeAcqScanListEntry(struct comedi_device *dev, u16 entry)
>  {
> -	/* udelay(4); */
>  	writew(entry & 0x00ff, dev->mmio + acqScanListFIFO);
> -	/* udelay(4); */
>  	writew((entry >> 8) & 0x00ff, dev->mmio + acqScanListFIFO);
>  }
>  
> @@ -315,10 +313,6 @@ static void setup_sampling(struct comedi_device *dev, int chan, int gain)
>  		word3 = 0;
>  		break;
>  	}
> -/*
> -  dev->eeprom.correctionDACSE[i][j][k].offset = 0x800;
> -  dev->eeprom.correctionDACSE[i][j][k].gain = 0xc00;
> -*/
>  	/* These should be read from EEPROM */
>  	word2 |= 0x0800;
>  	word3 |= 0xc000;

It might be a good idea to add a comment about the magic 0x0800 and 0xc000 values:

>  	word2 |= 0x0800;	/* offset */
>  	word3 |= 0xc000;	/* gain */

Wish I could find a register map for this board. I sent an email to Measurement Computing
to see if one is available.

Regards,
Hartley

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ