public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-wireless@vger.kernel.org, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Toke Høiland-Jørgensen" <toke@toke.dk>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"open list:MIPS" <linux-mips@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] wifi: ath9k: ahb: replace id_table with of
Date: Thu, 22 May 2025 08:09:31 +0200	[thread overview]
Message-ID: <7a8b8290-5ee4-447e-83e8-7be2e812a628@kernel.org> (raw)
In-Reply-To: <CAKxU2N9LJcX2AbCipk9nzHQhx=AKT2gUV8-Bk91BLzrUwfkGYw@mail.gmail.com>

On 21/05/2025 22:43, Rosen Penev wrote:
>>> -     if (!dev_get_platdata(&pdev->dev)) {
>>> -             dev_err(&pdev->dev, "no platform data specified\n");
>>> -             return -EINVAL;
>>> -     }
>>> -
>>>       mem = devm_platform_ioremap_resource(pdev, 0);
>>>       if (IS_ERR(mem)) {
>>>               dev_err(&pdev->dev, "ioremap failed\n");
>>> @@ -118,7 +97,9 @@ static int ath_ahb_probe(struct platform_device *pdev)
>>>               goto err_free_hw;
>>>       }
>>>
>>> -     ret = ath9k_init_device(id->driver_data, sc, &ath_ahb_bus_ops);
>>> +     match = of_match_device(ath9k_of_match_table, &pdev->dev);
>>
>> There is a wrapper for getting data, use it.
> I assume you mean of_device_get_match_data. Will do.
>>
>>> +     dev_id = (uintptr_t)match->data;
>>
>> And dev_id is enum? Then you want kernel_ulong_t.
> The entries specified in data are macros in the form of 0xYYYY. This
> is why I used u16. The ath9k_init_device takes an int here.

You did not use u16, but uintptr_t. My comment was about the cast.


Best regards,
Krzysztof

  reply	other threads:[~2025-05-22  6:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21  2:15 [PATCH 0/4] wifi: ath9k: add ahb OF support Rosen Penev
2025-05-21  2:15 ` [PATCH 1/4] wifi: ath9k: ahb: reorder declarations Rosen Penev
2025-05-21  2:15 ` [PATCH 2/4] wifi: ath9k: ahb: reorder includes Rosen Penev
2025-05-21  2:15 ` [PATCH 3/4] wifi: ath9k: ahb: replace id_table with of Rosen Penev
2025-05-21 11:07   ` Krzysztof Kozlowski
2025-05-21 20:43     ` Rosen Penev
2025-05-22  6:09       ` Krzysztof Kozlowski [this message]
2025-05-21  2:15 ` [PATCH 4/4] mips: dts: qca: add wmac support Rosen Penev
2025-05-21 11:09   ` Krzysztof Kozlowski

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=7a8b8290-5ee4-447e-83e8-7be2e812a628@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rosenp@gmail.com \
    --cc=toke@toke.dk \
    --cc=tsbogend@alpha.franken.de \
    /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