[COMMON] lib: dss: change variable form enabed log count to total log count
authorDonghyeok Choe <d7271.choe@samsung.com>
Wed, 16 May 2018 05:15:56 +0000 (14:15 +0900)
committerDonghyeok Choe <d7271.choe@samsung.com>
Wed, 16 May 2018 06:38:53 +0000 (15:38 +0900)
Change-Id: Ife95505db80cac47d7852a511f8c5b71140a4b5e
Signed-off-by: Donghyeok Choe <d7271.choe@samsung.com>
lib/debug-snapshot-helper.c
lib/debug-snapshot-local.h
lib/debug-snapshot-sysfs.c
lib/debug-snapshot.c

index a1061b1b881aed4bb0e46fb51088511a449b01e3..03ae0603bbda6a0fa012bf260d72afdd57f530e7 100644 (file)
@@ -156,7 +156,7 @@ unsigned int dbg_snapshot_get_item_size(char* name)
 {
        unsigned long i;
 
-       for (i = 0; i < dss_desc.log_enable_cnt; i++) {
+       for (i = 0; i < dss_desc.log_cnt; i++) {
                if (!strncmp(dss_items[i].name, name, strlen(name)))
                        return dss_items[i].entry.size;
        }
@@ -168,7 +168,7 @@ unsigned long dbg_snapshot_get_item_vaddr(char *name)
 {
        unsigned long i;
 
-       for (i = 0; i < dss_desc.log_enable_cnt; i++) {
+       for (i = 0; i < dss_desc.log_cnt; i++) {
                if (!strncmp(dss_items[i].name, name, strlen(name)))
                        return dss_items[i].entry.vaddr;
        }
@@ -179,7 +179,7 @@ unsigned int dbg_snapshot_get_item_paddr(char* name)
 {
        unsigned long i;
 
-       for (i = 0; i < dss_desc.log_enable_cnt; i++) {
+       for (i = 0; i < dss_desc.log_cnt; i++) {
                if (!strncmp(dss_items[i].name, name, strlen(name)))
                        return dss_items[i].entry.paddr;
        }
index 186a74429de1de86617c759be7b87b0e93eaf577..d38b1fcef78a5e0ab5b6d7125ffee116a711d258 100644 (file)
@@ -164,7 +164,7 @@ struct dbg_snapshot_desc {
        unsigned int log_sfr_num;
        unsigned int log_pstore_num;
        unsigned int log_etm_num;
-       unsigned int log_enable_cnt;
+       unsigned int log_cnt;
 
        unsigned int callstack;
        unsigned long hardlockup_core_mask;
index 17c5c09efadb5f453b6c0267ac06b56818a0a5f7..ed79f549f96a1da6b795607e3b48ff1d076cce54 100644 (file)
@@ -55,7 +55,7 @@ static ssize_t dss_enable_show(struct kobject *kobj,
        ssize_t n = 0;
 
        /*  item  */
-       for (i = 0; i < dss_desc.log_enable_cnt; i++) {
+       for (i = 0; i < dss_desc.log_cnt; i++) {
                item = &dss_items[i];
                n += scnprintf(buf + n, 24, "%-12s : %sable\n",
                        item->name, item->entry.enabled ? "en" : "dis");
index 8eee4b13daf42f99e4505a1bc77201aa037d292d..8b8aad111d62f2cfef7635a27fedde27a24f2a24 100644 (file)
@@ -382,7 +382,7 @@ static int __init dbg_snapshot_remap(void)
                        dss_items[i].curr_ptr = (unsigned char *)dss_items[i].entry.vaddr;
                }
        }
-       dss_desc.log_enable_cnt = enabled_count;
+       dss_desc.log_cnt = ARRAY_SIZE(dss_items);
        return enabled_count;
 }