From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755653AbdKGBQU (ORCPT ); Mon, 6 Nov 2017 20:16:20 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:52491 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755219AbdKFXyI (ORCPT ); Mon, 6 Nov 2017 18:54:08 -0500 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Arnd Bergmann" , "Timur Tabi" , "Mark Brown" Date: Mon, 06 Nov 2017 23:03:02 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 220/294] ASoC: fsl-ssi: fix do_div build warning in fsl_ssi_set_bclk() In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.50-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Timur Tabi commit acf2c60a60b3d6d7080854b9483f37d99ded9b23 upstream. do_div() requires that the first parameter is a 64-bit integer, which but clkrate was defined as an unsigned long. This caused the following warnings: CC sound/soc/fsl/fsl_ssi.o sound/soc/fsl/fsl_ssi.c: In function 'fsl_ssi_set_bclk': sound/soc/fsl/fsl_ssi.c:593:3: warning: comparison of distinct pointer types lacks a cast sound/soc/fsl/fsl_ssi.c:593:3: warning: right shift count >= width of type sound/soc/fsl/fsl_ssi.c:593:3: warning: passing argument 1 of '__div64_32' from incompatible pointer type include/asm-generic/div64.h:35:17: note: expected 'uint64_t *' but argument is of type 'long unsigned int *' Signed-off-by: Timur Tabi Signed-off-by: Mark Brown Signed-off-by: Arnd Bergmann Signed-off-by: Ben Hutchings --- sound/soc/fsl/fsl_ssi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -590,8 +590,8 @@ static int fsl_ssi_set_bclk(struct snd_p else clkrate = clk_round_rate(ssi_private->baudclk, tmprate); - do_div(clkrate, factor); - afreq = (u32)clkrate / (i + 1); + clkrate /= factor; + afreq = clkrate / (i + 1); if (freq == afreq) sub = 0;