Re: [PATCH] ata: Use of_property_read_reg() to parse "reg"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
[...]


Reviewed-by: Sergey Shtylyov <s.shtylyov@xxxxxx>

> 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, &reg, NULL))
>  			continue;
> -		if (index == *reg) {
> +		if (index == reg) {
>  			seq_printf(m, "devspec: %pOF\n", np);
>  			break;
>  		}

MBR, Sergey



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux