#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:
Blocking:

Description (last modified by Joel Sherrill)

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

<cite>
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 );

#endif

return(RTEMS_SUCCESSFUL);

}
</cite>

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 Oct 28, 2011 at 12:59:15 PM.
Remove if 0

Download all attachments as: .zip

Change History (4)

Changed on Oct 28, 2011 at 12:59:15 PM by Joel Sherrill

Attachment: pr1944.diff added

Remove if 0

comment:1 Changed on Oct 28, 2011 at 12:59:27 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Committed.

comment:2 Changed on Nov 23, 2014 at 7:11:40 PM by Joel Sherrill

Description: modified (diff)
Version: unknown4.11

comment:3 Changed on Oct 10, 2017 at 6:35:44 AM by Sebastian Huber

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