dsp: firmware_update: Iterators for downstream device descriptors

Provide an ergonomic and safe means to iterate through downstream
devices and their descriptors while avoiding the need to allocate. The
strategy leaves the library user to make their own choices about how the
data is handled.

The user-facing portion of the change takes the form of two new macros,
to be nested inside one another:

```
foreach_pldm_downstream_device(...) {
    foreach_pldm_downstream_device_descriptor(...) {
        // Do something with the device-specific descriptor
    }
}
```

Examples uses are provided in the documentation and in changes to the
test suite.

Change-Id: I6e79454b94868da73f318635bcaae57cd51fbf97
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/src/compiler.h b/src/compiler.h
index 91b6e24..18e1a32 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -2,6 +2,8 @@
 #ifndef PLDM_COMPILER_H
 #define PLDM_COMPILER_H
 
+#include <libpldm/compiler.h>
+
 #ifndef __has_attribute
 #error The libpldm implementation requires __has_attribute
 #endif
@@ -20,8 +22,14 @@
 	int compliance;
 } pldm_required_attributes __attribute__((unused));
 
-#define LIBPLDM_CC_ALWAYS_INLINE      __attribute__((always_inline)) static inline
-#define LIBPLDM_CC_NONNULL	      __attribute__((nonnull))
+#ifndef LIBPLDM_CC_ALWAYS_INLINE
+#error Missing definition for LIBPLDM_ALWAYS_INLINE
+#endif
+
+#ifndef LIBPLDM_CC_NONNULL
+#error Missing definition for LIBPLDM_CC_NONNULL
+#endif
+
 #define LIBPLDM_CC_NONNULL_ARGS(...)  __attribute__((nonnull(__VA_ARGS__)))
 #define LIBPLDM_CC_UNUSED	      __attribute__((unused))
 #define LIBPLDM_CC_WARN_UNUSED_RESULT __attribute__((warn_unused_result))