From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 9BA6D1BD90 for ; Fri, 11 May 2018 03:45:44 +0200 (CEST) From: Andy Green To: dev@dpdk.org Date: Fri, 11 May 2018 09:45:40 +0800 Message-ID: <152600314090.53146.10732195073151915971.stgit@localhost.localdomain> In-Reply-To: <152600304856.53146.9681482138854493833.stgit@localhost.localdomain> References: <152600304856.53146.9681482138854493833.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 05/18] net/axgbe: solve broken eeprom string comp 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: Fri, 11 May 2018 01:45:44 -0000 /home/agreen/projects/dpdk/drivers/net/axgbe/axgbe_phy_impl.c:576:6: error: ‘__builtin_memcmp_eq’ reading 16 bytes from a region of size 9 [-Werror=stringop-overflow=] if (memcmp(&sfp_eeprom->base[AXGBE_SFP_BASE_VENDOR_NAME], ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AXGBE_BEL_FUSE_VENDOR, AXGBE_SFP_BASE_VENDOR_NAME_LEN)) Signed-off-by: Andy Green --- drivers/net/axgbe/axgbe_phy_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index dfa908dd8..973177f69 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -574,11 +574,11 @@ static bool axgbe_phy_belfuse_parse_quirks(struct axgbe_port *pdata) struct axgbe_sfp_eeprom *sfp_eeprom = &phy_data->sfp_eeprom; if (memcmp(&sfp_eeprom->base[AXGBE_SFP_BASE_VENDOR_NAME], - AXGBE_BEL_FUSE_VENDOR, AXGBE_SFP_BASE_VENDOR_NAME_LEN)) + AXGBE_BEL_FUSE_VENDOR, strlen(AXGBE_BEL_FUSE_VENDOR))) return false; if (!memcmp(&sfp_eeprom->base[AXGBE_SFP_BASE_VENDOR_PN], - AXGBE_BEL_FUSE_PARTNO, AXGBE_SFP_BASE_VENDOR_PN_LEN)) { + AXGBE_BEL_FUSE_PARTNO, strlen(AXGBE_BEL_FUSE_PARTNO))) { phy_data->sfp_base = AXGBE_SFP_BASE_1000_SX; phy_data->sfp_cable = AXGBE_SFP_CABLE_ACTIVE; phy_data->sfp_speed = AXGBE_SFP_SPEED_1000;