#1944 closed defect (fixed)

c/src/libchip/serial/mc68681.c: mc68681_close is a nop

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:

Description (last modified by Joel Sherrill)

The function mc68681_close in c/src/libchip/serial/mc68681.c essentially is a nop.

MC68681_STATIC int mc68681_close(

int major,
int minor,
void *arg


uint32_t pMC68681;
uint32_t pMC68681_port;
setRegister_f setReg;

pMC68681 = Console_Port_Tbl[minor]->ulCtrlPort1;
pMC68681_port = Console_Port_Tbl[minor]->ulCtrlPort2;
setReg = Console_Port_Tbl[minor]->setRegister;


  • Disable interrupts from this channel and then disable it totally. */

#if 0

(*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_TX );
(*setReg)( pMC68681_port, MC68681_COMMAND, MC68681_MODE_REG_DISABLE_RX );




Note the "#if 0" - This #define renders the function into an obscure way to "do nothing" - Modern gcc's diagnose this and complain about it.

I don't know what to do about this issue, nor about what is intended. In particular, I don't know, if this "#if 0" is intentional or if fragments of somebody's debugging/testing have accidentially crept into the sources.

May the folks who actually use the code please comment and/or fix this ;)

Attachments (1)

pr1944.diff (1.4 KB) - added by Joel Sherrill on 10/28/11 at 12:59:15.
Remove if 0

Download all attachments as: .zip

Change History (4)

Changed on 10/28/11 at 12:59:15 by Joel Sherrill

Attachment: pr1944.diff added

Remove if 0

comment:1 Changed on 10/28/11 at 12:59:27 by Joel Sherrill

Resolution: fixed
Status: newclosed


comment:2 Changed on 11/23/14 at 19:11:40 by Joel Sherrill

Description: modified (diff)
Version: unknown4.11

comment:3 Changed on 10/10/17 at 06:35:44 by Sebastian Huber

Component: miscunspecified
Note: See TracTickets for help on using tickets.