/* Check duplicated I/O interrupt assignment table entry, to make sure there is only one entry with the given bus, device and interrupt pin.  */
static bool check_dup_entry(struct mpc_config_intsrc *intsrc_base, int entry_num, int bus, int device, int pin)
/* Check duplicated I/O interrupt assignment table entry, to make sure there is only one entry with the given bus, device and interrupt pin.  */
static bool check_dup_entry(struct mpc_config_intsrc *intsrc_base, int entry_num, int bus, int device, int pin)
{
	struct mpc_config_intsrc *intsrc = intsrc_base;
	int i;
	for (i = 0; i < entry_num; i++) {
		if (intsrc->mpc_srcbus == bus &&
		    intsrc->mpc_srcbusirq == ((device << 2) | (pin - 1)))
			break;
		intsrc++;
	}
	return (i == entry_num) ? false : true;
}