On August 22, 2021 11:28:54 PM PDT, "Christian König" <christian.koenig@xxxxxxx> wrote:
Sure, I'm happy to move it. It wasn't clear to me which headers were considered "immutable". Which header should I put this in?
Am 19.08.21 um 22:14 schrieb Kees Cook:
[...]Please don't add a function like this into amdgpu.h, especially when it
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 96e895d6be35..4605934a4fb7 100644
@@ -1446,4 +1446,29 @@ static inline int amdgpu_in_reset(struct amdgpu_device *adev)
+ * memcpy_trailing - Copy the end of one structure into the middle of another
+ * @dst: Pointer to destination struct
+ * @first_dst_member: The member name in @dst where the overwrite begins
+ * @last_dst_member: The member name in @dst where the overwrite ends after
+ * @src: Pointer to the source struct
+ * @first_src_member: The member name in @src where the copy begins
+#define memcpy_trailing(dst, first_dst_member, last_dst_member, \
+ src, first_src_member) \
is only used by the SMU code.
And please give it an amdgpu_ prefix so that we are not confusing itSure, I will include that.
with a core function.
Apart from that looks good to me.Thanks!