cfp: Shorten two variable names.
authorUwe Hermann <uwe@hermann-uwe.de>
Sun, 10 Jun 2018 14:21:34 +0000 (16:21 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Sun, 10 Jun 2018 17:24:23 +0000 (19:24 +0200)
decoders/cfp/pd.py

index 58668c5990cf386be5841a2d12a392e3a3421c1b..71229cee28dc4734b1cdf94d628caeae2607612b 100644 (file)
@@ -78,28 +78,29 @@ class Decoder(srd.Decoder):
 
     def decode(self, ss, es, data):
         self.ss, self.es = ss, es
-        for (clause45, clause45_address, is_read, portad, devad, register) in data:
+        for (clause45, clause45_addr, is_read, portad, devad, reg) in data:
             if not is_read:
                 continue
-            if clause45_address >= 0x8000 and clause45_address <= 0x807F:
+            if clause45_addr >= 0x8000 and clause45_addr <= 0x807F:
                 self.putx([0, ['CFP NVR 1: Basic ID register', 'NVR1']])
-                if clause45_address == 0x8000:
-                    self.putx([1, ['Module identifier: %s' % MODULE_ID.get(register, 'Reserved')]])
-            elif clause45_address >= 0x8080 and clause45_address <= 0x80FF:
+                if clause45_addr == 0x8000:
+                    self.putx([1, ['Module identifier: %s' % \
+                              MODULE_ID.get(reg, 'Reserved')]])
+            elif clause45_addr >= 0x8080 and clause45_addr <= 0x80FF:
                 self.putx([0, ['CFP NVR 2: Extended ID register', 'NVR2']])
-            elif clause45_address >= 0x8100 and clause45_address <= 0x817F:
+            elif clause45_addr >= 0x8100 and clause45_addr <= 0x817F:
                 self.putx([0, ['CFP NVR 3: Network lane specific register', 'NVR3']])
-            elif clause45_address >= 0x8180 and clause45_address <= 0x81FF:
+            elif clause45_addr >= 0x8180 and clause45_addr <= 0x81FF:
                 self.putx([0, ['CFP NVR 4', 'NVR4']])
-            elif clause45_address >= 0x8400 and clause45_address <= 0x847F:
+            elif clause45_addr >= 0x8400 and clause45_addr <= 0x847F:
                 self.putx([0, ['Vendor NVR 1: Vendor data register', 'V-NVR1']])
-            elif clause45_address >= 0x8480 and clause45_address <= 0x84FF:
+            elif clause45_addr >= 0x8480 and clause45_addr <= 0x84FF:
                 self.putx([0, ['Vendor NVR 2: Vendor data register', 'V-NVR2']])
-            elif clause45_address >= 0x8800 and clause45_address <= 0x887F:
+            elif clause45_addr >= 0x8800 and clause45_addr <= 0x887F:
                 self.putx([0, ['User NVR 1: User data register', 'U-NVR1']])
-            elif clause45_address >= 0x8880 and clause45_address <= 0x88FF:
+            elif clause45_addr >= 0x8880 and clause45_addr <= 0x88FF:
                 self.putx([0, ['User NVR 2: User data register', 'U-NVR2']])
-            elif clause45_address >= 0xA000 and clause45_address <= 0xA07F:
+            elif clause45_addr >= 0xA000 and clause45_addr <= 0xA07F:
                 self.putx([0, ['CFP Module VR 1: CFP Module level control and DDM register', 'Mod-VR1']])
-            elif clause45_address >= 0xA080 and clause45_address <= 0xA0FF:
+            elif clause45_addr >= 0xA080 and clause45_addr <= 0xA0FF:
                 self.putx([0, ['MLG VR 1: MLG Management Interface register', 'MLG-VR1']])