From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0088.outbound.protection.outlook.com [104.47.37.88]) by dpdk.org (Postfix) with ESMTP id E08431B0F9 for ; Sat, 29 Sep 2018 10:14:40 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=oeY3iskg5kggmDrR5UR5PVjbtXHucEDOSpXuA4EnZnk=; b=YNDTY26zPBVojmgJ2l1+2rObAjrlPn/ock5FbE6o8DcL7PpUiREhZEgy5nHqSF0DBofhZ1sRrWejOzHQP60KbM10v6JELo8sHWD/UcD3qxRUQDglsKrDRuZtkARVAAKh9hpib8+uw+7i50sFrsChKajDdZ4gQKVto5GMgksr/gQ= Received: from BYAPR07MB5365.namprd07.prod.outlook.com (20.177.125.18) by BYAPR07MB4806.namprd07.prod.outlook.com (20.176.248.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.20; Sat, 29 Sep 2018 08:14:39 +0000 Received: from BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::2047:9647:f196:bde0]) by BYAPR07MB5365.namprd07.prod.outlook.com ([fe80::2047:9647:f196:bde0%6]) with mapi id 15.20.1143.022; Sat, 29 Sep 2018 08:14:39 +0000 From: "Mody, Rasesh" To: "dev@dpdk.org" CC: "Mody, Rasesh" , "ferruh.yigit@intel.com" , Dept-Eng DPDK Dev Thread-Topic: [PATCH 17/18] net/qede/base: semantic changes Thread-Index: AQHUV8x34DV8UPi5pEqIYc5NDZzWdQ== Date: Sat, 29 Sep 2018 08:14:39 +0000 Message-ID: <1538208822-9726-18-git-send-email-rasesh.mody@cavium.com> References: <1538208822-9726-1-git-send-email-rasesh.mody@cavium.com> In-Reply-To: <1538208822-9726-1-git-send-email-rasesh.mody@cavium.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR11CA0059.namprd11.prod.outlook.com (2603:10b6:a03:80::36) To BYAPR07MB5365.namprd07.prod.outlook.com (2603:10b6:a03:64::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasesh.Mody@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [198.186.1.5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR07MB4806; 6:DrWuarhtmuMbBLIVdn1GQHZMt+/kREQdlt8XQcXcbcYPiX6mfgSuZevEWQtb6mNyIlU3FUdYkDlT7PEpmE3i1+tocVCY0pm6Srm/kob/R8UI/wgA2w+MJxlxhFRXTsW54jVyQR7xSJ26Dk+Kgr+nU25OGeXsZgHTzy4mnvaxpuoTfPXEexUPlMMvpN8IT+cxKaepkYPU1dc0eTXxUfpAc/hpOOAL1LE9o+xYaTSDbw78ymV15MXB7y0XiHCALRPWmrKlycqwQyUETSYI57k+sfg+eknjERIV1RQIS015CGvWFU6igjUPwEojxpeQsysz7pA4jeqI/ydmkoxNZam/BmRKVDRPXv316DwEsqHMnmLqAPcjfq0mhLETSyTtv0ZMyI0W38ifmF7fF29vmDhxCnQvFi1R/hCxFQGADcOsDoYTGBCWCGc1MSM6PjCid3ozkOK6Y1/6qswCmc4KNQl0dw==; 5:JM2ILoB1PQcDbQVFA1+O6iERZhYV1QtnX7RYt+et48/U8IlKiqWWaKxmPsPoIQ65nZcE1xFF2Je0IgA+v7/30E4dCkTvfLXkiKouRJhStWDSR+VTldP9AKlDVkoQpxUwNfYeA6hmq73tsDMr13QhRWnoDp5iqNTTokucbJnz/Zc=; 7:qUjzceMO0IVfHq3zGNlh+SY5odwKRfce9likAUojv6GKpG5h9uD5SgoJ1uDZ7MgRoIk4KO7bbJfna7AAxETz8c8RmaC+YN/Y/HoF+yqpRIcS+BBQxDY5ido0BSZDPOZiz6W3nMplGR6nJWULSHUjeJvvM33fVQl2uvr5wYktjE9dew/GLbeJ4/XGcYPPjZO5Rrcx5v90EGH4lrL3ZudWgZYU3DMHufw/+/3nq7JEzoqWrMpBdUIFrqNNfKRSCD4a x-ms-office365-filtering-correlation-id: 09573b2e-a813-4a76-336d-08d625e3997a x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4806; x-ms-traffictypediagnostic: BYAPR07MB4806: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(93006095)(93001095)(3002001)(3231355)(944501410)(52105095)(10201501046)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:BYAPR07MB4806; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4806; x-forefront-prvs: 0810818DA0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(366004)(136003)(39860400002)(199004)(189003)(26005)(4326008)(102836004)(14444005)(256004)(2616005)(66066001)(446003)(476003)(71190400001)(71200400001)(6116002)(11346002)(3846002)(316002)(5660300001)(36756003)(486006)(2906002)(107886003)(25786009)(8936002)(68736007)(6512007)(8676002)(106356001)(14454004)(5640700003)(81156014)(81166006)(105586002)(1730700003)(6436002)(6486002)(52116002)(76176011)(53936002)(72206003)(2351001)(7736002)(305945005)(478600001)(54906003)(6916009)(2501003)(186003)(86362001)(6506007)(386003)(5250100002)(2900100001)(34290500001)(99286004)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4806; H:BYAPR07MB5365.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: gmUYmuoEqcTyFpqNmgAbBq0QrRTAiLCd/roT1RuzEQP5/vo4l6ebhkXQvWtL2vQKutoP5mWb2fUajYHW1PKnr6Y6niarkWTkyG+z/TVZPu5PPXkkBCnHDz5/lvELdxTvOanAsrB9Ms+w+xP/0jQrIOOX3zBrDMvD5pfRKUdl+ByPSfdVGdUkT1Z3m1t1uEIKnxsiYqFc8tFKvrDdZd10R9ZBJf5h5z4Tc0pDuVtm9PdrAasi/mKiTZ4/c/gAoKXm3eu07hfleYQHqssD27ePVqZmevJHWSou0SQlX3phHe8qT4PqYWgiUYdvmKuL2/sBs3X1z7ZdeJObTrbj4pohvD4m+BKMhqSRVu+sQJRxOFg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09573b2e-a813-4a76-336d-08d625e3997a X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2018 08:14:39.5490 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4806 Subject: [dpdk-dev] [PATCH 17/18] net/qede/base: semantic changes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2018 08:14:41 -0000 This patch consists of semantic/formatting changes. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_dcbx.c | 3 ++- drivers/net/qede/base/ecore_init_ops.c | 12 ++++----- drivers/net/qede/base/ecore_int.c | 3 ++- drivers/net/qede/base/ecore_int_api.h | 3 ++- drivers/net/qede/base/ecore_l2.c | 16 ++++++------ drivers/net/qede/base/ecore_mcp.c | 11 ++++---- drivers/net/qede/base/ecore_spq.c | 44 ++++++++++++++++++----------= ---- drivers/net/qede/base/ecore_sriov.c | 12 +++++---- 8 files changed, 58 insertions(+), 46 deletions(-) diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/eco= re_dcbx.c index 7981c42..cbc69cd 100644 --- a/drivers/net/qede/base/ecore_dcbx.c +++ b/drivers/net/qede/base/ecore_dcbx.c @@ -325,7 +325,7 @@ u8 ecore_dcbx_get_dscp_value(struct ecore_hwfn *p_hwfn,= u8 pri) { struct dcbx_app_priority_feature *p_app; struct dcbx_app_priority_entry *p_tbl; - struct ecore_dcbx_results data =3D { 0 }; + struct ecore_dcbx_results data; struct dcbx_ets_feature *p_ets; struct ecore_hw_info *p_info; u32 pri_tc_tbl, flags; @@ -345,6 +345,7 @@ u8 ecore_dcbx_get_dscp_value(struct ecore_hwfn *p_hwfn,= u8 pri) p_info =3D &p_hwfn->hw_info; num_entries =3D GET_MFW_FIELD(p_app->flags, DCBX_APP_NUM_ENTRIES); =20 + OSAL_MEMSET(&data, 0, sizeof(struct ecore_dcbx_results)); rc =3D ecore_dcbx_process_tlv(p_hwfn, p_ptt, &data, p_tbl, pri_tc_tbl, num_entries, dcbx_version); if (rc !=3D ECORE_SUCCESS) diff --git a/drivers/net/qede/base/ecore_init_ops.c b/drivers/net/qede/base= /ecore_init_ops.c index 47c1be2..044308b 100644 --- a/drivers/net/qede/base/ecore_init_ops.c +++ b/drivers/net/qede/base/ecore_init_ops.c @@ -420,11 +420,11 @@ static u8 ecore_init_cmd_mode_match(struct ecore_hwfn= *p_hwfn, u16 *p_offset, int modes) { struct ecore_dev *p_dev =3D p_hwfn->p_dev; - const u8 *modes_tree_buf; u8 arg1, arg2, tree_val; + const u8 *modes_tree; =20 - modes_tree_buf =3D p_dev->fw_data->modes_tree_buf; - tree_val =3D modes_tree_buf[(*p_offset)++]; + modes_tree =3D p_dev->fw_data->modes_tree_buf; + tree_val =3D modes_tree[(*p_offset)++]; switch (tree_val) { case INIT_MODE_OP_NOT: return ecore_init_cmd_mode_match(p_hwfn, p_offset, modes) ^ 1; @@ -474,12 +474,12 @@ enum _ecore_status_t ecore_init_run(struct ecore_hwfn= *p_hwfn, { struct ecore_dev *p_dev =3D p_hwfn->p_dev; u32 cmd_num, num_init_ops; - union init_op *init_ops; + union init_op *init; bool b_dmae =3D false; enum _ecore_status_t rc =3D ECORE_SUCCESS; =20 num_init_ops =3D p_dev->fw_data->init_ops_size; - init_ops =3D p_dev->fw_data->init_ops; + init =3D p_dev->fw_data->init_ops; =20 #ifdef CONFIG_ECORE_ZIPPED_FW p_hwfn->unzip_buf =3D OSAL_ZALLOC(p_hwfn->p_dev, GFP_ATOMIC, @@ -491,7 +491,7 @@ enum _ecore_status_t ecore_init_run(struct ecore_hwfn *= p_hwfn, #endif =20 for (cmd_num =3D 0; cmd_num < num_init_ops; cmd_num++) { - union init_op *cmd =3D &init_ops[cmd_num]; + union init_op *cmd =3D &init[cmd_num]; u32 data =3D OSAL_LE32_TO_CPU(cmd->raw.op_data); =20 switch (GET_FIELD(data, INIT_CALLBACK_OP_OP)) { diff --git a/drivers/net/qede/base/ecore_int.c b/drivers/net/qede/base/ecor= e_int.c index e48a7bc..7368d55 100644 --- a/drivers/net/qede/base/ecore_int.c +++ b/drivers/net/qede/base/ecore_int.c @@ -1224,8 +1224,9 @@ static enum _ecore_status_t ecore_int_attentions(stru= ct ecore_hwfn *p_hwfn) static void ecore_sb_ack_attn(struct ecore_hwfn *p_hwfn, void OSAL_IOMEM *igu_addr, u32 ack_cons) { - struct igu_prod_cons_update igu_ack =3D { 0 }; + struct igu_prod_cons_update igu_ack; =20 + OSAL_MEMSET(&igu_ack, 0, sizeof(struct igu_prod_cons_update)); igu_ack.sb_id_and_flags =3D ((ack_cons << IGU_PROD_CONS_UPDATE_SB_INDEX_SHIFT) | (1 << IGU_PROD_CONS_UPDATE_UPDATE_FLAG_SHIFT) | diff --git a/drivers/net/qede/base/ecore_int_api.h b/drivers/net/qede/base/= ecore_int_api.h index 5b9c31d..42538a4 100644 --- a/drivers/net/qede/base/ecore_int_api.h +++ b/drivers/net/qede/base/ecore_int_api.h @@ -92,8 +92,9 @@ static OSAL_INLINE u16 ecore_sb_update_sb_idx(struct ecor= e_sb_info *sb_info) static OSAL_INLINE void ecore_sb_ack(struct ecore_sb_info *sb_info, enum igu_int_cmd int_cmd, u8 upd_flg) { - struct igu_prod_cons_update igu_ack =3D { 0 }; + struct igu_prod_cons_update igu_ack; =20 + OSAL_MEMSET(&igu_ack, 0, sizeof(struct igu_prod_cons_update)); igu_ack.sb_id_and_flags =3D ((sb_info->sb_ack << IGU_PROD_CONS_UPDATE_SB_INDEX_SHIFT) | (upd_flg << IGU_PROD_CONS_UPDATE_UPDATE_FLAG_SHIFT) | diff --git a/drivers/net/qede/base/ecore_l2.c b/drivers/net/qede/base/ecore= _l2.c index 5a0905e..8b9817e 100644 --- a/drivers/net/qede/base/ecore_l2.c +++ b/drivers/net/qede/base/ecore_l2.c @@ -2205,10 +2205,10 @@ enum _ecore_status_t return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL); } =20 -int ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, - struct ecore_ptt *p_ptt, - struct ecore_queue_cid *p_cid, - u16 *p_rx_coal) +enum _ecore_status_t ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn, + struct ecore_ptt *p_ptt, + struct ecore_queue_cid *p_cid, + u16 *p_rx_coal) { u32 coalesce, address, is_valid; struct cau_sb_entry sb_entry; @@ -2240,10 +2240,10 @@ int ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwf= n, return ECORE_SUCCESS; } =20 -int ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn, - struct ecore_ptt *p_ptt, - struct ecore_queue_cid *p_cid, - u16 *p_tx_coal) +enum _ecore_status_t ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn, + struct ecore_ptt *p_ptt, + struct ecore_queue_cid *p_cid, + u16 *p_tx_coal) { u32 coalesce, address, is_valid; struct cau_sb_entry sb_entry; diff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecor= e_mcp.c index 202db13..6c65606 100644 --- a/drivers/net/qede/base/ecore_mcp.c +++ b/drivers/net/qede/base/ecore_mcp.c @@ -3084,7 +3084,7 @@ enum _ecore_status_t ecore_mcp_phy_read(struct ecore_= dev *p_dev, u32 cmd, { struct ecore_hwfn *p_hwfn =3D ECORE_LEADING_HWFN(p_dev); struct ecore_ptt *p_ptt; - u32 resp, param; + u32 resp =3D 0, param; enum _ecore_status_t rc; =20 p_ptt =3D ecore_ptt_acquire(p_hwfn); @@ -3124,7 +3124,7 @@ enum _ecore_status_t ecore_mcp_nvm_del_file(struct ec= ore_dev *p_dev, u32 addr) { struct ecore_hwfn *p_hwfn =3D ECORE_LEADING_HWFN(p_dev); struct ecore_ptt *p_ptt; - u32 resp, param; + u32 resp =3D 0, param; enum _ecore_status_t rc; =20 p_ptt =3D ecore_ptt_acquire(p_hwfn); @@ -3143,7 +3143,7 @@ enum _ecore_status_t ecore_mcp_nvm_put_file_begin(str= uct ecore_dev *p_dev, { struct ecore_hwfn *p_hwfn =3D ECORE_LEADING_HWFN(p_dev); struct ecore_ptt *p_ptt; - u32 resp, param; + u32 resp =3D 0, param; enum _ecore_status_t rc; =20 p_ptt =3D ecore_ptt_acquire(p_hwfn); @@ -3237,8 +3237,8 @@ enum _ecore_status_t ecore_mcp_phy_write(struct ecore= _dev *p_dev, u32 cmd, u32 addr, u8 *p_buf, u32 len) { struct ecore_hwfn *p_hwfn =3D ECORE_LEADING_HWFN(p_dev); + u32 resp =3D 0, param, nvm_cmd; struct ecore_ptt *p_ptt; - u32 resp, param, nvm_cmd; enum _ecore_status_t rc; =20 p_ptt =3D ecore_ptt_acquire(p_hwfn); @@ -4216,10 +4216,11 @@ enum _ecore_status_t ecore_mcp_get_ppfid_bitmap(str= uct ecore_hwfn *p_hwfn, void ecore_mcp_wol_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u32 offset, u32 val) { - struct ecore_mcp_mb_params mb_params =3D {0}; enum _ecore_status_t rc =3D ECORE_SUCCESS; u32 dword =3D val; + struct ecore_mcp_mb_params mb_params; =20 + OSAL_MEMSET(&mb_params, 0, sizeof(struct ecore_mcp_mb_params)); mb_params.cmd =3D DRV_MSG_CODE_WRITE_WOL_REG; mb_params.param =3D offset; mb_params.p_data_src =3D &dword; diff --git a/drivers/net/qede/base/ecore_spq.c b/drivers/net/qede/base/ecor= e_spq.c index 1a02ba2..88ad961 100644 --- a/drivers/net/qede/base/ecore_spq.c +++ b/drivers/net/qede/base/ecore_spq.c @@ -282,6 +282,7 @@ static enum _ecore_status_t ecore_spq_hw_post(struct ec= ore_hwfn *p_hwfn, struct event_ring_entry *p_eqe) { ecore_spq_async_comp_cb cb; + enum _ecore_status_t rc; =20 if (p_eqe->protocol_id >=3D MAX_PROTOCOL_TYPE) { DP_ERR(p_hwfn, "Wrong protocol: %d\n", p_eqe->protocol_id); @@ -289,15 +290,22 @@ static enum _ecore_status_t ecore_spq_hw_post(struct = ecore_hwfn *p_hwfn, } =20 cb =3D p_hwfn->p_spq->async_comp_cb[p_eqe->protocol_id]; - if (cb) { - return cb(p_hwfn, p_eqe->opcode, p_eqe->echo, - &p_eqe->data, p_eqe->fw_return_code); - } else { + if (!cb) { DP_NOTICE(p_hwfn, true, "Unknown Async completion for protocol: %d\n", p_eqe->protocol_id); return ECORE_INVAL; } + + rc =3D cb(p_hwfn, p_eqe->opcode, p_eqe->echo, + &p_eqe->data, p_eqe->fw_return_code); + if (rc !=3D ECORE_SUCCESS) + DP_NOTICE(p_hwfn, true, + "Async completion callback failed, rc =3D %d [opcode %x, echo %x, fw_= return_code %x]", + rc, p_eqe->opcode, p_eqe->echo, + p_eqe->fw_return_code); + + return rc; } =20 enum _ecore_status_t @@ -342,7 +350,7 @@ enum _ecore_status_t ecore_eq_completion(struct ecore_h= wfn *p_hwfn, struct ecore_eq *p_eq =3D cookie; struct ecore_chain *p_chain =3D &p_eq->chain; u16 fw_cons_idx =3D 0; - enum _ecore_status_t rc =3D 0; + enum _ecore_status_t rc =3D ECORE_SUCCESS; =20 if (!p_hwfn->p_spq) { DP_ERR(p_hwfn, "Unexpected NULL p_spq\n"); @@ -366,7 +374,8 @@ enum _ecore_status_t ecore_eq_completion(struct ecore_h= wfn *p_hwfn, while (fw_cons_idx !=3D ecore_chain_get_cons_idx(p_chain)) { struct event_ring_entry *p_eqe =3D ecore_chain_consume(p_chain); if (!p_eqe) { - rc =3D ECORE_INVAL; + DP_ERR(p_hwfn, + "Unexpected NULL chain consumer entry\n"); break; } =20 @@ -382,15 +391,13 @@ enum _ecore_status_t ecore_eq_completion(struct ecore= _hwfn *p_hwfn, */ p_eqe->flags); =20 - if (GET_FIELD(p_eqe->flags, EVENT_RING_ENTRY_ASYNC)) { - if (ecore_async_event_completion(p_hwfn, p_eqe)) - rc =3D ECORE_INVAL; - } else if (ecore_spq_completion(p_hwfn, - p_eqe->echo, - p_eqe->fw_return_code, - &p_eqe->data)) { - rc =3D ECORE_INVAL; - } + if (GET_FIELD(p_eqe->flags, EVENT_RING_ENTRY_ASYNC)) + ecore_async_event_completion(p_hwfn, p_eqe); + else + ecore_spq_completion(p_hwfn, + p_eqe->echo, + p_eqe->fw_return_code, + &p_eqe->data); =20 ecore_chain_recycle_consumed(p_chain); } @@ -936,12 +943,11 @@ enum _ecore_status_t ecore_spq_completion(struct ecor= e_hwfn *p_hwfn, struct ecore_spq_entry *found =3D OSAL_NULL; enum _ecore_status_t rc; =20 - if (!p_hwfn) - return ECORE_INVAL; - p_spq =3D p_hwfn->p_spq; - if (!p_spq) + if (!p_spq) { + DP_ERR(p_hwfn, "Unexpected NULL p_spq\n"); return ECORE_INVAL; + } =20 OSAL_SPIN_LOCK(&p_spq->lock); OSAL_LIST_FOR_EACH_ENTRY_SAFE(p_ent, diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ec= ore_sriov.c index 9e937e2..db929f0 100644 --- a/drivers/net/qede/base/ecore_sriov.c +++ b/drivers/net/qede/base/ecore_sriov.c @@ -218,7 +218,7 @@ struct ecore_vf_info *ecore_iov_get_vf_info(struct ecor= e_hwfn *p_hwfn, static struct ecore_queue_cid * ecore_iov_get_vf_rx_queue_cid(struct ecore_vf_queue *p_queue) { - int i; + u32 i; =20 for (i =3D 0; i < MAX_QUEUES_PER_QZONE; i++) { if (p_queue->cids[i].p_cid && @@ -240,7 +240,7 @@ static bool ecore_iov_validate_queue_mode(struct ecore_= vf_info *p_vf, enum ecore_iov_validate_q_mode mode, bool b_is_tx) { - int i; + u32 i; =20 if (mode =3D=3D ECORE_IOV_VALIDATE_Q_NA) return true; @@ -2089,8 +2089,8 @@ static void ecore_iov_vf_mbx_start_vport(struct ecore= _hwfn *p_hwfn, struct ecore_ptt *p_ptt, struct ecore_vf_info *vf) { - struct ecore_sp_vport_start_params params =3D { 0 }; struct ecore_iov_vf_mbx *mbx =3D &vf->vf_mbx; + struct ecore_sp_vport_start_params params; struct vfpf_vport_start_tlv *start; u8 status =3D PFVF_STATUS_SUCCESS; struct ecore_vf_info *vf_info; @@ -2141,6 +2141,7 @@ static void ecore_iov_vf_mbx_start_vport(struct ecore= _hwfn *p_hwfn, *p_bitmap |=3D 1 << VFPF_BULLETIN_UNTAGGED_DEFAULT; } =20 + OSAL_MEMSET(¶ms, 0, sizeof(struct ecore_sp_vport_start_params)); params.tpa_mode =3D start->tpa_mode; params.remove_inner_vlan =3D start->inner_vlan_removal; params.tx_switching =3D true; @@ -3668,7 +3669,7 @@ static void ecore_iov_vf_pf_set_coalesce(struct ecore= _hwfn *p_hwfn, struct ecore_queue_cid *p_cid; u16 rx_coal, tx_coal; u16 qid; - int i; + u32 i; =20 req =3D &mbx->req_virt->update_coalesce; =20 @@ -3748,7 +3749,8 @@ enum _ecore_status_t struct ecore_queue_cid *p_cid; struct ecore_vf_info *vf; struct ecore_ptt *p_ptt; - int i, rc =3D 0; + int rc =3D 0; + u32 i; =20 if (!ecore_iov_is_valid_vfid(p_hwfn, vf_id, true, true)) { DP_NOTICE(p_hwfn, true, --=20 1.7.10.3