From patchwork Tue Nov 28 19:34:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10080963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C28E602DC for ; Tue, 28 Nov 2017 19:35:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 102D0280B0 for ; Tue, 28 Nov 2017 19:35:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0519C29626; Tue, 28 Nov 2017 19:35:49 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 92735280B0 for ; Tue, 28 Nov 2017 19:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932177AbdK1Tfk (ORCPT ); Tue, 28 Nov 2017 14:35:40 -0500 Received: from mail-by2nam03on0067.outbound.protection.outlook.com ([104.47.42.67]:21248 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932142AbdK1Tf0 (ORCPT ); Tue, 28 Nov 2017 14:35:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/Zxu21iijn35NMcZ3DH+vwNR257fJ2aOKCE9ynz1dps=; b=KeiQiJ1Gov35hehCHj/8nZh9OrA0zfMgjD3YqSMcB8IV2DCJbbwHyI4bAv3sNEQPvJnKA+5pQyrGrPNqzBLA8vWXIIPLnT3g4hAeVTK9UURQr0RNRVvAuRZvFefaj0X4QiSh/CEHhubMhvh5rkInTucZ1pcynjXcickV2FucP1w= Received: from CO2PR07CA0043.namprd07.prod.outlook.com (10.174.192.11) by BY2PR0701MB1942.namprd07.prod.outlook.com (10.163.155.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Tue, 28 Nov 2017 19:35:25 +0000 Received: from BY2FFO11FD017.protection.gbl (2a01:111:f400:7c0c::194) by CO2PR07CA0043.outlook.office365.com (2603:10b6:100::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.282.5 via Frontend Transport; Tue, 28 Nov 2017 19:35:25 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BY2FFO11FD017.mail.protection.outlook.com (10.1.14.105) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.218.12 via Frontend Transport; Tue, 28 Nov 2017 19:35:24 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Tue, 28 Nov 2017 11:35:06 -0800 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id vASJZ6Rj013790; Tue, 28 Nov 2017 11:35:06 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vASJZ6QH013789; Tue, 28 Nov 2017 11:35:06 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 15/22] qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport Date: Tue, 28 Nov 2017 11:34:56 -0800 Message-ID: <20171128193503.13695-16-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171128193503.13695-1-himanshu.madhani@cavium.com> References: <20171128193503.13695-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(2980300002)(428002)(199003)(189002)(47776003)(2950100002)(8936002)(69596002)(72206003)(50466002)(50226002)(80596001)(478600001)(87636003)(305945005)(316002)(110136005)(42186006)(86362001)(16586007)(36756003)(51416003)(54906003)(76176999)(50986999)(4326008)(2906002)(48376002)(101416001)(106466001)(189998001)(105586002)(81156014)(8676002)(81166006)(33646002)(1076002)(15760500003)(6666003)(5660300001)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0701MB1942; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD017; 1:qNXN2gAZV114yPWJrWJC5+gsUVhIWuiKpY70uoJB/Zz6QgsOg7WJ7kEMLwdKHxInB4iiYh/xUZ8EfKubxLE2Y17aDbbx8/YCenezacPNzNmk0w9MHojBs2zET0Lvm+Pn X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 49bf6d3e-8c9b-4e08-7fde-08d536972c33 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603199); SRVR:BY2PR0701MB1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1DGz/9Ys=; 20:nMjFGudto7WJw88WwHfHj3C5WBezz7VzUHHgAv7V9+V1/IexX/+5UCmuBJwIM4X6BDjvSeVZA+9xThTe63Tkrpp9AXAu1/E/vaQmv9cxq2pS7FMpDmjZ6kbVYG8GXQTz8hIt18CdT+gdds0oNmtlgtlnD5XTYc0/EH33JQIHZKKToa3a7s3V4pbW8cfMvINaGvE073BX9Au4gkcSMOZpmhtlPdnEdrMjvOHpVPgkKH5Ecw9rVY7Hc4AHZINcP2S3lMxow9TGm0bWlWO7oBuwYh5YVJPLPw7yEbnyfOY5iaGJ5+QbelptDVMgxQxfABcLzkV1888cagdlO7tCF6aAF5gLqFrx1KWTPV7jWT4s91z4ZhW6bcu2Rh84nUaJUZylanumHOVp+fDpFOPY2WYLngBraQ3SdrLQwt7y91tw7qkIls4SLUaOTaOiIG83u0HZe7L6r48lq8Qv/lb8b2eXqSlhkg5lbEe/MYgtpIs249SuIK8Xhq0cr3XI4QOJ7Pm7 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3231022)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123558100)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011); SRVR:BY2PR0701MB1942; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BY2PR0701MB1942; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB1942; 4:6MdYNMp1QNrYP42vFrBP7JIqdHasA7mdxgeICwKNUGad7m1M7MWHTkCr1QxBLlv41EBv2MZuqpZonhpI2gSUAt8pdDLdnrbEmA4lMdHEC/IXMOZl51mdGO1+KJ9kcXp5heooFub9vh7JWdz9VJfY+CdnjHbe77gWKyMLVNJyIfWMrMksjahSdeHVbVuDnt2LMNMADgJ0T0sbiPsm9uE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cBWMnfaf5LLY0Y7U62EUZB4PXkVTVdYOLSksoeUjkizwuNJ/I2mFOkygFx9Lj5YzvpyHP22Tq8=; 7:7b3wvNS/0qu5M5aFla5XwkexD4CR9177uTFtYu65gx2R8uNA1JkF4AJdhZ44kfpx7aM4zJJeE/c06iKs5qg2+WpIBZtaPfCmhfhMaGVPCee8U7QDVFwntSRdm5SRpSm4AhZE3w2dJnb6S9tbZ9oME3Io4cUM79VBWEU9Ha4+2pBusBKSD5FK2VUY7ZReqICgAaWX2tAsnndIMtyHUddEOri3SVy1N7bKaC+asberfHYQZtdhMPMETLbQ+sHSj1No SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2017 19:35:24.9987 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49bf6d3e-8c9b-4e08-7fde-08d536972c33 X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0701MB1942 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Quinn Tran Current code manually allocate an fcport structure that is not properly initialize. Replace kzalloc with qla2x00_alloc_fcport, so that all fields are initialized. Also set set scan flag to port found Cc: Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index e824cdc77139..2a6242d97a7e 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -5783,7 +5783,7 @@ static fc_port_t *qlt_get_port_database(struct scsi_qla_host *vha, unsigned long flags; u8 newfcport = 0; - fcport = kzalloc(sizeof(*fcport), GFP_KERNEL); + fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); if (!fcport) { ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06f, "qla_target(%d): Allocation of tmp FC port failed",