On Tue, 23 Jun 2020 22:24:09 +0800 Luo bin wrote:
> +int hinic_get_sfp_eeprom(struct hinic_hwdev *hwdev, u8 *data, u16 *len)
> +{
> +     struct hinic_cmd_get_std_sfp_info sfp_info = {0};
> +     u16 out_size = sizeof(sfp_info);
> +     u8 port_id;
> +     int err;
> +
> +     if (!hwdev || !data || !len)
> +             return -EINVAL;

> +int hinic_get_sfp_type(struct hinic_hwdev *hwdev, u8 *data0, u8 *data1)
> +{
> +     u8 sfp_data[STD_SFP_INFO_MAX_SIZE];
> +     u16 len;
> +     int err;
> +
> +     if (!hwdev || !data0 || !data1)
> +             return -EINVAL;

No need to check these, callers are correct. We don't do defensive
programming in the kernel.

> +     return  0;

double space

Reply via email to