[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <26a907e3-f362-09c8-3cc6-fb68ba87c64c@omp.ru>
Date: Sat, 10 Jun 2023 23:39:46 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Rob Herring <robh@...nel.org>, Damien Le Moal <dlemoal@...nel.org>
CC: <linux-ide@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ata: Use of_property_read_reg() to parse "reg"
Hello!
On 6/9/23 9:31 PM, Rob Herring wrote:
> Use the recently added of_property_read_reg() helper to get the
> untranslated "reg" address value.
>
> Signed-off-by: Rob Herring <robh@...nel.org>
[...]
Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
> diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
> index c47c3fb434d5..b3cc23d891d5 100644
> --- a/drivers/ata/sata_svw.c
[...]
> @@ -319,10 +320,10 @@ static int k2_sata_show_info(struct seq_file *m, struct Scsi_Host *shost)
> /* Match it to a port node */
> index = (ap == ap->host->ports[0]) ? 0 : 1;
> for (np = np->child; np != NULL; np = np->sibling) {
> - const u32 *reg = of_get_property(np, "reg", NULL);
> - if (!reg)
> + u64 reg;
An empty line wouldn't hurt here... :-)
> + if (of_property_read_reg(np, 0, ®, NULL))
> continue;
> - if (index == *reg) {
> + if (index == reg) {
> seq_printf(m, "devspec: %pOF\n", np);
> break;
> }
MBR, Sergey
Powered by blists - more mailing lists