Messages in this thread | | | Subject | Re: [PATCH] ata: Use of_property_read_reg() to parse "reg" | From | Sergey Shtylyov <> | Date | Sat, 10 Jun 2023 23:39:46 +0300 |
| |
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@kernel.org> [...]
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.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
| |