Messages in this thread | | | Date | Fri, 22 Sep 2023 15:55:14 +0800 | Subject | Re: [PATCH net-next v3 09/18] net/smc: introduce SMC-D loopback device | From | Wen Gu <> |
| |
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 */
| |