public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/6] sf: Update read/write command macros
Date: Mon, 20 Jan 2014 14:06:09 +0100	[thread overview]
Message-ID: <201401201406.09714.marex@denx.de> (raw)
In-Reply-To: <CAD6G_RRVhXoMdezeGu9vocqfiNXwJFNsUfk3Z3DH1E5YEuvoRg@mail.gmail.com>

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@denx.de> wrote:
> > Hi Jagan,
> > 
> >> On Sun, Jan 19, 2014 at 2:06 AM, Marek Vasut <marex@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@xilinx.com>
> >>>> Cc: Marek Vasut <marex@denx.de>
> >>>> Cc: Simon Glass <sjg@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.

Best regards,
Marek Vasut

  reply	other threads:[~2014-01-20 13:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1390075593-11226-1-git-send-email-jaganna@xilinx.com>
2014-01-18 20:06 ` [U-Boot] [PATCH 1/6] sf: ops: Squash the malloc+memset combo Jagannadha Sutradharudu Teki
2014-01-18 20:34   ` Marek Vasut
2014-01-18 20:06 ` [U-Boot] [PATCH 2/6] sf: Optimize flash features code Jagannadha Sutradharudu Teki
2014-01-18 20:39   ` Marek Vasut
2014-01-18 20:51     ` Jagan Teki
2014-01-20 13:19       ` Marek Vasut
2014-01-20 13:32         ` Jagan Teki
2014-01-20 23:01           ` Marek Vasut
2014-01-21  7:39             ` Jagan Teki
2014-01-21  7:45               ` Jagan Teki
2014-01-21 17:48                 ` Marek Vasut
2014-01-18 20:06 ` [U-Boot] [PATCH 3/6] sf: Renames on dual_flash stuff Jagannadha Sutradharudu Teki
2014-01-18 20:37   ` Marek Vasut
2014-01-18 20:49     ` Jagan Teki
2014-01-20 13:16       ` Marek Vasut
2014-01-20 13:35         ` Jagan Teki
2014-01-18 20:06 ` [U-Boot] [PATCH 4/6] sf: Update read/write command macros Jagannadha Sutradharudu Teki
2014-01-18 20:36   ` Marek Vasut
2014-01-18 20:45     ` Jagan Teki
2014-01-20 11:13       ` Detlev Zundel
2014-01-20 11:46         ` Jagan Teki
2014-01-20 13:06           ` Marek Vasut [this message]
2014-01-20 13:10             ` Jagan Teki
2014-01-20 13:13               ` Jagan Teki
2014-01-20 14:33           ` Detlev Zundel
2014-01-18 20:06 ` [U-Boot] [PATCH 5/6] sf: Minor macro cleanups Jagannadha Sutradharudu Teki
2014-01-18 20:06 ` [U-Boot] [PATCH 6/6] sf: Update bank configuration Jagannadha Sutradharudu Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201401201406.09714.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox