From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,INCLUDES_PULL_REQUEST, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48E6FC433DF for ; Tue, 2 Jun 2020 16:43:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1A312068D for ; Tue, 2 Jun 2020 16:43:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="kWAbUG9o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1A312068D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 533EE1612; Tue, 2 Jun 2020 18:42:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 533EE1612 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591116206; bh=FaFhbxtLsRlYrlm+f+IxhZdPaYHN2sPrJBskAb8FFp4=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kWAbUG9oL87vlhYcv48XPelZJNh6Un3qK2RsVvXlQGssfSJECPzamLsDmHxq/EYbe chkf1Ia7Ax00tPKdjmokI+b56IykHcA0j897Ze7TNp+TJ4hpG86OXOffU+XC3p7x1e n0yUrtSp6NxU0XtLilAOLwKb1juP0Mhgj76PKTIc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CB404F80260; Tue, 2 Jun 2020 18:42:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 510B4F8026F; Tue, 2 Jun 2020 18:42:33 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6AD6EF800BC for ; Tue, 2 Jun 2020 18:42:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6AD6EF800BC X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3CBAAAEC2; Tue, 2 Jun 2020 16:42:28 +0000 (UTC) Date: Tue, 02 Jun 2020 18:42:25 +0200 Message-ID: From: Takashi Iwai To: Mark Brown Subject: Re: [GIT PULL] ASoC updates for v5.8 In-Reply-To: References: <20200601121323.GB45647@sirena.org.uk> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: alsa-devel@alsa-project.org, Steve Lee , Liam Girdwood X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 01 Jun 2020 23:17:59 +0200, Takashi Iwai wrote: > > On Mon, 01 Jun 2020 20:44:55 +0200, > Takashi Iwai wrote: > > > > On Mon, 01 Jun 2020 14:13:23 +0200, > > Mark Brown wrote: > > > > > > The following changes since commit 9cb1fd0efd195590b828b9b865421ad345a4a145: > > > > > > Linux 5.7-rc7 (2020-05-24 15:32:54 -0700) > > > > > > are available in the Git repository at: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/asoc-v5.8 > > > > > > for you to fetch changes up to 358c7c61fd04d324f83d7968daf8dd9a6ff86a9a: > > > > > > Merge remote-tracking branch 'asoc/for-5.8' into asoc-linus (2020-06-01 13:01:15 +0100) > > > > > > ---------------------------------------------------------------- > > > ASoC: Updates for v5.8 > > > > > > This has been another very active release with a bunch of new drivers, > > > lots of fixes everywhere and continued core improvements from > > > Morimoto-san: > > > > > > - Lots of core cleanups and refactorings from Morimoto-san, factoring > > > out common operations and making the card abstraction more solid. > > > - Continued work on cleaning up and improving the Intel drivers, along > > > with some new platform support for them. > > > - Fixes to make the Marvell SSPA driver work upstream. > > > - Support for AMD Renoir ACP, Dialog DA7212, Freescale EASRC and > > > i.MX8M, Intel Elkhard Lake, Maxim MAX98390, Nuvoton NAU8812 and > > > NAU8814 and Realtek RT1016. > > > > Pulled now. Thanks. > > BTW, this pull request caused a compile warning: > sound/soc/codecs/max98390.c: In function ‘max98390_dsm_init’: > sound/soc/codecs/max98390.c:781:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘size_t {aka const unsigned int}’ [-Wformat=] > > This should be fixed by the correct qualifier 'z' instead of 'l'. Since no one reacts: below is the quick fix. I'll resubmit later via git-send-email. But, looking more at the code around that line, I could spot many other bugs. You cannot trust the firmware file and you must check the size. The current code can trigger out-of-bound accesses and crash very easily when a malformed firmware file is tossed; e.g. just put an empty file (or a huge file) as dsm_param.bin. Steve, could you fix it quickly, so that we can cover it for rc1? thanks, Takashi -- 8< -- From: Takashi Iwai Subject: [PATCH] ASoC: max98390: Fix incorrect printf qualifier This patch addresses a compile warning: sound/soc/codecs/max98390.c:781:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘size_t {aka const unsigned int}’ [-Wformat=] Fixes: a6e3f4f34cdb ("ASoC: max98390: Added Amplifier Driver") Signed-off-by: Takashi Iwai --- sound/soc/codecs/max98390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/max98390.c b/sound/soc/codecs/max98390.c index b9ce44dda886..be7cd0aeb6a6 100644 --- a/sound/soc/codecs/max98390.c +++ b/sound/soc/codecs/max98390.c @@ -778,7 +778,7 @@ static int max98390_dsm_init(struct snd_soc_component *component) } dev_dbg(component->dev, - "max98390: param fw size %ld\n", + "max98390: param fw size %zd\n", fw->size); dsm_param = (char *)fw->data; dsm_param += MAX98390_DSM_PAYLOAD_OFFSET; -- 2.16.4