# Re: \[RFC net-next 11/17\] net/dibs: Move struct device to dibs\_dev

- From: Alexandra Winter \<wintera@linux.ibm.com\>
- Date: 2025-09-01 12:46:17 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/09/11336017
- Thread: https://ratatoskr.run/netdev/2025/08/11334011/t.md

```text


On 15.08.25 17:18, Dust Li wrote:
> On 2025-08-15 13:59:49, Alexandra Winter wrote:
>>
>> On 15.08.25 03:56, Dust Li wrote:
>>> On 2025-08-14 10:51:27, Alexandra Winter wrote:
>>>> On 06.08.25 17:41, Alexandra Winter wrote:
>>>> [...]
>>>>> Replace smcd->ops->get_dev(smcd) by dibs_get_dev().
>>>>>
>>>> Looking at the resulting code, I don't really like this concept of a *_get_dev() function,
>>>> that does not call get_device().
>>>> I plan to replace that by using dibs->dev directly in the next version.
>>> May I ask why? Because of the function name ? If so, maybe we can change the name.
>> Yes the name. Especially, as it is often used as argument for get_device() or put_device().
>> Eventually I would like to provide dibs_get_dev()/dibs_put_dev() that actually
>> do refcounting.
>> And then I thought defining dibs_read_dev() is not helping readability.
> I see. I don't like dibs_get_dev() either.
> What about dibs_device_to_dev() or dibs_to_dev() ?
> 
> If we can't agree on a name we’re all happy with, I agree we can
> leave it as is for now.
> 

I'd rather leave it as it is and leave it to future patches to provide
dibs_get_dev()/dibs_put_dev() and maybe also dibs_devname() service functions.
```
