[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7a8b8290-5ee4-447e-83e8-7be2e812a628@kernel.org>
Date: Thu, 22 May 2025 08:09:31 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Rosen Penev <rosenp@...il.com>
Cc: linux-wireless@...r.kernel.org, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Toke Høiland-Jørgensen <toke@...e.dk>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, "open list:MIPS" <linux-mips@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] wifi: ath9k: ahb: replace id_table with of
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
Powered by blists - more mailing lists