From patchwork Tue Nov 29 23:10:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 84919 Delivered-To: patch@linaro.org Received: by 10.140.21.20 with SMTP id 20csp10098qgk; Tue, 29 Nov 2016 15:12:02 -0800 (PST) X-Received: by 10.84.162.204 with SMTP id o12mr67536748plg.17.1480461122403; Tue, 29 Nov 2016 15:12:02 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17si36638704pge.203.2016.11.29.15.12.02; Tue, 29 Nov 2016 15:12:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756906AbcK2XLv (ORCPT + 25 others); Tue, 29 Nov 2016 18:11:51 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:36913 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755926AbcK2XLc (ORCPT ); Tue, 29 Nov 2016 18:11:32 -0500 Received: from 172.24.1.137 (EHLO szxeml427-hub.china.huawei.com) ([172.24.1.137]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DRL91333; Wed, 30 Nov 2016 07:11:30 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.47.84.28) by szxeml427-hub.china.huawei.com (10.82.67.182) with Microsoft SMTP Server id 14.3.235.1; Wed, 30 Nov 2016 07:11:19 +0800 From: Salil Mehta To: CC: , , , , , , , , , Subject: [PATCH for-next 4/6] IB/hns: Delete the redundant memset operation Date: Tue, 29 Nov 2016 23:10:28 +0000 Message-ID: <20161129231030.1105600-5-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20161129231030.1105600-1-salil.mehta@huawei.com> References: <20161129231030.1105600-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.47.84.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Wei Hu (Xavier)" It deleted the redundant memset operation because the memory allocated by ib_alloc_device has been set zero. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Salil Mehta --- drivers/infiniband/hw/hns/hns_roce_main.c | 3 --- 1 file changed, 3 deletions(-) -- 1.7.9.5 diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index 5e620f9..28a8f24 100644 --- a/drivers/infiniband/hw/hns/hns_roce_main.c +++ b/drivers/infiniband/hw/hns/hns_roce_main.c @@ -843,9 +843,6 @@ static int hns_roce_probe(struct platform_device *pdev) if (!hr_dev) return -ENOMEM; - memset((u8 *)hr_dev + sizeof(struct ib_device), 0, - sizeof(struct hns_roce_dev) - sizeof(struct ib_device)); - hr_dev->pdev = pdev; platform_set_drvdata(pdev, hr_dev);