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]
Date:	Thu, 26 Apr 2007 09:45:42 -0700
From:	Matt Reimer <mreimer@...p.net>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Evgeniy Polyakov <johnpol@....mipt.ru>,
	linux-kernel@...r.kernel.org
Subject: Re: [2/2] Driver for the Maxim DS1WM, a 1-wire bus master ASIC core.

On Apr 25, 2007, at 5:46 PM, Andrew Morton wrote:

> On Tue, 24 Apr 2007 14:02:03 +0400 Evgeniy Polyakov  
> <johnpol@....mipt.ru> wrote:
>
>> +#define DS1WM_CMD_1W_RESET  1 << 0	/* force reset on 1-wire bus */
>> +#define DS1WM_CMD_SRA	    1 << 1	/* enable Search ROM accelerator  
>> mode */
>> +#define DS1WM_CMD_DQ_OUTPUT 1 << 2	/* write only - forces bus low */
>> +#define DS1WM_CMD_DQ_INPUT  1 << 3	/* read only - reflects state  
>> of bus */
>> +
>> +#define DS1WM_INT_PD	    1 << 0	/* presence detect */
>> +#define DS1WM_INT_PDR	    1 << 1	/* presence detect result */
>> +#define DS1WM_INT_TBE	    1 << 2	/* tx buffer empty */
>> +#define DS1WM_INT_TSRE	    1 << 3	/* tx shift register empty */
>> +#define DS1WM_INT_RBF	    1 << 4	/* rx buffer full */
>> +#define DS1WM_INT_RSRF	    1 << 5	/* rx shift register full */
>> +
>> +#define DS1WM_INTEN_EPD	    1 << 0	/* enable presence detect int */
>> +#define DS1WM_INTEN_IAS	    1 << 1	/* INTR active state */
>> +#define DS1WM_INTEN_ETBE    1 << 2	/* enable tx buffer empty int */
>> +#define DS1WM_INTEN_ETMT    1 << 3	/* enable tx shift register  
>> empty int */
>> +#define DS1WM_INTEN_ERBF    1 << 4	/* enable rx buffer full int */
>> +#define DS1WM_INTEN_ERSRF   1 << 5	/* enable rx shift register  
>> full int */
>> +#define DS1WM_INTEN_DQO	    1 << 6	/* enable direct bus driving ops
>> +					   (undocumented), Szabolcs Gyurko */
>
> These macros are very dangerous - please parenthesise them all.

(and several other helpful suggestions...)

Thanks for your review Andrew. I made all the code changes you  
suggested in the attached patch.

Matt

Download attachment "0001-w1-driver-for-Maxim-DS1WM.patch" of type "application/octet-stream" (14310 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ