linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 2.5.59 : sound/oss/vidc.c
@ 2003-02-07 17:13 Frank Davis
  2003-02-07 19:43 ` Russell King
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Frank Davis @ 2003-02-07 17:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: fdavis, trivial

Hello all,
   The following patch addresses buzilla bug # 318, and removes an
offending semicolon. Please review for inclusion.

Regards,
Frank

--- linux/sound/oss/vidc.c.old	2003-01-16 21:21:38.000000000 -0500
+++ linux/sound/oss/vidc.c	2003-02-07 02:59:44.000000000 -0500
@@ -225,7 +225,7 @@
 			newsize = 208;
 		if (newsize > 4096)
 			newsize = 4096;
-		for (new2size = 128; new2size < newsize; new2size <<= 1);
+		for (new2size = 128; new2size < newsize; new2size <<= 1)
 			if (new2size - newsize > newsize - (new2size >> 1))
 				new2size >>= 1;
 		if (new2size > 4096) {


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH] 2.5.59 : sound/oss/vidc.c
@ 2003-02-08  0:37 Alexei Podtelezhnikov
  0 siblings, 0 replies; 12+ messages in thread
From: Alexei Podtelezhnikov @ 2003-02-08  0:37 UTC (permalink / raw)
  To: john; +Cc: linux-kernel


John Bradford (john@grabjohn.com) wrote:

> 36 < hwrate < 3332
       ^^^^^^  should be 'newsize'

Yeap, and the following couple of lines:

                /* 36 < newsize 3332; rounding it off 
                 * to the nearest power of 2, no less than 256 
                 */
                for (new2size = 384; new2size < newsize; new2size <<= 1);
                new2size -= (new2size >> 1);

safely replace the whole following block:

                if (newsize < 208)
                        newsize = 208;
                if (newsize > 4096)
                        newsize = 4096;
                for (new2size = 128; new2size < newsize; new2size <<= 1);
                        if (new2size - newsize > newsize - (new2size >> 1))
                                new2size >>= 1;
                if (new2size > 4096) {
                        printk(KERN_ERR "VIDC: error: dma buffer (%d) %d > 4K\n",
                                newsize, new2size);
                        new2size = 4096;
                }

Would somebody test this?
A.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-02-11  7:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-07 17:13 [PATCH] 2.5.59 : sound/oss/vidc.c Frank Davis
2003-02-07 19:43 ` Russell King
2003-02-07 20:03   ` John Bradford
2003-02-07 20:47     ` Richard B. Johnson
2003-02-07 21:58       ` J.A. Magallon
2003-02-07 22:20         ` Russell King
2003-02-07 22:35         ` John Bradford
2003-02-10 22:03       ` Bill Davidsen
2003-02-11  7:49         ` Horst von Brand
2003-02-07 23:54 ` Alan Cox
2003-02-10  0:23 ` Rusty Russell
2003-02-08  0:37 Alexei Podtelezhnikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).