Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp990298ybg; Wed, 3 Jun 2020 20:34:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/OiAxz2jw6JL9keBxPbFi4ILTEokPz++iNKIMhWP8+kZlD/RyX/dLFQdYlWO3VEetWKQE X-Received: by 2002:a17:906:4350:: with SMTP id z16mr2069023ejm.139.1591241644357; Wed, 03 Jun 2020 20:34:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591241644; cv=none; d=google.com; s=arc-20160816; b=nl/UUOrGus4PGFyc5gVgRm3kSrf2O+yynAo9/cWn37+g6UTmyRmF9J9mSe1C7EJAWi QYCMOBvY3yS46NJCQ4qpfT0nPgnf9JMQRqbcVCZar5vqgexN4g21kzZSO4RJLPr1veDm PSECvQL79WCPjdPhtEb6LTk/q5TgrK+T5uNtyPCRsgSAbBVthOxlu9P121HsW/nE9hjR pHI6YAIQrngU73YpB80DF/4HEgU1YmiA+p5RE1t6oqEsspGAR4Pxek2NbCuoaFllewS7 AL22tp5HZkzHnTE0wTXNIBb0c/36o6kMfhLzLpEAJmamXFyVdFQ6u0cHHQu1bwWlhqL4 pu9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=cIQNiSwo2zh6B6Kdp7Ix9xordB73NniypCevPw5WnEI=; b=F8PP7QP/oFmpO7gdZyw77LeIfNLZUOMdJ0KfGIy9BI7ZYRYznRLb05oanzBu9AoxJw yXsC//y8t+V+glzpRN4Fhwd6+V0rxZgQqtbrM/ew1ZzUMS95iWH3BWmReGI6H0/bZunb 0y/eHr1Vtu75f/qKTt/sPbJJNI0M6LgHKOlq68P0A8Xq7Q4jPdU8MCSKnOmv0C7Xk7+P 4iQTR6sqXH9EO1Y27zJSjzJy2s5Ngb9FP0tUUnu2AHFtlUnEM3KQiiNVusrwx9iNcYLE SR/84ViBr3r/2uClJJrztkxwtrKB7RD0pd/ewi4OaFwKEofo+P5mzZoZHr7TyZVG9yPd VCIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oOxhcsvV; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gf16si841859ejb.490.2020.06.03.20.33.28; Wed, 03 Jun 2020 20:34:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oOxhcsvV; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725959AbgFDDcS (ORCPT + 99 others); Wed, 3 Jun 2020 23:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbgFDDcS (ORCPT ); Wed, 3 Jun 2020 23:32:18 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1820C03E96D for ; Wed, 3 Jun 2020 20:32:17 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id k2so471879pjs.2 for ; Wed, 03 Jun 2020 20:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cIQNiSwo2zh6B6Kdp7Ix9xordB73NniypCevPw5WnEI=; b=oOxhcsvVz/mOwc4x4AFo8LBYfoYOzgK0UI1I0WFHclj8ueojMzkJupjaA2XX+eB1Kv EuBF0inVDuWFb78orLxaQGeTqez4tMfKQyfG4scRXxYyKkGbTHdX9kUgaVjoJNKGA5mh z8tnF6HXe5v3lRjORS4sQGF6iXLYYfapnIIGiOsyhOfrIe5n7mponbiBE3ETzPpx/jj5 lX/X3Xq9WB+IU+YCyHRH2uroe17NNyyg4uYIBBagaF7wwC7B4qS8FGqerABwOrrwia89 FCpiGaPdeKl8L8tfFeG26MKKbYPu37HmA0JEvf8/3Le2Ey4vdAbejHitdWwxxd2rPUoE Ypxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cIQNiSwo2zh6B6Kdp7Ix9xordB73NniypCevPw5WnEI=; b=SFANe4LEPTGhVbX5vm63BvygPt9KS8ch1SsWaaUk3dAkfFl/uzULUO+ENeieNnTHYl EyPeZPLGfoF8ddS97ajUl2utnkFAHIv5PH4WU3tVVA5TYAq7TtqnnmEPVv458bMMOVGL QrA+e2CLxxo/Fdmx4a9nMWFHAtnpPsu0keVRFpq7eE/T0bqv4LcnSXX87nsruWflw59c D3lGFEsCbxpw8d/q/l3gs/KQu2r+rlL7QHAUt1YxIQY5AiuSLT9B6sjFknQQvn2kSDcr 3I4juGL5KTqGoTwN5a3t1FpJBqP/TO2nTwIo1pTnPUi6qwH+dO2EmIvNL2QMRtG7xunV whug== X-Gm-Message-State: AOAM533ZJGZ9NjU/YHEsFINX3IonhRXWNoIrZXuIuTUm+JafYWIDrPR0 f8XWmkvJP4LgMpZxvtWmtUhmMA== X-Received: by 2002:a17:90b:3105:: with SMTP id gc5mr3497133pjb.36.1591241537050; Wed, 03 Jun 2020 20:32:17 -0700 (PDT) Received: from localhost.localdomain ([45.135.186.21]) by smtp.gmail.com with ESMTPSA id r24sm2689658pgm.25.2020.06.03.20.32.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2020 20:32:16 -0700 (PDT) From: Zhangfei Gao To: =?UTF-8?q?=C2=A0Herbert=20Xu=C2=A0?= , =?UTF-8?q?=C2=A0Greg=20Kroah-Hartman=C2=A0?= , =?UTF-8?q?=C2=A0Jonathan=20Cameron=C2=A0?= , =?UTF-8?q?=C2=A0wangzhou1=C2=A0?= Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, kbuild-all@lists.01.org, Zhangfei Gao Subject: [PATCH] crypto: hisilicon - fix strncpy warning with strlcpy Date: Thu, 4 Jun 2020 11:32:04 +0800 Message-Id: <1591241524-6452-1-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <202006032110.BEbKqovX%lkp@intel.com> References: <202006032110.BEbKqovX%lkp@intel.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Use strlcpy to fix the warning warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation] Reported-by: kernel test robot Signed-off-by: Zhangfei Gao --- drivers/crypto/hisilicon/qm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index f795fb5..224f3e2 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -1574,7 +1574,7 @@ static int qm_alloc_uacce(struct hisi_qm *qm) .ops = &uacce_qm_ops, }; - strncpy(interface.name, pdev->driver->name, sizeof(interface.name)); + strlcpy(interface.name, pdev->driver->name, sizeof(interface.name)); uacce = uacce_alloc(&pdev->dev, &interface); if (IS_ERR(uacce)) -- 2.7.4