From: Jean Delvare Date: Sun, 27 May 2007 20:17:43 +0000 (+0200) Subject: hwmon-vid: Don't spam the logs when VRM version is missing X-Git-Tag: firefly_0821_release~28870^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=45f2acc484b31d429eb1359c48ea5cd3acb869cd;p=firefly-linux-kernel-4.4.55.git hwmon-vid: Don't spam the logs when VRM version is missing If we cannot guess which VRM version the CPU uses, we set it to 0 and log it. So we shouldn't spam the log each time vid_from_reg() is later called with vrm 0. Signed-off-by: Jean Delvare Acked-by: Rudolf Marek --- diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c index 5aab23b93e24..f17e771e42f8 100644 --- a/drivers/hwmon/hwmon-vid.c +++ b/drivers/hwmon/hwmon-vid.c @@ -132,7 +132,9 @@ int vid_from_reg(int val, u8 vrm) val &= 0x7f; return(val > 0x77 ? 0 : (1500000 - (val * 12500) + 500) / 1000); default: /* report 0 for unknown */ - printk(KERN_INFO "hwmon-vid: requested unknown VRM version\n"); + if (vrm) + printk(KERN_WARNING "hwmon-vid: Requested unsupported " + "VRM version (%u)\n", (unsigned int)vrm); return 0; } }