aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/hwmon-vid.c
diff options
context:
space:
mode:
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2012-01-05 13:50:18 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-03-18 21:26:29 -0400
commit7fe83ad877321f44c8141b8334bd2f6614deb739 (patch)
treedb3f22563dd76bf600c171bdd4bb2730b699b101 /drivers/hwmon/hwmon-vid.c
parenta6bee4a5571d24b9ba7c98f6becc7c45312a537d (diff)
hwmon: remove () used with return
fix checkpatch ERROR: return is not a function, parentheses are not required Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/hwmon-vid.c')
-rw-r--r--drivers/hwmon/hwmon-vid.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c
index 932da8a5aaf4..4fcb867122ec 100644
--- a/drivers/hwmon/hwmon-vid.c
+++ b/drivers/hwmon/hwmon-vid.c
@@ -96,14 +96,14 @@ int vid_from_reg(int val, u8 vrm)
96 vid = 1862500 - (val & 0x1f) * 25000; 96 vid = 1862500 - (val & 0x1f) * 25000;
97 if(val & 0x20) 97 if(val & 0x20)
98 vid -= 12500; 98 vid -= 12500;
99 return((vid + 500) / 1000); 99 return (vid + 500) / 1000;
100 100
101 case 110: /* Intel Conroe */ 101 case 110: /* Intel Conroe */
102 /* compute in uV, round to mV */ 102 /* compute in uV, round to mV */
103 val &= 0xff; 103 val &= 0xff;
104 if (val < 0x02 || val > 0xb2) 104 if (val < 0x02 || val > 0xb2)
105 return 0; 105 return 0;
106 return((1600000 - (val - 2) * 6250 + 500) / 1000); 106 return (1600000 - (val - 2) * 6250 + 500) / 1000;
107 107
108 case 24: /* Athlon64 & Opteron */ 108 case 24: /* Athlon64 & Opteron */
109 val &= 0x1f; 109 val &= 0x1f;
@@ -118,38 +118,38 @@ int vid_from_reg(int val, u8 vrm)
118 case 91: /* VRM 9.1 */ 118 case 91: /* VRM 9.1 */
119 case 90: /* VRM 9.0 */ 119 case 90: /* VRM 9.0 */
120 val &= 0x1f; 120 val &= 0x1f;
121 return(val == 0x1f ? 0 : 121 return val == 0x1f ? 0 :
122 1850 - val * 25); 122 1850 - val * 25;
123 123
124 case 85: /* VRM 8.5 */ 124 case 85: /* VRM 8.5 */
125 val &= 0x1f; 125 val &= 0x1f;
126 return((val & 0x10 ? 25 : 0) + 126 return (val & 0x10 ? 25 : 0) +
127 ((val & 0x0f) > 0x04 ? 2050 : 1250) - 127 ((val & 0x0f) > 0x04 ? 2050 : 1250) -
128 ((val & 0x0f) * 50)); 128 ((val & 0x0f) * 50);
129 129
130 case 84: /* VRM 8.4 */ 130 case 84: /* VRM 8.4 */
131 val &= 0x0f; 131 val &= 0x0f;
132 /* fall through */ 132 /* fall through */
133 case 82: /* VRM 8.2 */ 133 case 82: /* VRM 8.2 */
134 val &= 0x1f; 134 val &= 0x1f;
135 return(val == 0x1f ? 0 : 135 return val == 0x1f ? 0 :
136 val & 0x10 ? 5100 - (val) * 100 : 136 val & 0x10 ? 5100 - (val) * 100 :
137 2050 - (val) * 50); 137 2050 - (val) * 50;
138 case 17: /* Intel IMVP-II */ 138 case 17: /* Intel IMVP-II */
139 val &= 0x1f; 139 val &= 0x1f;
140 return(val & 0x10 ? 975 - (val & 0xF) * 25 : 140 return val & 0x10 ? 975 - (val & 0xF) * 25 :
141 1750 - val * 50); 141 1750 - val * 50;
142 case 13: 142 case 13:
143 case 131: 143 case 131:
144 val &= 0x3f; 144 val &= 0x3f;
145 /* Exception for Eden ULV 500 MHz */ 145 /* Exception for Eden ULV 500 MHz */
146 if (vrm == 131 && val == 0x3f) 146 if (vrm == 131 && val == 0x3f)
147 val++; 147 val++;
148 return(1708 - val * 16); 148 return 1708 - val * 16;
149 case 14: /* Intel Core */ 149 case 14: /* Intel Core */
150 /* compute in uV, round to mV */ 150 /* compute in uV, round to mV */
151 val &= 0x7f; 151 val &= 0x7f;
152 return(val > 0x77 ? 0 : (1500000 - (val * 12500) + 500) / 1000); 152 return val > 0x77 ? 0 : (1500000 - (val * 12500) + 500) / 1000;
153 default: /* report 0 for unknown */ 153 default: /* report 0 for unknown */
154 if (vrm) 154 if (vrm)
155 pr_warn("Requested unsupported VRM version (%u)\n", 155 pr_warn("Requested unsupported VRM version (%u)\n",