Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1786569pxf; Fri, 26 Mar 2021 15:01:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwA76cecNsbp82phoCANIUv8k0zFCYJdQhG2qO8EPUfbUBHU3rgaOVHdahaDrMPBgVbFdTl X-Received: by 2002:aa7:cc03:: with SMTP id q3mr17829580edt.366.1616796115715; Fri, 26 Mar 2021 15:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616796115; cv=none; d=google.com; s=arc-20160816; b=NPkkWZS1AcndCMEgCKlJRAtxHA7zUvLoOyoDl31l+rOiAAxbQLiomScLLKTd0jatOJ zS6Vfx6uzH+5lCkRDLCZ3QJi/AKO/DBP8A/tR14EyDgCY+orD+npgUPtAtgqc2V3t0nC eXU07m7SVoWElc2IqlnWEGmJuwspp2XGF7e2u5uYEQ0d6/wF8M0BQFXMX+kUBGxnvax/ xHe9cq6XP2ABqKFhb7towT382wmQB9i68QTVVxzENAH9A40HRhyoqJ9rUuBGd2VCFNTY +C2i8CHeQ3hHtl72myWvxAydXJAk6oL78jX3vEmS3Tuog73HvPiR3j828DmYrb/k6dbk vO0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=c1pGiF/+XlhjQxyUHqs410C313Sti7gbHPThlsI+ASs=; b=GRQ4is4sVnrSo+hRBDb96EFzGpck8PBLP9mYcdFCQXHnS2qwX5ybgoTqudKpOkuCbX +12FyRL/VtIxbHPVJQOPvkC0+p5rUOH6phLZj32emBWBR3WxqrY0YRVpKUE+SpkY5svd UFXLAeK2CNnRdA3m2MLcypX86vSGP7NgQuSBxiNRpmSw9v3b+qbJZZ9gGsM9DAm1wCiH vH5SVlAC84MYVZn5XXhEaTFJDCzM1hrWuOj6eB8jPqWE5NneYYNeHUjcQMHXAZwHNL36 qOqzBtjJk+DBR8wqaxBKJrnGk14i9Uy/RKvtm3oU0SuYCz5iK+pw5IP+Zs2WbZjO4XoY D4Rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o6si9910357edi.504.2021.03.26.15.01.33; Fri, 26 Mar 2021 15:01:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230521AbhCZWAo (ORCPT + 99 others); Fri, 26 Mar 2021 18:00:44 -0400 Received: from mga04.intel.com ([192.55.52.120]:61331 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230347AbhCZWAJ (ORCPT ); Fri, 26 Mar 2021 18:00:09 -0400 IronPort-SDR: ZGFxeqaQ6RBAigXInpCD7Uwhy9zbdh6xFq67vXvdiDO+jjR5GfqxywGRBMpKnsMlIVhplc2fAx EmY3SLIshxYg== X-IronPort-AV: E=McAfee;i="6000,8403,9935"; a="188957093" X-IronPort-AV: E=Sophos;i="5.81,281,1610438400"; d="scan'208";a="188957093" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 15:00:09 -0700 IronPort-SDR: CzeTxe0xAsNYaajyRxXKP2vOoum6MEbKQdiHKYSUG2P2g6L9+x50WpB4rDhgJKJfOR1gxYDezG 0sb/3cg5pXZw== X-IronPort-AV: E=Sophos;i="5.81,281,1610438400"; d="scan'208";a="416706835" Received: from zcmahone-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.255.231.203]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 15:00:07 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org, Pierre-Louis Bossart , Olivier Moysan , Arnaud Pouliquen , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Maxime Coquelin , Alexandre Torgue , linux-stm32@st-md-mailman.stormreply.com (moderated list:ARM/STM32 ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:ARM/STM32 ARCHITECTURE) Subject: [PATCH 10/17] ASoC: stm: stm32_adfsdm: fix snprintf format string Date: Fri, 26 Mar 2021 16:59:20 -0500 Message-Id: <20210326215927.936377-11-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com> References: <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cppcheck warning: sound/soc/stm/stm32_adfsdm.c:120:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] snprintf(str_freq, sizeof(str_freq), "%d\n", freq); ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/stm/stm32_adfsdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c index 47fae8dd20b4..e6078f50e508 100644 --- a/sound/soc/stm/stm32_adfsdm.c +++ b/sound/soc/stm/stm32_adfsdm.c @@ -117,7 +117,7 @@ static int stm32_adfsdm_set_sysclk(struct snd_soc_dai *dai, int clk_id, /* Set IIO frequency if CODEC is master as clock comes from SPI_IN */ - snprintf(str_freq, sizeof(str_freq), "%d\n", freq); + snprintf(str_freq, sizeof(str_freq), "%u\n", freq); size = iio_write_channel_ext_info(priv->iio_ch, "spi_clk_freq", str_freq, sizeof(str_freq)); if (size != sizeof(str_freq)) { -- 2.25.1