[PATCH v4 04/15] net/xsc: add xsc dev ops to support VFIO driver
WanRenyong
wanry at yunsilicon.com
Mon Jan 6 03:01:28 CET 2025
On 2025/1/4 3:04, Stephen Hemminger wrote:
> On Fri, 03 Jan 2025 23:04:13 +0800
> "WanRenyong" <wanry at yunsilicon.com> wrote:
>
>> +static int
>> +xsc_vfio_set_mtu(struct xsc_dev *xdev, uint16_t mtu)
>> +{
>> + struct xsc_cmd_set_mtu_mbox_in in;
>> + struct xsc_cmd_set_mtu_mbox_out out;
>> + int ret;
>> +
>> + memset(&in, 0, sizeof(in));
>> + memset(&out, 0, sizeof(out));
> Optionally, you can initalize on stack variables with:
> struct xsc_cmd_set_mtu_mbox_in in = { };
>
> Either way is ok, it is up to you.
Got it.
--
Thanks,
WanRenyong
More information about the dev
mailing list