FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	is_end_tag - Check if a vpd tag is the end tag.
 *	@adapter: the adapter
 *	@offset: first byte offset of the tag
 *
 *	Checks if the tag located at offset is the end tag.
 */
Check if a vpd tag is the end tag.
@adapter: the adapter
@offset: first byte offset of the tag

Checks if the tag located at offset is the end tag.
Check if a vpd tag is the end tag . @adapter : the adapter @offset : first byte offset of the tag Checks if the tag located at offset is the end tag .
static int is_end_tag(adapter_t * adapter, u32 offset)
{
	u32 read_offset, shift, ret, tmp;
	u8 buf[4];
	read_offset = offset & 0xfffffffc;
	shift = offset & 0x03;
	ret = t3_seeprom_read(adapter, read_offset, &tmp);
	if (ret)
		return ret;
	*((u32 *)buf) = cpu_to_le32(tmp);
	if (buf[shift] == 0x78)
		return 1;
	else
		return 0;
}
static int is_end_tag ( adapter_t * adapter , u32 offset ) { u32 read_offset , shift , ret , tmp ; u8 buf [ 4 ] ; read_offset = offset & 0xfffffffc ; shift = offset & 0x03 ; ret = t3_seeprom_read ( adapter , read_offset , & tmp ) ; if ( ret ) return ret ; * ( ( u32 * ) buf ) = cpu_to_le32 ( tmp ) ; if ( buf [ shift ] == 0x78 ) return 1 ; else return 0 ; }
is_end_tag - Check if a vpd tag is the end tag.
is_end_tag - Check if a vpd tag is the end tag .