]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: Add a note about the growing state_info struct
authorSimon Glass <sjg@chromium.org>
Sun, 17 Feb 2019 03:24:45 +0000 (20:24 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 20 Feb 2019 07:25:29 +0000 (15:25 +0800)
This struct is getting larger and in some cases is being used for things
which would be better put into a driver. For example hwspinlock is not
used outside of sandbox_hwspinlock.c.

Add a note to encourage people to put things elsewhere.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/sandbox/include/asm/state.h

index c724827f6cf1269df4c7fa9f6c9d23199a6ae139..2d773d3fa6b53c9f0477161b4b352a8c8c4125ca 100644 (file)
@@ -102,6 +102,15 @@ struct sandbox_state {
        ulong next_tag;                 /* Next address tag to allocate */
        struct list_head mapmem_head;   /* struct sandbox_mapmem_entry */
        bool hwspinlock;                /* Hardware Spinlock status */
+
+       /*
+        * This struct is getting large.
+        *
+        * Consider putting test data in driver-private structs, like
+        * sandbox_pch.c.
+        *
+        * If you add new members, please put them above this comment.
+        */
 };
 
 /* Minimum space we guarantee in the state FDT when calling read/write*/