[<prev] [next>] [day] [month] [year] [list]
Message-ID: <s5hlhj2n2rz.wl-tiwai@suse.de>
Date: Thu, 12 Mar 2015 07:33:20 +0100
From: Takashi Iwai <tiwai@...e.de>
To: Nicholas Krause <xerofoify@...il.com>
Cc: clemens@...isch.de, perex@...ex.cz, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sound:pci:Change return type of function,shift_bits in xonar_dg.c to avoid overflow
At Thu, 12 Mar 2015 00:35:46 -0400,
Nicholas Krause wrote:
>
> This changes the return type of the function,shift_bits to unsigned
> long in order to avoid overflowing issues with this function when
> called as found when running sparse on the kernel source tree.
What overflows exactly? Did you follow the code?
thanks,
Takashi
>
> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
> ---
> sound/pci/oxygen/xonar_dg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/pci/oxygen/xonar_dg.c b/sound/pci/oxygen/xonar_dg.c
> index 4cf3200..2337a76 100644
> --- a/sound/pci/oxygen/xonar_dg.c
> +++ b/sound/pci/oxygen/xonar_dg.c
> @@ -238,7 +238,7 @@ void set_cs4245_adc_params(struct oxygen *chip,
> cs4245_write_spi(chip, CS4245_MCLK_FREQ);
> }
>
> -static inline unsigned int shift_bits(unsigned int value,
> +static inline unsigned long shift_bits(unsigned int value,
> unsigned int shift_from,
> unsigned int shift_to,
> unsigned int mask)
> --
> 2.1.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists