Re: [PATCHv2] drivers/misc: Altera Cyclone active serial implementation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Baruch Siach
Date: Tuesday, November 9, 2010 - 10:54 pm

Hi Indan,

On Tue, Nov 09, 2010 at 09:15:09PM +0100, Indan Zupancic wrote:

[snip]


I use AS_MAX_DEVS to set the size of cyclone_as_devs. It documents why this 
array is of that length.


The current code seems more clear to me. AS_MAX_DEVS expresses the reason for 
not letting id exceed this value, and for having -ENODEV as return value. The 
cyclone_as_devs boundary check is just a side effect.

[snip]


I'd rather be on the safe side here. Future extensions (like read or lseek 
implementations) may change *ppos.


OK. My original rationale was to skip the delay in case of error, but this 
micro-optimization doesn't worth the code obfuscation.

baruch


-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCHv2] drivers/misc: Altera Cyclone active serial i ..., Baruch Siach, (Tue Nov 9, 10:54 pm)