RM-autogen.py: Handle multiple entries per dev,subtype,host
authorNikhil Devshatwar <nikhil.nd@ti.com>
Thu, 26 Mar 2020 06:08:56 +0000 (11:38 +0530)
committerNikhil Devshatwar <nikhil.nd@ti.com>
Wed, 1 Apr 2020 11:14:43 +0000 (16:44 +0530)
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
respart/RM-autogen.py

index ef8fd8386ee4f8f3ee356ff9ff7fe223ece45742..d8d55e5c01070787502e687f0f7c1ec417d39747 100755 (executable)
@@ -57,10 +57,11 @@ def gen_rmcfg_data(sharing):
 
                        key = (restype, subtype, host_id)
                        value = (start, num)
-                       if (key in resasg):
-                               resasg[key].append(value)
-                       else:
+                       if (key not in resasg):
                                resasg[key] = [value]
+                       else:
+                               print ("WARNING: Ignoring multiple entries for (%s,%s,%s)" % key)
+                               #resasg[key].append(value)
                        rmcfg.append((start, num, restype, subtype, host_id))
 
                        for pair in sharing: