Staging: dt3155: fix coding style issue in dt3155_isr.c

This is a patch to the dt3155_isr.c file that fixes up a coding
style warning and errors found by the checkpatch.pl tool

Signed-off-by: Gorskin Ilya <revent82@gmail.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Gorskin Ilya
2010-03-14 00:35:17 +05:00
committed by Greg Kroah-Hartman
parent b6595dd110
commit 484d3be1bd

View File

@@ -79,7 +79,7 @@ struct dt3155_fbuffer_s *dt3155_fbuffer[MAXBOARDS] = {NULL
***************************/
inline bool are_empty_buffers(int m)
{
return ( dt3155_fbuffer[ m ]->empty_len );
return dt3155_fbuffer[m]->empty_len;
}
/**************************
@@ -126,7 +126,7 @@ inline bool is_ready_buf_empty( int m )
*************************/
inline bool is_ready_buf_full(int m)
{
return ( dt3155_fbuffer[ m ]->ready_len == dt3155_fbuffer[ m ]->nbuffers );
return dt3155_fbuffer[m]->ready_len == dt3155_fbuffer[m]->nbuffers;
}
/*****************************************************
@@ -153,10 +153,10 @@ inline void push_ready( int m, int index )
*****************************************************/
static inline int get_tail(int m)
{
return ((dt3155_fbuffer[ m ]->ready_head -
return (dt3155_fbuffer[m]->ready_head -
dt3155_fbuffer[m]->ready_len +
dt3155_fbuffer[m]->nbuffers)%
(dt3155_fbuffer[ m ]->nbuffers));
(dt3155_fbuffer[m]->nbuffers);
}
@@ -192,15 +192,13 @@ inline void printques( int m )
tail = get_tail(m);
printk("\n R:");
for ( index = tail; index != head; index++, index = index % (num) )
{
for (index = tail; index != head; index++, index = index % (num)) {
frame_index = dt3155_fbuffer[m]->ready_que[index];
printk(" %d ", frame_index);
}
printk("\n E:");
for ( index = 0; index < dt3155_fbuffer[ m ]->empty_len; index++ )
{
for (index = 0; index < dt3155_fbuffer[m]->empty_len; index++) {
frame_index = dt3155_fbuffer[m]->empty_buffers[index];
printk(" %d ", frame_index);
}
@@ -220,7 +218,8 @@ inline void printques( int m )
* the start address up to the beginning of the
* next 4MB chunk (assuming bufsize < 4MB).
*****************************************************/
u32 adjust_4MB (u32 buf_addr, u32 bufsize) {
u32 adjust_4MB(u32 buf_addr, u32 bufsize)
{
if (((buf_addr+bufsize) & UPPER_10_BITS) != (buf_addr & UPPER_10_BITS))
return (buf_addr+bufsize) & UPPER_10_BITS;
else
@@ -312,8 +311,7 @@ u32 dt3155_setup_buffers(u32 *allocatorAddr)
int m; /* minor # of device, looped for all devs */
/* zero the fbuffer status and address structure */
for ( m = 0; m < ndevices; m++)
{
for (m = 0; m < ndevices; m++) {
dt3155_fbuffer[m] = &(dt3155_status[m].fbuffer);
/* Make sure the buffering variables are consistent */
@@ -329,8 +327,7 @@ u32 dt3155_setup_buffers(u32 *allocatorAddr)
printk("DT3155: mem info\n");
printk(" - rambuf_addr = 0x%x\n", rambuff_addr);
printk(" - length (kb) = %u\n", rambuff_size);
if( rambuff_addr == 0 )
{
if (rambuff_addr == 0) {
printk(KERN_INFO
"DT3155: Error setup_buffers() allocator dma failed\n");
return -ENOMEM;
@@ -360,15 +357,13 @@ u32 dt3155_setup_buffers(u32 *allocatorAddr)
/* now that we have board memory we spit it up */
/* between the boards and the buffers */
rambuff_acm = rambuff_addr;
for ( m = 0; m < ndevices; m ++)
{
for (m = 0; m < ndevices; m++) {
rambuff_acm = adjust_4MB(rambuff_acm, bufsize);
/* Save the start of this boards buffer space (for mmap). */
dt3155_status[m].mem_addr = rambuff_acm;
for (index = 0; index < numbufs; index++)
{
for (index = 0; index < numbufs; index++) {
rambuff_acm = adjust_4MB(rambuff_acm, bufsize);
if (rambuff_acm + bufsize > rambuff_end) {
/* Should never happen */
@@ -418,8 +413,7 @@ u32 dt3155_setup_buffers(u32 *allocatorAddr)
static inline void internal_release_locked_buffer(int m)
{
/* Pointer into global structure for handling buffers */
if ( dt3155_fbuffer[ m ]->locked_buf >= 0 )
{
if (dt3155_fbuffer[m]->locked_buf >= 0) {
push_empty(dt3155_fbuffer[m]->locked_buf, m);
dt3155_fbuffer[m]->locked_buf = -1;
}
@@ -500,8 +494,7 @@ inline int dt3155_get_ready_buffer( int m )
if (is_ready_buf_empty(m))
frame_index = -1;
else
{
else {
frame_index = pop_ready(m);
dt3155_fbuffer[m]->locked_buf = frame_index;
}