[PATCH] OSS: cs46xx cleanup and tiny bugfix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here's a patch for cs46xx that 
 - (mostly) cleans up the cs46xx driver according to CodingStyle
 - removes a bunch of pointless casts
 - fixes a small, potential use of uninitialized variable, bug
 - reduces the size of the compiled code by 36 bytes
 - reduces the size of the source file by 1831 bytes

I know I should probably have split this into bits, but since I only 
thought of that *after* doing all the edits, splitting it up would have 
been a royal pain. And since these are all pretty trivial changes I thought
I'd just submit the one huge patch and hope people could live with it (if 
not, then just tell me and I'll split it).

The bug fix that's in there may be hard to spot, so I'll point it out. It's 
the 
   -       int val, valsave, mapped, ret;
   +       int val, valsave, ret;
   +       int mapped = 0;
bit.
Without that change we may use `mapped' uninitialized if, in cs_ioctl, the 
first test of "if(state)" is false and the second "if(state)" test is true.

Patch is compile tested.

Due to the size of the patch (98838 bytes) I'm not including it inline in 
this email, but have instead attached it as a bzip2 compressed file.


Signed-off-by: Jesper Juhl <[email protected]>

 sound/oss/cs46xx.c | 1272 ++++++++++++++++++++---------------------------------
 1 files changed, 489 insertions(+), 783 deletions(-)

Attachment: cs46xx-cleanup.patch.bz2
Description: BZip2 compressed data


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux