From patchwork Mon Nov 12 12:13:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yixian Liu X-Patchwork-Id: 10678577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C115514BD for ; Mon, 12 Nov 2018 12:13:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0F1229EF7 for ; Mon, 12 Nov 2018 12:13:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A592329EFD; Mon, 12 Nov 2018 12:13:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BD4C29EF7 for ; Mon, 12 Nov 2018 12:13:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729266AbeKLWGD (ORCPT ); Mon, 12 Nov 2018 17:06:03 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:35114 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729244AbeKLWGD (ORCPT ); Mon, 12 Nov 2018 17:06:03 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D5F6630C795AC; Mon, 12 Nov 2018 20:13:00 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.408.0; Mon, 12 Nov 2018 20:12:53 +0800 From: Yixian Liu To: , CC: , , Subject: [PATCH rdma-rc 3/3] RDMA/hns: Fix the warnings from fortify Date: Mon, 12 Nov 2018 20:13:04 +0800 Message-ID: <1542024784-62272-4-git-send-email-liuyixian@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542024784-62272-1-git-send-email-liuyixian@huawei.com> References: <1542024784-62272-1-git-send-email-liuyixian@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixed the warnings reported by fortify. Signed-off-by: Yixian Liu --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index d02fe04..e465556 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -4549,7 +4549,7 @@ static irqreturn_t hns_roce_v2_msix_interrupt_eq(int irq, void *eq_ptr) /* Asychronous event interrupt */ int_work = hns_roce_v2_aeq_int(hr_dev, eq); - return IRQ_RETVAL(int_work); + return (unsigned int)IRQ_RETVAL(int_work); } static irqreturn_t hns_roce_v2_msix_interrupt_abn(int irq, void *dev_id) @@ -4608,7 +4608,7 @@ static irqreturn_t hns_roce_v2_msix_interrupt_abn(int irq, void *dev_id) } else dev_err(dev, "There is no abnormal irq found!\n"); - return IRQ_RETVAL(int_work); + return (unsigned int)IRQ_RETVAL(int_work); } static void hns_roce_v2_int_mask_enable(struct hns_roce_dev *hr_dev,