lkml.org 
[lkml]   [2023]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next v3 09/18] net/smc: introduce SMC-D loopback device
From


On 2023/9/22 07:32, Wenjia Zhang wrote:
>
>

<..>

>> +
>> +#ifndef _SMC_LOOPBACK_H
>> +#define _SMC_LOOPBACK_H
>> +
>> +#include <linux/device.h>
>> +#include <linux/err.h>
>> +#include <net/smc.h>
>> +
>> +#define SMC_LODEV_MAX_DMBS 5000
>> +
>> +struct smc_lo_dev {
>> +    struct smcd_dev *smcd;
>> +    struct device dev;
>> +};
>> +
> I'm just wondering why don't use pointer for dev?
>

The 'struct device' is a generic structure embeded, used to associate a Linux device
with a specific device. So I think variable for dev here is OK. See also struct ism_dev.

Thanks.

>> +int smc_loopback_init(void);
>> +void smc_loopback_exit(void);
>> +
>> +#endif /* _SMC_LOOPBACK_H */

\
 
 \ /
  Last update: 2023-09-22 16:29    [W:0.047 / U:1.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site