Commit def9391c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ip2main.c warning fixes

With Eric's "i386: Add a temporary to make put_user more type safe" patch we
get a pile of warnings out of ip2m1in.c:

drivers/char/ip2main.c: In function `ip2_ipl_ioctl':
drivers/char/ip2main.c:2910: warning: assignment makes integer from pointer without a cast
drivers/char/ip2main.c:2911: warning: assignment makes integer from pointer without a cast
drivers/char/ip2main.c:2912: warning: assignment makes integer from pointer without a cast
etc.

This ioctl is copying the kernel virtual address of a large number of
functions out to userspace.  Heaven knows why.

Rather than fixing the warnings, I think we'll just nuke that code.

The patch also fixes a couple of `defined but not used' warnings.

Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6d94074f
...@@ -139,7 +139,6 @@ static UCHAR ct79[] = { 2, BYP, 0x4F,0 }; // XMIT_NOW ...@@ -139,7 +139,6 @@ static UCHAR ct79[] = { 2, BYP, 0x4F,0 }; // XMIT_NOW
//static UCHAR ct86[]={ 2, BTH, 0x56,0 }; // RCV_ENABLE //static UCHAR ct86[]={ 2, BTH, 0x56,0 }; // RCV_ENABLE
static UCHAR ct87[] = { 1, BYP, 0x57 }; // HW_TEST static UCHAR ct87[] = { 1, BYP, 0x57 }; // HW_TEST
//static UCHAR ct88[]={ 3, BTH, 0x58,0,0 }; // RCV_THRESHOLD //static UCHAR ct88[]={ 3, BTH, 0x58,0,0 }; // RCV_THRESHOLD
static UCHAR ct89[]={ 1, BYP, 0x59 }; // DSS_NOW
//static UCHAR ct90[]={ 3, BYP, 0x5A,0,0 }; // Set SILO //static UCHAR ct90[]={ 3, BYP, 0x5A,0,0 }; // Set SILO
//static UCHAR ct91[]={ 2, BYP, 0x5B,0 }; // timed break //static UCHAR ct91[]={ 2, BYP, 0x5B,0 }; // timed break
......
...@@ -2906,65 +2906,16 @@ ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg ) ...@@ -2906,65 +2906,16 @@ ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg )
rc = -EINVAL; rc = -EINVAL;
break; break;
case 3: // Trace device case 3: // Trace device
if ( cmd == 1 ) { /*
rc = put_user(iiSendPendingMail, pIndex++ ); * akpm: This used to write a whole bunch of function addresses
rc = put_user(i2InitChannels, pIndex++ ); * to userspace, which generated lots of put_user() warnings.
rc = put_user(i2QueueNeeds, pIndex++ ); * I killed it all. Just return "success" and don't do
rc = put_user(i2QueueCommands, pIndex++ ); * anything.
rc = put_user(i2GetStatus, pIndex++ ); */
rc = put_user(i2Input, pIndex++ ); if (cmd == 1)
rc = put_user(i2InputFlush, pIndex++ ); rc = 0;
rc = put_user(i2Output, pIndex++ ); else
rc = put_user(i2FlushOutput, pIndex++ );
rc = put_user(i2DrainWakeup, pIndex++ );
rc = put_user(i2DrainOutput, pIndex++ );
rc = put_user(i2OutputFree, pIndex++ );
rc = put_user(i2StripFifo, pIndex++ );
rc = put_user(i2StuffFifoBypass, pIndex++ );
rc = put_user(i2StuffFifoFlow, pIndex++ );
rc = put_user(i2StuffFifoInline, pIndex++ );
rc = put_user(i2ServiceBoard, pIndex++ );
rc = put_user(serviceOutgoingFifo, pIndex++ );
// rc = put_user(ip2_init, pIndex++ );
rc = put_user(ip2_init_board, pIndex++ );
rc = put_user(find_eisa_board, pIndex++ );
rc = put_user(set_irq, pIndex++ );
rc = put_user(ip2_interrupt, pIndex++ );
rc = put_user(ip2_poll, pIndex++ );
rc = put_user(service_all_boards, pIndex++ );
rc = put_user(do_input, pIndex++ );
rc = put_user(do_status, pIndex++ );
#ifndef IP2DEBUG_OPEN
rc = put_user(0, pIndex++ );
#else
rc = put_user(open_sanity_check, pIndex++ );
#endif
rc = put_user(ip2_open, pIndex++ );
rc = put_user(ip2_close, pIndex++ );
rc = put_user(ip2_hangup, pIndex++ );
rc = put_user(ip2_write, pIndex++ );
rc = put_user(ip2_putchar, pIndex++ );
rc = put_user(ip2_flush_chars, pIndex++ );
rc = put_user(ip2_write_room, pIndex++ );
rc = put_user(ip2_chars_in_buf, pIndex++ );
rc = put_user(ip2_flush_buffer, pIndex++ );
//rc = put_user(ip2_wait_until_sent, pIndex++ );
rc = put_user(0, pIndex++ );
rc = put_user(ip2_throttle, pIndex++ );
rc = put_user(ip2_unthrottle, pIndex++ );
rc = put_user(ip2_ioctl, pIndex++ );
rc = put_user(0, pIndex++ );
rc = put_user(get_serial_info, pIndex++ );
rc = put_user(set_serial_info, pIndex++ );
rc = put_user(ip2_set_termios, pIndex++ );
rc = put_user(ip2_set_line_discipline, pIndex++ );
rc = put_user(set_params, pIndex++ );
} else {
rc = -EINVAL; rc = -EINVAL;
}
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment