Re: [PATCH net-next v2 5/5] hinic: add support to get eeprom information

From: luobin (L)
Date: Fri Jun 26 2020 - 22:11:47 EST


On 2020/6/24 6:02, Jakub Kicinski wrote:
> On Tue, 23 Jun 2020 22:24:09 +0800 Luo bin wrote:
>> +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.
>
Will fix. Thank you for your review.
>> + return 0;
>
> double space
Will fix. Thank you for your review.