All of lore.kernel.org
 help / color / mirror / Atom feed
From: mark gross <mgross@linux.intel.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: 640E9920 <640e9920@gmail.com>,
	linux-pm@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [linux-pm] [RFC] PM_QOS api update to use handles 1/5
Date: Thu, 7 Jan 2010 12:55:58 -0800	[thread overview]
Message-ID: <20100107205558.GB5703@linux.intel.com> (raw)
In-Reply-To: <20100106191831.GA3045@elf.ucw.cz>

On Wed, Jan 06, 2010 at 08:18:31PM +0100, Pavel Machek wrote:
> Hi!
> 
> > > Umm.. passing binary numbers like that... is not exactly good
> > > interface. Think endianness issues  when writing to it from high-level
> > > language.
> > 
> > yeah.  At the moment I can't recall why I went binary for the ABI, 
> > we can revisit this, but its been in the wild for a few years now :(
> > 
> > I guess I can do some tricks to see if its a hex string representation
> > of a number and parse that as well as supporting the s32.  i.e. accept
> > strings "0x0000000" ... "0xFFFFFFFF" and return -EINVAL for anything
> > else.
> 
> Maybe you could use length for detection? If they are writing 4 bytes,
> it is s32, 10 bytes means ascii?

That is what I was thinking + making sure the chars in the string where
valid hex digits ;)  It would be easy to do.  Let me know if you think I
should attempt to roll that into the kernel ABI exposed by this thing.

--mgross



  reply	other threads:[~2010-01-07 20:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30  1:09 [RFC] PM_QOS api update to use handles 1/5 640E9920
2010-01-04  8:31 ` Pavel Machek
2010-01-04  8:31 ` [linux-pm] " Pavel Machek
2010-01-06 19:11   ` mark gross
2010-01-06 19:11   ` [linux-pm] " mark gross
2010-01-06 19:18     ` Pavel Machek
2010-01-06 19:18     ` [linux-pm] " Pavel Machek
2010-01-07 20:55       ` mark gross [this message]
2010-01-07 20:58         ` Pavel Machek
2010-01-07 20:58         ` Pavel Machek
2010-01-07 20:55       ` mark gross

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=20100107205558.GB5703@linux.intel.com \
    --to=mgross@linux.intel.com \
    --cc=640e9920@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    /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.