From patchwork Fri Mar 15 07:17:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AS50 KCHSU0 X-Patchwork-Id: 10854143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B660C1515 for ; Fri, 15 Mar 2019 07:19:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92C722A872 for ; Fri, 15 Mar 2019 07:19:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86C202A876; Fri, 15 Mar 2019 07:19:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 439712A875 for ; Fri, 15 Mar 2019 07:19:00 +0000 (UTC) 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 C442E845; Fri, 15 Mar 2019 08:18:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C442E845 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1552634337; bh=PK4A5zqiQoRqHIIG1jaYCLtm5KNziPFZjkZwueDF7iA=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=cIAi/EZodLdcHhqRYRi9/walT5ptZZD651NYc48BEkGmgCwNVkpSaYOTWo9bvHfnr 7fsRyAU5QB9schVTqZsZJvh3yCe4gz72ktkrf861YMLKhCH/0mBatDtG2StqzYf7Yv OCqHMas8ohVMhtUYe5VnOftCftQeZ/URZP/SVVXg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3BFEBF896F3; Fri, 15 Mar 2019 08:18:07 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 81F76F89701; Fri, 15 Mar 2019 08:18:04 +0100 (CET) Received: from maillog.nuvoton.com (maillog.nuvoton.com [202.39.227.15]) by alsa1.perex.cz (Postfix) with ESMTP id 8E528F896B2 for ; Fri, 15 Mar 2019 08:17:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8E528F896B2 Received: from NTHCCAS01.nuvoton.com (nthccas01.nuvoton.com [10.1.8.28]) by maillog.nuvoton.com (Postfix) with ESMTP id 46A061C80CA9; Fri, 15 Mar 2019 15:17:54 +0800 (CST) Received: from NTHCML01A.nuvoton.com (10.1.8.177) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Fri, 15 Mar 2019 15:17:53 +0800 Received: from NTHCCAS01.nuvoton.com (10.1.8.28) by NTHCML01A.nuvoton.com (10.1.8.177) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Fri, 15 Mar 2019 15:17:53 +0800 Received: from localhost.localdomain (10.4.36.27) by NTHCCAS01.nuvoton.com (10.1.12.25) with Microsoft SMTP Server id 15.0.1130.7 via Frontend Transport; Fri, 15 Mar 2019 15:17:53 +0800 From: John Hsu To: Date: Fri, 15 Mar 2019 15:17:51 +0800 Message-ID: <20190315071751.3192-1-KCHSU0@nuvoton.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, WTLI@nuvoton.com, John Hsu , lgirdwood@gmail.com, YHCHuang@nuvoton.com, CTLIN0@nuvoton.com Subject: [alsa-devel] [PATCH] ASoC: nau8810: fix arm-linux-gnueabi-gcc 7.2.0 compile error 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" X-Virus-Scanned: ClamAV using ClamSMTP The patch fixes the compile error at the branch 'asoc for-5.2' as follows: compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0 ERROR: "__aeabi_uldivmod" [sound/soc/codecs/snd-soc-nau8810.ko] undefined! Signed-off-by: John Hsu --- sound/soc/codecs/nau8810.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c index 5d300b790f78..ede2030b987a 100644 --- a/sound/soc/codecs/nau8810.c +++ b/sound/soc/codecs/nau8810.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -497,6 +498,7 @@ static int nau8810_calc_pll(unsigned int pll_in, unsigned int fs, struct nau8810_pll *pll_param) { u64 f2, f2_max, pll_ratio; + u32 mclk_scaler; int i, scal_sel; if (pll_in > NAU_PLL_REF_MAX || pll_in < NAU_PLL_REF_MIN) @@ -505,7 +507,8 @@ static int nau8810_calc_pll(unsigned int pll_in, f2_max = 0; scal_sel = ARRAY_SIZE(nau8810_mclk_scaler); for (i = 0; i < ARRAY_SIZE(nau8810_mclk_scaler); i++) { - f2 = 256ULL * fs * 4 * nau8810_mclk_scaler[i] / 10; + mclk_scaler = 4 * nau8810_mclk_scaler[i] / 10; + f2 = 256ULL * fs * mclk_scaler; if (f2 > NAU_PLL_FREQ_MIN && f2 < NAU_PLL_FREQ_MAX && f2_max < f2) { f2_max = f2;