x86: fsp: Drop get_hob_type() and get_hob_length()

These two are not worth having separate inline functions as they are
really simple, so drop them.

Also changed 'type' parameter of fsp_get_next_hob() from u16 to uint.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/x86/cpu/queensbay/fsp_support.c b/arch/x86/cpu/queensbay/fsp_support.c
index 4764e3c..aed3e2b 100644
--- a/arch/x86/cpu/queensbay/fsp_support.c
+++ b/arch/x86/cpu/queensbay/fsp_support.c
@@ -242,7 +242,7 @@
 	/* * Collect memory ranges */
 	top = FSP_LOWMEM_BASE;
 	while (!end_of_hob(hdr)) {
-		if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) {
+		if (hdr->type == HOB_TYPE_RES_DESC) {
 			res_desc = (struct hob_res_desc *)hdr;
 			if (res_desc->type == RES_SYS_MEM) {
 				phys_start = res_desc->phys_start;
@@ -271,7 +271,7 @@
 	/* Collect memory ranges */
 	top = FSP_HIGHMEM_BASE;
 	while (!end_of_hob(hdr)) {
-		if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) {
+		if (hdr->type == HOB_TYPE_RES_DESC) {
 			res_desc = (struct hob_res_desc *)hdr;
 			if (res_desc->type == RES_SYS_MEM) {
 				phys_start = res_desc->phys_start;
@@ -297,7 +297,7 @@
 
 	/* Collect memory ranges */
 	while (!end_of_hob(hdr)) {
-		if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) {
+		if (hdr->type == HOB_TYPE_RES_DESC) {
 			res_desc = (struct hob_res_desc *)hdr;
 			if (res_desc->type == RES_MEM_RESERVED) {
 				if (compare_guid(&res_desc->owner, guid)) {
@@ -342,7 +342,7 @@
 	return base;
 }
 
-const struct hob_header *fsp_get_next_hob(u16 type, const void *hob_list)
+const struct hob_header *fsp_get_next_hob(uint type, const void *hob_list)
 {
 	const struct hob_header *hdr;
 
@@ -350,7 +350,7 @@
 
 	/* Parse the HOB list until end of list or matching type is found */
 	while (!end_of_hob(hdr)) {
-		if (get_hob_type(hdr) == type)
+		if (hdr->type == type)
 			return hdr;
 
 		hdr = get_next_hob(hdr);
diff --git a/arch/x86/cpu/queensbay/tnc_dram.c b/arch/x86/cpu/queensbay/tnc_dram.c
index b669dbc..df79a39 100644
--- a/arch/x86/cpu/queensbay/tnc_dram.c
+++ b/arch/x86/cpu/queensbay/tnc_dram.c
@@ -19,7 +19,7 @@
 
 	hdr = gd->arch.hob_list;
 	while (!end_of_hob(hdr)) {
-		if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) {
+		if (hdr->type == HOB_TYPE_RES_DESC) {
 			res_desc = (struct hob_res_desc *)hdr;
 			if (res_desc->type == RES_SYS_MEM ||
 			    res_desc->type == RES_MEM_RESERVED) {
@@ -63,7 +63,7 @@
 	hdr = gd->arch.hob_list;
 
 	while (!end_of_hob(hdr)) {
-		if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) {
+		if (hdr->type == HOB_TYPE_RES_DESC) {
 			res_desc = (struct hob_res_desc *)hdr;
 			entries[num_entries].addr = res_desc->phys_start;
 			entries[num_entries].size = res_desc->len;
diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h b/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h
index 5110361..6cca7f5 100644
--- a/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h
+++ b/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h
@@ -183,36 +183,6 @@
 };
 
 /**
- * get_hob_type() - return the type of a HOB
- *
- * This macro returns the type field from the HOB header for the
- * HOB specified by hob.
- *
- * @hob:    A pointer to a HOB.
- *
- * @return: HOB type.
- */
-static inline u16 get_hob_type(const struct hob_header *hdr)
-{
-	return hdr->type;
-}
-
-/**
- * get_hob_length() - return the length, in bytes, of a HOB
- *
- * This macro returns the len field from the HOB header for the
- * HOB specified by hob.
- *
- * @hob:    A pointer to a HOB.
- *
- * @return: HOB length.
- */
-static inline u16 get_hob_length(const struct hob_header *hdr)
-{
-	return hdr->len;
-}
-
-/**
  * get_next_hob() - return a pointer to the next HOB in the HOB list
  *
  * This macro returns a pointer to HOB that follows the HOB specified by hob
@@ -224,7 +194,7 @@
  */
 static inline const struct hob_header *get_next_hob(const struct hob_header *hdr)
 {
-	return (const struct hob_header *)((u32)hdr + get_hob_length(hdr));
+	return (const struct hob_header *)((u32)hdr + hdr->len);
 }
 
 /**
@@ -241,7 +211,7 @@
  */
 static inline bool end_of_hob(const struct hob_header *hdr)
 {
-	return get_hob_type(hdr) == HOB_TYPE_EOH;
+	return hdr->type == HOB_TYPE_EOH;
 }
 
 /**
@@ -273,7 +243,7 @@
  */
 static inline u16 get_guid_hob_data_size(const struct hob_header *hdr)
 {
-	return get_hob_length(hdr) - sizeof(struct hob_guid);
+	return hdr->len - sizeof(struct hob_guid);
 }
 
 /* FSP specific GUID HOB definitions */
diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h b/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h
index 2a3e987..ebdbd03 100644
--- a/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h
+++ b/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h
@@ -145,7 +145,7 @@
  *
  * @retval:   A HOB object with matching type; Otherwise NULL.
  */
-const struct hob_header *fsp_get_next_hob(u16 type, const void *hob_list);
+const struct hob_header *fsp_get_next_hob(uint type, const void *hob_list);
 
 /**
  * Returns the next instance of the matched GUID HOB from the starting HOB.
diff --git a/arch/x86/lib/cmd_hob.c b/arch/x86/lib/cmd_hob.c
index 8d1f038..a0ef037 100644
--- a/arch/x86/lib/cmd_hob.c
+++ b/arch/x86/lib/cmd_hob.c
@@ -29,7 +29,7 @@
 int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	const struct hob_header *hdr;
-	u16 type;
+	uint type;
 	char *desc;
 	int i = 0;
 
@@ -41,7 +41,7 @@
 	printf("----|----------|---------------------|----------------\n");
 	while (!end_of_hob(hdr)) {
 		printf("%-3d | %08x | ", i, (unsigned int)hdr);
-		type = get_hob_type(hdr);
+		type = hdr->type;
 		if (type == HOB_TYPE_UNUSED)
 			desc = "*Unused*";
 		else if (type == HOB_TYPE_EOH)
@@ -50,7 +50,7 @@
 			desc = hob_type[type];
 		else
 			desc = "*Invalid Type*";
-		printf("%-19s | %-15d\n", desc, get_hob_length(hdr));
+		printf("%-19s | %-15d\n", desc, hdr->len);
 		hdr = get_next_hob(hdr);
 		i++;
 	}