Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PM / devfreq: Drop custom MIN/MAX macros

Drop the custom MIN/MAX macros in favour of the standard min/max from
kernel.h

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>

authored by

Bjorn Andersson and committed by
MyungJoo Ham
d0e46420 23c7b54c

+4 -7
+4 -7
drivers/devfreq/devfreq.c
··· 29 29 #include <linux/of.h> 30 30 #include "governor.h" 31 31 32 - #define MAX(a,b) ((a > b) ? a : b) 33 - #define MIN(a,b) ((a < b) ? a : b) 34 - 35 32 static struct class *devfreq_class; 36 33 37 34 /* ··· 321 324 * max_freq 322 325 * min_freq 323 326 */ 324 - max_freq = MIN(devfreq->scaling_max_freq, devfreq->max_freq); 325 - min_freq = MAX(devfreq->scaling_min_freq, devfreq->min_freq); 327 + max_freq = min(devfreq->scaling_max_freq, devfreq->max_freq); 328 + min_freq = max(devfreq->scaling_min_freq, devfreq->min_freq); 326 329 327 330 if (min_freq && freq < min_freq) { 328 331 freq = min_freq; ··· 1194 1197 { 1195 1198 struct devfreq *df = to_devfreq(dev); 1196 1199 1197 - return sprintf(buf, "%lu\n", MAX(df->scaling_min_freq, df->min_freq)); 1200 + return sprintf(buf, "%lu\n", max(df->scaling_min_freq, df->min_freq)); 1198 1201 } 1199 1202 1200 1203 static ssize_t max_freq_store(struct device *dev, struct device_attribute *attr, ··· 1230 1233 { 1231 1234 struct devfreq *df = to_devfreq(dev); 1232 1235 1233 - return sprintf(buf, "%lu\n", MIN(df->scaling_max_freq, df->max_freq)); 1236 + return sprintf(buf, "%lu\n", min(df->scaling_max_freq, df->max_freq)); 1234 1237 } 1235 1238 static DEVICE_ATTR_RW(max_freq); 1236 1239