mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2 v5] regmap: Support accelerated noinc operations
Date: Wed, 31 Aug 2022 17:29:30 +0300	[thread overview]
Message-ID: <Yw9wSoMUhZVqVhkw@smile.fi.intel.com> (raw)
In-Reply-To: <CACRpkdZEVYDAPbBkATr=6sea8gu6JmuAjU_sDRV=ZgswfhD-Kg@mail.gmail.com>

On Wed, Aug 31, 2022 at 03:53:15PM +0200, Linus Walleij wrote:
> On Tue, Aug 30, 2022 at 6:36 PM Andy Shevchenko
> <andriy.shevchenko@intel.com> wrote:
> > On Tue, Aug 16, 2022 at 10:48:31PM +0200, Linus Walleij wrote:

...

> > > +             dev_info(map->dev, "%x %s [", reg, write ? "<=" : "=>");
> > > +             for (i = 0; i < val_len; i++) {
> > > +                     switch (val_bytes) {
> > > +                     case 1:
> > > +                             pr_cont("%x", u8p[i]);
> > > +                             break;
> > > +                     case 2:
> > > +                             pr_cont("%x", u16p[i]);
> > > +                             break;
> > > +                     case 4:
> > > +                             pr_cont("%x", u32p[i]);
> > > +                             break;
> > > +#ifdef CONFIG_64BIT
> > > +                     case 8:
> > > +                             pr_cont("%llx", u64p[i]);
> > > +                             break;
> > > +#endif
> > > +                     default:
> > > +                             break;
> > > +                     }
> > > +                     if (i == (val_len - 1))
> > > +                             pr_cont("]\n");
> > > +                     else
> > > +                             pr_cont(",");
> > > +             }
> >
> > I'm wondering why we can't use hex_dump_to_buffer() approach? Or even better,
> > introduce eventually dev_hex_dump() (as it's done for seq_file and printk)
> > and use it.
> 
> Hmmmmm this is under regmap_should_log() which turns on
> dev_info() simple prints like x <= y and y => x to the console.
> e.g. dev_info(map->dev, "%x <= %x\n", reg, val);
> It would be rather print_hex_dump() the problem being
> that hex_dump_* accessors assumes line oriented
> linebufs "must be 16 or 32" (values per line), and here we probably
> don't want that:
> we want to show what we shoehorned into the FIFO.

Perhaps we may add a modifier to %ph (like 2,4,8) to group together several
bytes and use it here instead?

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2022-08-31 14:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16 20:48 Linus Walleij
2022-08-16 20:48 ` [PATCH 2/2 v5] regmap: mmio: Support accelerared " Linus Walleij
2022-08-30 16:35   ` Andy Shevchenko
2022-08-31 14:07     ` Linus Walleij
2022-08-17 13:34 ` [PATCH 1/2 v5] regmap: Support accelerated " Mark Brown
2022-08-30 16:28 ` Andy Shevchenko
2022-08-31 13:53   ` Linus Walleij
2022-08-31 14:29     ` Andy Shevchenko [this message]

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=Yw9wSoMUhZVqVhkw@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=broonie@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®