* [PATCH] ASoc: codec tlv320aic23 fix bogus divide by 0 message
@ 2009-06-06 2:15 Troy Kisky
2009-06-06 8:30 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Troy Kisky @ 2009-06-06 2:15 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, arunks, broonie, Troy Kisky
Some code analyzer software mistakenly gives
divide by 0 error messages for these lines.
This patch will end its confusion.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
sound/soc/codecs/tlv320aic23.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 9fcbb9c..0b8dcb5 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -273,14 +273,14 @@ static const unsigned short sr_valid_mask[] = {
* Every divisor is a factor of 11*12
*/
#define SR_MULT (11*12)
-#define A(x) (x) ? (SR_MULT/x) : 0
+#define A(x) (SR_MULT/x)
static const unsigned char sr_adc_mult_table[] = {
- A(2), A(2), A(12), A(12), A(0), A(0), A(3), A(1),
- A(2), A(2), A(11), A(11), A(0), A(0), A(0), A(1)
+ A(2), A(2), A(12), A(12), 0, 0, A(3), A(1),
+ A(2), A(2), A(11), A(11), 0, 0, 0, A(1)
};
static const unsigned char sr_dac_mult_table[] = {
- A(2), A(12), A(2), A(12), A(0), A(0), A(3), A(1),
- A(2), A(11), A(2), A(11), A(0), A(0), A(0), A(1)
+ A(2), A(12), A(2), A(12), 0, 0, A(3), A(1),
+ A(2), A(11), A(2), A(11), 0, 0, 0, A(1)
};
static unsigned get_score(int adc, int adc_l, int adc_h, int need_adc,
--
1.5.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoc: codec tlv320aic23 fix bogus divide by 0 message
2009-06-06 2:15 [PATCH] ASoc: codec tlv320aic23 fix bogus divide by 0 message Troy Kisky
@ 2009-06-06 8:30 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2009-06-06 8:30 UTC (permalink / raw)
To: Troy Kisky; +Cc: tiwai, alsa-devel, arunks
On Fri, Jun 05, 2009 at 07:15:58PM -0700, Troy Kisky wrote:
> Some code analyzer software mistakenly gives
> divide by 0 error messages for these lines.
> This patch will end its confusion.
>
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-06 8:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-06 2:15 [PATCH] ASoc: codec tlv320aic23 fix bogus divide by 0 message Troy Kisky
2009-06-06 8:30 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.