XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_tx.c
static int XHdcp1x_TxIsKsvValid(u64 Ksv)
{
	int IsValid = FALSE;
	int NumOnes = 0;

	/* Determine NumOnes */
	while (Ksv != 0) {
		if ((Ksv & 1) != 0) {
			NumOnes++;
		}
		Ksv >>= 1;
	}

	/* Check for 20 1s */
	if (NumOnes == 20) {
		IsValid = TRUE;
	}

	return (IsValid);
}
/*****************************************************************************/
/**
* This function validates a KSV value as having 20 1s and 20 0s.
*
* @param	Ksv is the value to validate.
*
* @return	Truth value indicating valid (TRUE) or not (FALSE).
*
* @note		None.
*
******************************************************************************/
This function validates a KSV value as having 20 1s and 20 0s.
This function validates a KSV value as having 20 1s and 20 0s .
static int XHdcp1x_TxIsKsvValid(u64 Ksv)
{
	int IsValid = FALSE;
	int NumOnes = 0;
	while (Ksv != 0) {
		if ((Ksv & 1) != 0) {
			NumOnes++;
		}
		Ksv >>= 1;
	}
	if (NumOnes == 20) {
		IsValid = TRUE;
	}
	return (IsValid);
}
static int XHdcp1x_TxIsKsvValid ( u64 Ksv ) { int IsValid = FALSE ; int NumOnes = 0 ; while ( Ksv != 0 ) { if ( ( Ksv & 1 ) != 0 ) { NumOnes ++ ; } Ksv >>= 1 ; } if ( NumOnes == 20 ) { IsValid = TRUE ; } return ( IsValid ) ; }
This function validates a KSV value as having 20 1s and 20 0s.
This function validates a KSV value as having 20 1s and 20 0s .
/* Determine NumOnes */ /* Check for 20 1s */