Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2340984ima; Mon, 22 Oct 2018 08:13:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV63nVJgmc2UPrE0U4yALIs7MfqedxkdOkDg826Ucfowtu2g/kQlW5hYpu22/e4Hs3WpHMoxv X-Received: by 2002:a62:1d16:: with SMTP id d22-v6mr27381033pfd.159.1540221195545; Mon, 22 Oct 2018 08:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540221195; cv=none; d=google.com; s=arc-20160816; b=XlQOB2uGVDzZAjybJOI7AkM4wGaD9exIJRzWhhI0Ot/RtAcsi9jTKPhpq3FnwgNjqg k+H2KYFrPsarPw2eQQRYHXztgtfEx7Ft0OjETGjFKSWBzqI3g2xFSJV31n0l1he1G5a/ FAIVwF2l/sLCVfxYOub4ZMJtQkfFbfRqvzE2EOFN/T1tBfXEc+2YHnE6FhR5i9hjOfoe 5w1AN2tVJ4wQZyor7Cg05/bD6Fw3ccDM+mxdEUHTx7hbkuRpRt3GHkZERNrj+iU3W5sA FQ3hJ+Sll4Ldp2GMWsK0G9lB/w98Z4InsvHA6bcfGvh4UWkTCumA/NmUDFV8AIctzOP+ lJjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=Gmkj/HGLVkJ3PDXpHv7YgTSGsquv7oK4Vl+iMSNuzpE=; b=BEw4oiy4R7gbbWURtpJy00LzDBHnBbqH5IYnsfQtTUsCc8VpJ34rMwAOIfGeQXqw6S OZSYSqooX0ed1pdpm3XbgPPErkRLue46XDPZSHFny/3lPtTe90w9b34g5p5AXqtzV2Xj eY3Y3rrzzj2oZJJQjumNzKQ9sU1bdx5lliFfGvBqE6UWaQPHoYDtYkK1fmus0I3ftaDl LNH9xaBjD1EgioObuumDRdpLpIHsBNl7BVA+jJ7ke03BdRwT68pNvl8s9iuscs3T3yhJ kGDrfbS72wYZ1vS3SqMs+xtKqeWY0pnimhAmEascpzH4IYoif3+iuf9qtpyIOTnOhcrs CyEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be12-v6si32940820plb.347.2018.10.22.08.12.50; Mon, 22 Oct 2018 08:13:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728653AbeJVXa1 (ORCPT + 99 others); Mon, 22 Oct 2018 19:30:27 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:53789 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727218AbeJVXaV (ORCPT ); Mon, 22 Oct 2018 19:30:21 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w9MF83Fo014796; Mon, 22 Oct 2018 17:10:51 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2n7sg5uqyx-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 22 Oct 2018 17:10:51 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DAD1E31; Mon, 22 Oct 2018 15:10:50 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BB3D65167; Mon, 22 Oct 2018 15:10:50 +0000 (GMT) Received: from SAFEX1HUBCAS21.st.com (10.75.90.44) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 22 Oct 2018 17:10:50 +0200 Received: from localhost (10.201.23.16) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 22 Oct 2018 17:10:50 +0200 From: Olivier Moysan To: , , , , , , , , , , , , Subject: [PATCH 2/2] ASoC: stm32: sai: fix master clock naming Date: Mon, 22 Oct 2018 17:10:46 +0200 Message-ID: <1540221046-11812-3-git-send-email-olivier.moysan@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540221046-11812-1-git-send-email-olivier.moysan@st.com> References: <1540221046-11812-1-git-send-email-olivier.moysan@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.16] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-22_11:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes: 8307b2afd386 ("ASoC: stm32: sai: set sai as mclk clock provider") Fix warning issued by strncat when bound equals to source length. Signed-off-by: Olivier Moysan --- sound/soc/stm/stm32_sai_sub.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c index 31d22abd3204..ea05cc91aa05 100644 --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c @@ -404,12 +404,11 @@ static int stm32_sai_add_mclk_provider(struct stm32_sai_sub_data *sai) * String after "_" char is stripped in parent name. */ p = mclk_name; - while (*s && *s != '_' && (i < (SAI_MCLK_NAME_LEN - 6))) { + while (*s && *s != '_' && (i < (SAI_MCLK_NAME_LEN - 7))) { *p++ = *s++; i++; } - STM_SAI_IS_SUB_A(sai) ? - strncat(p, "a_mclk", 6) : strncat(p, "b_mclk", 6); + STM_SAI_IS_SUB_A(sai) ? strcat(p, "a_mclk") : strcat(p, "b_mclk"); mclk->hw.init = CLK_HW_INIT(mclk_name, pname, &mclk_ops, 0); mclk->sai_data = sai; -- 2.7.4