[PATCH 2/3] net/hns3: fix unrelease VLAN resource when init fail
huangdengdui
huangdengdui at huawei.com
Thu Aug 21 14:16:25 CEST 2025
On 2025/8/13 22:51, Stephen Hemminger wrote:
> On Wed, 13 Aug 2025 15:33:16 +0800
> Dengdui Huang <huangdengdui at huawei.com> wrote:
>
>> +static void
>> +hns3_uninit_hardware(struct hns3_hw *hw)
>> +{
>> + struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
>> +
>> + (void)hns3_uninit_umv_space(hw);
>
> Overall, the patch looks good. But why the (void) cast here.
> The compiler allows ignoring return value unless the must check attribute is set.
Our internal coding standards require that when we do not check the return value of a function,
we use `(void)` to indicate that we have thoroughly considered that it is unnecessary to handle the return value here.
More information about the dev
mailing list