From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AFDA9A04B4 for ; Sat, 2 May 2020 18:10:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9927A1D6A6; Sat, 2 May 2020 18:10:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id E5FDA1D635; Sat, 2 May 2020 18:10:39 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 042GAd96024237; Sat, 2 May 2020 09:10:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=pfpt0818; bh=mwut/Js5s9LcCURJsMKYQOdvyTMUgc+oZ7nP5XNMwqQ=; b=X2lzokgeGvtIbzG5nbE012J9BekdgE0OlmH0zJZMBrK6DK0kFyq//NAhe9i1ZcC20Z/a SF1VwS+Y6Rlyb77UHnCPF9PfLFkmuisf1dUgQwvibhrCFpzsWAp+X/AVeSLqjk2iYM4Z 5DJORgbt1h2YbdfhMo18Hy1p3Hi5ntJIzgrcCahTxsjMlze3Phm9jve2+Qdr1oDxdM68 rVWoknXovs1ciFqJhKHExRzooy0+arP881nmGnXEtz+oFqRBrC6v0tvv8i/LUoSw3wHt 3OTuHBf1V5NKT2qi1l/SqHW1hkaLaxovTcMrCWo54DRZTjQtYPzeYH6bItrmvm11WdXF pw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 30s67q0w12-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 02 May 2020 09:10:39 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 2 May 2020 09:10:37 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 2 May 2020 09:10:37 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.163.117]) by maili.marvell.com (Postfix) with ESMTP id 103763F703F; Sat, 2 May 2020 09:10:34 -0700 (PDT) From: To: , , Harman Kalra CC: , , Pavan Nikhilesh , Date: Sat, 2 May 2020 21:40:31 +0530 Message-ID: <20200502161031.1273-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-05-02_09:2020-05-01, 2020-05-02 signatures=0 Subject: [dpdk-stable] [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Pavan Nikhilesh GCC 9.1 fixes a bug with passing bitfields as pass by value in function parameters and generates a warning for the same as below: drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1 Fix the warning generated by passing bitfield as pass by reference. Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh --- More info on GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469 https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=c590597c45948c6e6fa282878198fd226da95998 drivers/common/octeontx/octeontx_mbox.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/common/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c index 2fd253107..effe0b267 100644 --- a/drivers/common/octeontx/octeontx_mbox.c +++ b/drivers/common/octeontx/octeontx_mbox.c @@ -279,7 +279,7 @@ octeontx_start_domain(void) } static int -octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver, +octeontx_check_mbox_version(struct mbox_intf_ver *app_intf_ver, struct mbox_intf_ver *intf_ver) { struct mbox_intf_ver kernel_intf_ver = {0}; @@ -290,8 +290,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver, hdr.coproc = NO_COPROC; hdr.msg = RM_INTERFACE_VERSION; - result = octeontx_mbox_send(&hdr, &app_intf_ver, sizeof(app_intf_ver), - &kernel_intf_ver, sizeof(kernel_intf_ver)); + result = octeontx_mbox_send(&hdr, app_intf_ver, + sizeof(struct mbox_intf_ver), + &kernel_intf_ver, sizeof(kernel_intf_ver)); if (result != sizeof(kernel_intf_ver)) { mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n", result, hdr.res_code); @@ -301,9 +302,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver, if (intf_ver) *intf_ver = kernel_intf_ver; - if (app_intf_ver.platform != kernel_intf_ver.platform || - app_intf_ver.major != kernel_intf_ver.major || - app_intf_ver.minor != kernel_intf_ver.minor) + if (app_intf_ver->platform != kernel_intf_ver.platform || + app_intf_ver->major != kernel_intf_ver.major || + app_intf_ver->minor != kernel_intf_ver.minor) result = -EINVAL; return result; @@ -312,7 +313,7 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver, int octeontx_mbox_init(void) { - const struct mbox_intf_ver MBOX_INTERFACE_VERSION = { + struct mbox_intf_ver MBOX_INTERFACE_VERSION = { .platform = 0x01, .major = 0x01, .minor = 0x03 @@ -330,7 +331,7 @@ octeontx_mbox_init(void) return ret; } - ret = octeontx_check_mbox_version(MBOX_INTERFACE_VERSION, + ret = octeontx_check_mbox_version(&MBOX_INTERFACE_VERSION, &rm_intf_ver); if (ret < 0) { mbox_log_err("MBOX version: Kernel(%d.%d.%d) != DPDK(%d.%d.%d)", -- 2.26.2