mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Nicholas Krause <xerofoify@gmail.com>
Cc: clemens@ladisch.de, perex@perex.cz, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sound:pci:Change return type of function,shift_bits in xonar_dg.c to avoid overflow
Date: Thu, 12 Mar 2015 07:33:20 +0100	[thread overview]
Message-ID: <s5hlhj2n2rz.wl-tiwai@suse.de> (raw)
In-Reply-To: <1426134946-21167-1-git-send-email-xerofoify@gmail.com>

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@gmail.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
> 

           reply	other threads:[~2015-03-12  6:33 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1426134946-21167-1-git-send-email-xerofoify@gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hlhj2n2rz.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=xerofoify@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®