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 465B5A056A for ; Fri, 6 Mar 2020 13:07:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3AA231BFD2; Fri, 6 Mar 2020 13:07:12 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id AB33E1BFCE for ; Fri, 6 Mar 2020 13:07:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583496430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fbO67+9bjNKD2O7RwQis+1CoinX3eHzSTyOVsB2sea0=; b=d28XVHoRBKPzseHVeizBC/TXPuJnibyNrthby9jPaXgwNImQ3jLZjs/E36HgvZNABPtN3h WqzlMZ3Onrotf2sDeLJfS6NJqtphLWmk3eLb9cx9Ufnyu1vjYeFrLe/tcCnzH6Gb0JtNW9 W+5TAPgaQSfQEDzLoLiWU9xBvJ8H0kE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253-G639oiSXPe-ok5AFieWJuA-1; Fri, 06 Mar 2020 07:07:06 -0500 X-MC-Unique: G639oiSXPe-ok5AFieWJuA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ED4D08017CC; Fri, 6 Mar 2020 12:07:04 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5919F60BEC; Fri, 6 Mar 2020 12:06:59 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , stable@dpdk.org, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com Date: Fri, 6 Mar 2020 12:06:51 +0000 Message-Id: <20200306120652.30080-1-ktraynor@redhat.com> In-Reply-To: <20200306120047.29392-1-ktraynor@redhat.com> References: <20200306120047.29392-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] [PATCH v2 1/2] net/hinic: fix snprintf length 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" Correct length and remove unnecessary brackets. Fixes: d9ce1917941c ("net/hinic/base: add hardware operation") Cc: stable@dpdk.org Signed-off-by: Kevin Traynor --- v2: fix typo in commit msg Cc: xuanziyang2@huawei.com Cc: cloud.wangxiaoyun@huawei.com Cc: zhouguoyang@huawei.com --- drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/b= ase/hinic_pmd_hwdev.c index 8b16897ad..b6c821a2a 100644 --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c @@ -1391,5 +1391,5 @@ static void print_cable_info(struct hinic_link_info *= info) =20 =09memcpy(tmp_vendor, info->vendor_name, sizeof(info->vendor_name)); -=09snprintf(tmp_str, (sizeof(tmp_str) - 1), +=09snprintf(tmp_str, sizeof(tmp_str), =09=09 "Vendor: %s, %s, %s, length: %um, max_speed: %uGbps", =09=09 tmp_vendor, info->sfp_type ? "SFP" : "QSFP", port_type, --=20 2.21.1