From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Mon, 20 Jan 2014 12:13:21 +0100 Subject: [U-Boot] [PATCH 4/6] sf: Update read/write command macros In-Reply-To: (Jagan Teki's message of "Sun, 19 Jan 2014 02:15:33 +0530") References: <1390075593-11226-1-git-send-email-jaganna@xilinx.com> <201401182136.03124.marex@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jagan, > On Sun, Jan 19, 2014 at 2:06 AM, Marek Vasut 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 >>> Cc: Marek Vasut >>> Cc: Simon Glass >> >> 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). Cheers Detlev -- (7) It is always something (7a) (corollary). Good, Fast, Cheap: Pick any two (you can't have all three). -- The Twelve Networking Truths (RFC 1925) -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de