All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v2 00/12] display_options: Start to unify print_buffer() and hexdump
Date: Sat,  8 May 2021 06:59:55 -0600	[thread overview]
Message-ID: <20210508130007.1708527-1-sjg@chromium.org> (raw)

At present we have two ways of showing a hex dump. Once has been in U-Boot
since the dawn of time and the other was recently added from Linux.

They both have their own unique features.

This series makes a few changes to bring them closer together. It also
adds support for logging a buffer, which is useful since it can put it
through the same log drivers as other logging output.

Also it adds tests, so we can check the behaviour.

The code-size impact of the main part of this series is 160 bytes on
Thumb2, which seems acceptable. However the final patch adds another 600
bytes or so, which is not.

Changes in v2:
- Drop unwanted #if at top of file
- Fix sandbox build error

Simon Glass (12):
  console: Report an error when output buffer is exhausted
  test: Detect when expect_str is too small
  test: Convert print tests to use ut framework
  test: Add a test for print_buffer()
  display_options: Drop two spaces before the ASCII column
  hexdump: Move API to header file
  hexdump: Add support for sandbox
  hexdump: Support any rowsize
  hexdump: Allow ctrl-c to interrupt output
  display_options: Split print_buffer() into two functions
  log: Add support for logging a buffer
  RFC: display_options: Use print_hex_dump() for print_buffer()

 common/console.c                  |  18 +-
 common/log.c                      |  30 ++++
 include/asm-generic/global_data.h |  16 +-
 include/console.h                 |   3 +-
 include/display_options.h         |  25 +++
 include/hexdump.h                 |  81 ++++++++-
 include/log.h                     |  35 ++++
 include/test/suites.h             |   1 +
 include/test/test.h               |   4 +-
 lib/display_options.c             | 124 ++++++++-----
 lib/hexdump.c                     | 104 +++--------
 test/cmd/mem_search.c             |  26 +--
 test/cmd_ut.c                     |   2 +
 test/dm/rtc.c                     |   9 +-
 test/log/log_test.c               |  27 +++
 test/print_ut.c                   | 284 ++++++++++++++++++++++++------
 test/ut.c                         |  55 +++++-
 17 files changed, 629 insertions(+), 215 deletions(-)

-- 
2.31.1.607.g51e8a6a459-goog

             reply	other threads:[~2021-05-08 12:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08 12:59 Simon Glass [this message]
2021-05-08 12:59 ` [PATCH v2 01/12] console: Report an error when output buffer is exhausted Simon Glass
2021-05-08 12:59 ` [PATCH v2 02/12] test: Detect when expect_str is too small Simon Glass
2021-05-08 12:59 ` [PATCH v2 03/12] test: Convert print tests to use ut framework Simon Glass
2021-05-08 12:59 ` [PATCH v2 04/12] test: Add a test for print_buffer() Simon Glass
2021-05-08 13:00 ` [PATCH v2 05/12] display_options: Drop two spaces before the ASCII column Simon Glass
2021-05-08 13:00 ` [PATCH v2 06/12] hexdump: Move API to header file Simon Glass
2021-05-08 13:00 ` [PATCH v2 07/12] hexdump: Add support for sandbox Simon Glass
2021-05-08 13:00 ` [PATCH v2 08/12] hexdump: Support any rowsize Simon Glass
2021-05-08 13:00 ` [PATCH v2 09/12] hexdump: Allow ctrl-c to interrupt output Simon Glass
2021-05-08 13:00 ` [PATCH v2 10/12] display_options: Split print_buffer() into two functions Simon Glass
2021-05-08 13:00 ` [PATCH v2 11/12] log: Add support for logging a buffer Simon Glass
2021-05-08 13:00 ` [PATCH v2 12/12] RFC: display_options: Use print_hex_dump() for print_buffer() Simon Glass
2021-06-08 21:43 ` [PATCH v2 00/12] display_options: Start to unify print_buffer() and hexdump Tom Rini

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=20210508130007.1708527-1-sjg@chromium.org \
    --to=sjg@chromium.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.