From patchwork Thu Dec 13 15:44:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10729031 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 6ED0816B1 for ; Thu, 13 Dec 2018 15:44:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E8592C5AF for ; Thu, 13 Dec 2018 15:44:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 528562C5B9; Thu, 13 Dec 2018 15:44:46 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B3D42C5AF for ; Thu, 13 Dec 2018 15:44:45 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9BF17267C3D; Thu, 13 Dec 2018 16:44:43 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id F2149267C4D; Thu, 13 Dec 2018 16:44:40 +0100 (CET) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by alsa0.perex.cz (Postfix) with ESMTP id C0932267A79 for ; Thu, 13 Dec 2018 16:44:37 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id q26so2839626wmf.5 for ; Thu, 13 Dec 2018 07:44:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bDJIH6gC/LNEwkSD74Pi8XnlAWHkZTuEbFylymG13pc=; b=qJn2AdAoxREYaQcjOjhR0DorWHhTmDoJwyrJh7qxs77uuI68vkmSDOp4z0ns/JDqfP lHNNsFGdoGW8MaZ2R8AVvHunq/zvcZ3q7RkEZH9Qj4es3g07JfXfesyAh0GNvmtO/u4L Fw7V7+wQWroZP0JdrwQn+hOXP5n+ahtmo4XNztElalfp1ytXV6Jq8jTwvb781FcsivWk /QcdK3g15KHA7DCYrPA9e0Jyz4neLkVKsN611yl57kJdSZdyzZmOVVFqGpx3+fDPDej/ uUHyx1ZaFxsKyW8ZYr1+CPkIrkaoWpapBJErTimxBO556QgzXn8ovvgJtBvPyMIESo4F Aa4A== 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:mime-version :content-transfer-encoding; bh=bDJIH6gC/LNEwkSD74Pi8XnlAWHkZTuEbFylymG13pc=; b=hLrWh1WoLZhby6lmoQrHDzaycs8bis/rwd9hlXHol66rJpdlUibNKJ0OZmDEn3KRwq ajyroAaArPGfp7GkhRIGG0axIizPxBrzyYPmsz8q1dhVvtY+nhRbt8ktRspHclXoWCIX 8j/4mXfRrpubyw09EmGLObs1R0425KpLDxxgSv/9OIC/D37X7mLvV2UoQe85PzeKAskR lLKWANUyEyiwSXocScBJpV2yDs59yKKoX4EX2vL+f72YCvdDdNzwiZC79+/loGNTUkWj SckZcURkN2Fsycfn0cyCs0svifYoLMrf3cqG1zm9IdfQ2o+9UVbdsgzLi/V7cxFgWuip 8cgQ== X-Gm-Message-State: AA+aEWY7GtEm4e/VjQnC60E7cqmZLHLDtGLFuPJBW8syKYelTmvyqAsf oNOiHfPOIFYWl0GSL35lppVhN1wWHtE= X-Google-Smtp-Source: AFSGD/XYCmymPdAeC9TKrmdi1jaA4dlFVsYV7KIEFvLN4C6tUH0Vy7ajHx1wHgIP2DuHQHuW4oRiog== X-Received: by 2002:a1c:8acd:: with SMTP id m196mr10910274wmd.120.1544715877324; Thu, 13 Dec 2018 07:44:37 -0800 (PST) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id p74sm3118235wmd.29.2018.12.13.07.44.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Dec 2018 07:44:36 -0800 (PST) From: Jerome Brunet To: Mark Brown , Kevin Hilman , Carlo Caione Date: Thu, 13 Dec 2018 16:44:28 +0100 Message-Id: <20181213154428.6070-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Jerome Brunet Subject: [alsa-devel] [PATCH] ASoC: meson: fix do_div warning in spdifin X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Even if this spdif input driver is only supposed to be used on 64bits platform, there is possible problem with 32bits and do_div, as reported by the kbuild robot. Just fix it. Fixes: 5ce5658375e6 ("ASoC: meson: add axg spdif input") Signed-off-by: Jerome Brunet --- Hi Mark, This fixes the problem reported by kbuild robot [0]. Sorry for not catching this earlier. Regards Jerome [0]: https://lkml.kernel.org/r/201812132245.lBYydcs3%fengguang.wu@intel.com sound/soc/meson/axg-spdifin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/meson/axg-spdifin.c b/sound/soc/meson/axg-spdifin.c index 09f385a2bbba..01b2035fa841 100644 --- a/sound/soc/meson/axg-spdifin.c +++ b/sound/soc/meson/axg-spdifin.c @@ -146,8 +146,8 @@ static void axg_spdifin_write_mode_param(struct regmap *map, int mode, unsigned int base_reg, unsigned int width) { - unsigned int offset = mode, rem; - unsigned int reg, shift; + uint64_t offset = mode; + unsigned int reg, shift, rem; rem = do_div(offset, num_per_reg);