[U-Boot] [PATCH 4/6] sf: Update read/write command macros
Jagan Teki
jagannadh.teki at gmail.com
Mon Jan 20 14:10:30 CET 2014
On Mon, Jan 20, 2014 at 6:36 PM, Marek Vasut <marex at denx.de> wrote:
> On Monday, January 20, 2014 at 12:46:07 PM, Jagan Teki wrote:
>> On Mon, Jan 20, 2014 at 4:43 PM, Detlev Zundel <dzu at denx.de> wrote:
>> > Hi Jagan,
>> >
>> >> On Sun, Jan 19, 2014 at 2:06 AM, Marek Vasut <marex at denx.de> wrote:
>> >>> On Saturday, January 18, 2014 at 09:06:31 PM, Jagannadha
>> >>> Sutradharudu Teki
>> >>>
>> >>> wrote:
>> >>>> - Used readable names for read/write command macros
>> >>>> - Added comments for the same
>> >>>>
>> >>>> Signed-off-by: Jagannadha Sutradharudu Teki <jaganna at xilinx.com>
>> >>>> Cc: Marek Vasut <marex at denx.de>
>> >>>> Cc: Simon Glass <sjg at chromium.org>
>> >>>
>> >>> Does this patch have any impact other than making the code harder to
>> >>> understand
>> >>> ? :-(
>> >>>
>> >>> What's the rationale for making the code more cryptic ?
>> >>
>> >> No issues I guess with the readability as each macro we can easily
>> >> understand.
>> >> like CMD_RD_QUAD --> command_read_quad
>> >>
>> >> CMD_WR_PAGE --> command_write_page_program
>> >>
>> >> And this will minimize the macro length - good for in coding and more
>> >> over description is added in drivers/mtd/spi/sf_internal.h anyway.
>> >
>> > Again I agree with Marek that readability of code is more important than
>> > saving a few characters while coding. This is especially true as
>> > editors can support you in coding (Emacs has lots of packages to help
>> > here for example).
>>
>> I don't think nothing much gone the readability with these updated:
>> CMD_READ_ARRAY_FAST has updated CMD_RD_FAST and it seems like
>> easy to understand. and anyway I have added comments for full name as well.
>
> CMD_READ_ARRAY_FAST contains all the necessary bits for me to understand what
> the macro means. CMD_RD_FAST does not. I fail to see the rationale behind
> changing the names.
>
>> Few of the flashes can be call this as array fast read and fewer call
>> this as fast read
>> and few more call this as high frequency read. CMD_RD_FAST will suits
>> all these names.
>>
>> Comments please!
>
> If you want to align the names with anything, align then with linux's m25p80.c
> driver . But I see this change as moot and confusing, sorry.
No issues, we can skip these as of now for this release.!
--
Thanks,
Jagan.
More information about the U-Boot
mailing list