Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1432964ybz; Sat, 25 Apr 2020 19:17:20 -0700 (PDT) X-Google-Smtp-Source: APiQypJQ4U7UkUu6ey51wEcWTKUZjkD4I4nsDHyMBWaSaTjDnXHuulRnTeIrXZoumI8IgDbRL4sD X-Received: by 2002:a17:906:a39a:: with SMTP id k26mr13250273ejz.172.1587867440762; Sat, 25 Apr 2020 19:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587867440; cv=none; d=google.com; s=arc-20160816; b=sr0FCZXunMDh+BrDIx3wB4B8O27+VZsbHIwcs6r8f8RmrCpYcGhEpPCstPYJ71NN5P aJLXDyKzLOFO0IIZ/DpFBWKVcgCUQRmfwo4vF8sEJ61GCqIydfAw3R4MIbytHhddIdvj 7KZfvUawdjWutEpd0aBe8tahvPiZBzVgj4BVyqEeaSaVpsLkCIicDljO9NkA4JoLnjP0 PlW/YygBVcNBl8z+Lop/H9bCUHzyqx3avdmqrS6rTfY+QqdUsFursfK7MsoPrBD7Wfzq /JmOur5wM1DUOj8hmcYdAoNcAAXxa3dfWwdjt9/UtdfF0KNatc+0QYbvFAligqaHVSSt J7bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=x3ESKGkwQhF8yjuSk9HWiZJt7P/XIoH2xqpcz5qHj/o=; b=ZTFbVyt/8AlFL5zteCQeeZWTsVaLX3yqW8guaWi6q1xQXicp1n+DleaH//HBAGD13n 3/QCenQdXPY3ubJ3RXgmOLSjZFds7Tk+Y3QiS9H1JQl2xhxZCGDeHnmqIkXlhsJNR1e8 8O2cUX34pcFkohIvSSSwO2Skf3RcmElUc1sncbv6pV3jth5sD7slpVOt1yXME0/NhNfN sP6ov9OADoXdJb2yXEc02H5K+JnJ9qNUWpMxNGcvWtaMLwEGXQukxSJlWY+xkYoGdlx2 Kre2H5DYFZ/2M7O64nwh5x7Qd1ar7sp0+tkNP2WWtdV9qZtfzyd/ArH2Dp0o5SKs8DtL iUMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si5973352edq.510.2020.04.25.19.16.57; Sat, 25 Apr 2020 19:17:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgDZCPT (ORCPT + 99 others); Sat, 25 Apr 2020 22:15:19 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:50422 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726230AbgDZCPO (ORCPT ); Sat, 25 Apr 2020 22:15:14 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 4E55B79F431BDBD024F4; Sun, 26 Apr 2020 10:15:12 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Sun, 26 Apr 2020 10:15:02 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan Subject: [PATCH V2 net-next 9/9] net: hns3: remove an unnecessary check in hclge_set_umv_space() Date: Sun, 26 Apr 2020 10:13:48 +0800 Message-ID: <1587867228-9955-10-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1587867228-9955-1-git-send-email-tanhuazhong@huawei.com> References: <1587867228-9955-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since hclge_set_umv_space() is only called by hclge_init_umv_space(), parameter 'allocated_size' will not be NULL. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index c74990a..e2fec83 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -7227,8 +7227,7 @@ static int hclge_set_umv_space(struct hclge_dev *hdev, u16 space_size, return ret; } - if (allocated_size) - *allocated_size = le32_to_cpu(desc.data[1]); + *allocated_size = le32_to_cpu(desc.data[1]); return 0; } -- 2.7.4