kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: "Valentin Vidić" <vvidic@valentin-vidic.from.hr>
To: kernelnewbies@kernelnewbies.org
Subject: Re: how to check regmap start address
Date: Thu, 2 Apr 2020 13:58:45 +0200	[thread overview]
Message-ID: <20200402115845.GK5449@valentin-vidic.from.hr> (raw)
In-Reply-To: <CAA4NGytueUo40VpFdudfpvtrbDkS_rOa2t22Yv003A+tmnFQXg@mail.gmail.com>

On Thu, Apr 02, 2020 at 01:48:23PM +0200, Tomek The Messenger wrote:
> Hi
> Let's see how it looks:
> https://github.com/u-boot/u-boot/blob/master/include/regmap.h
> 
> I first time ever see such thing like this:
> struct regmap_range {
> ulong start;
> ulong size;
> };
> struct regmap {
> enum regmap_endianness_t endianness;
> int range_count;
> struct regmap_range ranges[0];
> };
> 
> How I can get access to variable ranges it if is 0 size? Who develops this
> one and who reviewed:)
> Anyway If I have pointer to regmap can I check what is start variable in
> some other way?

Perhaps range_count gives the number of elements in the array, so you
can just access r->ranges[i].start?

-- 
Valentin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2020-04-02 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 11:48 how to check regmap start address Tomek The Messenger
2020-04-02 11:58 ` Valentin Vidić [this message]
2020-04-02 12:14 ` Greg KH
2020-04-03 12:39   ` Tomek The Messenger
2020-04-04  9:00     ` Tomek The Messenger

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=20200402115845.GK5449@valentin-vidic.from.hr \
    --to=vvidic@valentin-vidic.from.hr \
    --cc=kernelnewbies@kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).