public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: linux-kernel@vger.kernel.org, Mike Frysinger <vapier.adi@gmail.com>
Subject: Re: debugfs helper for decimal challenged
Date: Wed, 1 Aug 2007 15:25:23 -0700	[thread overview]
Message-ID: <20070801222523.GA26289@suse.de> (raw)
In-Reply-To: <200708011752.58481.rgetz@blackfin.uclinux.org>

On Wed, Aug 01, 2007 at 05:52:58PM -0400, Robin Getz wrote:
> Greg:
> 
> For those of us who forget that when bits 21 and bit 31 in a hardware 
> register exposed with debugfs, I should see 2149580800 when I cat it (vs
> 0x80200000), any objections to providing a hex output interface to the 
> debugfs?
> 
> Since the input side already takes decimal & hex, I don't think this is a big
> change:
> 
> DEFINE_SIMPLE_ATTRIBUTE(fops_x16, debugfs_u16_get, debugfs_u16_set, "0x%04llx\n");
> 
> struct dentry *debugfs_create_x16(const char *name, mode_t mode,
>                                   struct dentry *parent, u16 *value)
> {
>         return debugfs_create_file(name, mode, parent, value, &fops_x16);
> }
> 
> DEFINE_SIMPLE_ATTRIBUTE(fops_x32, debugfs_u32_get, debugfs_u32_set, "0x%08llx\n");
> 
> struct dentry *debugfs_create_x32(const char *name, mode_t mode,
>                                   struct dentry *parent, u32 *value)
> {
>         return debugfs_create_file(name, mode, parent, value, &fops_x32);
> }
> 
> If this is OK - I will send a real patch.

That sounds good to me, feel free to send a real patch.

thanks,

greg k-h

  reply	other threads:[~2007-08-01 22:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01 21:52 debugfs helper for decimal challenged Robin Getz
2007-08-01 22:25 ` Greg KH [this message]
2007-08-02  3:13   ` [PATCH] " Robin Getz
2007-08-02 21:09     ` Greg KH
2007-08-02 22:20       ` Robin Getz
2007-08-02 22:23       ` Robin Getz

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=20070801222523.GA26289@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgetz@blackfin.uclinux.org \
    --cc=vapier.adi@gmail.com \
    /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