From patchwork Thu Nov 30 03:40:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10084199 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 A7A38602B9 for ; Thu, 30 Nov 2017 03:41:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E3B129935 for ; Thu, 30 Nov 2017 03:41:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92F4C29B02; Thu, 30 Nov 2017 03:41:27 +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 254BC29935 for ; Thu, 30 Nov 2017 03:41:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753357AbdK3DlZ (ORCPT ); Wed, 29 Nov 2017 22:41:25 -0500 Received: from mail-by2nam01on0060.outbound.protection.outlook.com ([104.47.34.60]:22967 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753388AbdK3DlQ (ORCPT ); Wed, 29 Nov 2017 22:41:16 -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=SW0DTsHlkmf+LedtuNsH0jQmpgtlYKMmeY0IO4ZsuOm2lQTkDQuQSq+MGdqIMZGsOeKXmm8aicHa5hfKQIsR9yOTnq7khJ4yZr9rQBki2RXTOAAb2etlCehsCZ3lSuEDL83v/gQv4iKhc9uzMICDuBez71JNyow+uKoGz5yql8o= Received: from BY2PR07CA0095.namprd07.prod.outlook.com (2a01:111:e400:7bff::48) by DM5PR0701MB3814.namprd07.prod.outlook.com (2603:10b6:4:7f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Thu, 30 Nov 2017 03:41:14 +0000 Received: from BL2FFO11FD049.protection.gbl (2a01:111:f400:7c09::147) by BY2PR07CA0095.outlook.office365.com (2a01:111:e400:7bff::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.282.5 via Frontend Transport; Thu, 30 Nov 2017 03:41:14 +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 BL2FFO11FD049.mail.protection.outlook.com (10.173.161.211) 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; Thu, 30 Nov 2017 03:41:13 +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; Wed, 29 Nov 2017 19:40:50 -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 vAU3eomp015166; Wed, 29 Nov 2017 19:40:50 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vAU3eoTc015165; Wed, 29 Nov 2017 19:40:50 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 15/22] qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport Date: Wed, 29 Nov 2017 19:40:40 -0800 Message-ID: <20171130034047.15070-16-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171130034047.15070-1-himanshu.madhani@cavium.com> References: <20171130034047.15070-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)(376002)(346002)(2980300002)(428002)(189002)(199003)(87636003)(4326008)(189998001)(50466002)(48376002)(2906002)(47776003)(36756003)(50986010)(76176010)(5660300001)(2950100002)(101416001)(6666003)(51416003)(54906003)(15760500003)(16586007)(42186006)(1076002)(316002)(8936002)(81166006)(81156014)(8676002)(478600001)(110136005)(105586002)(305945005)(33646002)(356003)(50226002)(72206003)(80596001)(69596002)(106466001)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR0701MB3814; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD049; 1:2EXrLZdnL4C1qAVKpiJDctCPHsGAgV3Em0ELm2hdm3i+uh580WYrrLYdzCkqUryomGDdirq95uzxzDklkOaq1tWInMEr4tKpfZer/3AyuE0xFd2olkt7wc6c9ydWsND2 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5eb77997-4136-435b-c96d-08d537a4348a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603280); SRVR:DM5PR0701MB3814; X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3814; 3:2zFO/vKhiZmtY4O9MlMiCC854+y3akeWJXupYa6oKtzfsm3POx2eF9w37jtonFo2QwZLg8Idnz3ajxah6RW5PCnuFe5n5AvUl4vAKc0BUDfqohIw8iMUh2rYoRDkmJGAv6fDZ/bGmNjdN+leDoXOx8qQl/zpwm2WUCvnC4UX4iNvocTebb2wNAjvCXsL+Of4ybxBSAqDjDTwQMRzsV78/bvSwqckX1eaKJFMjfrXKKYNU0G/2rOsWXDbhJcMAc2RW82hB+jrtJfoLagV5cO5bNiHyBCX4laqGudjdCiWNCOmdk0i74gVi6MxHHgugZ5FnFIFJIQY2dA0o07KjRsTE07gCEgn8RGVP7yw+3dYNRw=; 25:7tbTNs3n5W2pUrOGOV+atq3ez2hzl0HxeCfYUXvMihWINgNCILPLScleBPpN8/HWATE+UM4Ha/LL/WkceRg9A/vVZApSnXWSfYETwnPnWa6WkJah+4RTSkgoclzsZrdxn1ZnggaSF6PYa0+VWQ8/U3tFxPnFcgU5r23tvx4tOBMDzFR+FneCi0NTuS15uIP2BMVhaaeKtSFqYD72Xirywu5yFAGi2kJD31YJbfLMwldArFHRpX5LPZ600vWHo5oHvyhQJtcbjbZeZFsyCIv/QCx+d7owr9BmeISSVCOOxXmuGd4y0NFLTQkpiG2Hhe8dNkg2DUGSKmk7M5uH5ODU7g== X-MS-TrafficTypeDiagnostic: DM5PR0701MB3814: X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3814; 31:rz0Q+/Tcus30MIHnT2aqPyWKf6Bt8mzzDoFtVxphRSzmnMMCNL2TXbkkFQEbN0f2XZlXCcTDA2bpS2MpSePZSe18r1V0MlT6FOaPAfBvluGdoSJw1C0ixbUzVST55JRop9n8WhJFMqjijMbTmrBsehRwKlYMgEZoeAvqi1Hee6lChlXdpeHNWSlmBZJFYYdxlctYUhRrIXaoJntmcC8uzFctp5XefgT1zmVc9VR56AM=; 20:FNRF2VeQAaqUqVcFYlrUIeL1M7ilsDirJKQcpEZb3idHAX/ebS+bgZZ1BpHFIJmPLE/C/9APoMWbeAQTqT/7QnMhTPJogo/GS671YSF3/r+Yc75mNi+Z9GcQdKYymxLPz0f7mMtWSLMRv+6GsbJ2J7hJcvc06r7ifBzF6znS8cMKimjeUGZ/64jTzXyMkCiEzAmZ0SyrPkCPlx31ZHwCaCAm+PrejCkuXhrK5EHmx/qy8hFIGkv4j7waFIuL/XtsE6ct/ceGfg7tOCD191mevDJ3FwlcPxWY5PY1D9qn1SrpubTLHbSYfyFJsoJjarJbjDUcPy5w/xCWvA8m6N8oL8uQ9HrAXJTdfmYNKJ/ZD2HjlXi/Jfu+x13xY9erdcBLrnB05lts8c9psmpjV5UFJ4aLcJaArQ9dDQR5n1JQf2XR5mEemtafqCOgMIqjGFfHFcZvwO2aHFuLyuDYR0U8uKlVxlTydZ27yxOx8Y+mEMp+WBr8YTyRjClMqqh+5AVW 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)(8121501046)(5005006)(10201501046)(3002001)(3231022)(93006095)(93001095)(6041248)(20161123555025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(6072148)(201708071742011); SRVR:DM5PR0701MB3814; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR0701MB3814; X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3814; 4:f+aB2RNOGgkm4GnxR969hR3l7EYsZlA5FIvUNzJMmIMZpvWPU2m754JrAcVZo9Yi4kuKLz9LdE8usL/zsEFIsFSev2GwbnDdyXqmsIWSmEtGrrc33ouKPHUl09Sy4bK8E81GWm4QsxQ9cj610y5StSkKIod+ObuYRz+cAxoWvJOt7G2s8bO39XLhp1TPnJCeSHbxHD9ugosjXdHwlam0Yk7wNnAuWy0wPMfI0RnVU5eWCxgbd+53A84Um8/L8mr/mak2Jz6acWMhLJeS96zg2WykIufnvOjp6aMVsi1HITCz4u7cQOwXU6dJdQWwLXxhb8UkdNkRt61xMkKtxX88rg== X-Forefront-PRVS: 05079D8470 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR0701MB3814; 23:K7WRRZgZjDGsEA5ETb0nxtbpdXOnSue+CgWbMkt?= =?us-ascii?Q?8GU2u7qFkGUj6WPWDV+suhlEBX3b0ZcJu6ErTMR/CKH/OsNJ5plz8WY2+TYM?= =?us-ascii?Q?viJoB4QE1xZAriDknJYKRzCHoEntm6zp3efEK3I2nYziERIrshr2G3BQA3EO?= =?us-ascii?Q?s0MmsfdFQgjWAO/u6RMpCZ2bk1ns0RnxvhUd5Nf1p/OA62idiknBmOUWqaY9?= =?us-ascii?Q?wCcoxV20nECF62Ccn104Nknx5xvDvwgX7bM5AqKJEBbjhvELqcrvmEyI3ehh?= =?us-ascii?Q?qd03JeoC5pqDQSPRY/BmPVR00JLUkdzQR/WBbBamD4WjTjZTsNM2JgGNWp0w?= =?us-ascii?Q?Zw79RGJ2mWgnkSwai5IceZ9MX/S8PkpCx7MAIy0BLzIQGhVSaJOQVkPH1zjW?= =?us-ascii?Q?sotWHJCKqwjq+S19DFQITdnIqu7rmZS987tA0rcJd/coC1Cdd05M9SNdIUiT?= =?us-ascii?Q?8Uh+e0uw18t3i04tmEuyE2KKdbx1SisoVXSd2pFrs+3cogqxYZzxeqwckKGH?= =?us-ascii?Q?Yi/AtwAYDRxWr1z0FmkW1AxDWD4Ozho1A54rel6mKJBGTMKbgTHu6OT0y2z1?= =?us-ascii?Q?PBByerJiqUoEglOCvqUea7yKB8fKYwt2nYx/AbF2uWHs6o56mtCpRQSW1Pfr?= =?us-ascii?Q?yqYIGpVNDo/EW38oAywm+gXncIiHhIoA/L9vGFXfvXsPIewOyt1hlK8dH3gq?= =?us-ascii?Q?P7rDI4Q0B0lhYZ8g5NGBnzDVkAELY6B/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LkuMawD7UdnNOiBbKae8nHFdAb2a71chfw3k=; 7:ewFUxkmoAnOo3G+TjemB61TyV3XS7jRC3SaIvpE0rRjY8WkfSCOVdxOP6q/2fvdTN/26CH0rbxRn0TwAe+azNpint6HMdgRmkTI/7RRmv924yBXwoRMX7b3kYffIAJ71aTr252n5LBkI1mZjrtdz7QXdOEtQlrWUvckmus8eX0A/7vHhtrS76KT2jn8sZw6RtIPNdBTFg3eD/Iozf/zwIZL6zg7fXrlvLAK9KBGrsVWX/wv+NoQpEwzy0pwOGJ4J SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2017 03:41:13.4881 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5eb77997-4136-435b-c96d-08d537a4348a 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: DM5PR0701MB3814 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 Reviewed-by: Hannes Reinecke --- 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",