[Mesa-dev] [PATCH] gallium/hud: Remove superfluous debug

Steven Toth stoth at kernellabs.com
Thu Oct 6 15:26:51 UTC 2016


No longer required.

Signed-off-by: Steven Toth <stoth at kernellabs.com>
---
 src/gallium/auxiliary/hud/hud_cpufreq.c      |  9 ---------
 src/gallium/auxiliary/hud/hud_diskstat.c     |  8 --------
 src/gallium/auxiliary/hud/hud_nic.c          | 16 ----------------
 src/gallium/auxiliary/hud/hud_sensors_temp.c | 19 -------------------
 4 files changed, 52 deletions(-)

diff --git a/src/gallium/auxiliary/hud/hud_cpufreq.c b/src/gallium/auxiliary/hud/hud_cpufreq.c
index 1296ece..4501bbb 100644
--- a/src/gallium/auxiliary/hud/hud_cpufreq.c
+++ b/src/gallium/auxiliary/hud/hud_cpufreq.c
@@ -46,8 +46,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#define LOCAL_DEBUG 0
-
 struct cpufreq_info
 {
    struct list_head list;
@@ -139,13 +137,6 @@ hud_cpufreq_graph_install(struct hud_pane *pane, int cpu_index,
    if (num_cpus <= 0)
       return;
 
-#if LOCAL_DEBUG
-   printf("%s(%d, %s) - Creating HUD object\n", __func__, cpu_index,
-          mode == CPUFREQ_MINIMUM ? "MIN" :
-          mode == CPUFREQ_CURRENT ? "CUR" :
-          mode == CPUFREQ_MAXIMUM ? "MAX" : "UNDEFINED");
-#endif
-
    cfi = find_cfi_by_index(cpu_index, mode);
    if (!cfi)
       return;
diff --git a/src/gallium/auxiliary/hud/hud_diskstat.c b/src/gallium/auxiliary/hud/hud_diskstat.c
index a2290cc..b248baf 100644
--- a/src/gallium/auxiliary/hud/hud_diskstat.c
+++ b/src/gallium/auxiliary/hud/hud_diskstat.c
@@ -46,8 +46,6 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#define LOCAL_DEBUG 0
-
 struct stat_s
 {
    /* Read */
@@ -189,12 +187,6 @@ hud_diskstat_graph_install(struct hud_pane *pane, const char *dev_name,
    if (num_devs <= 0)
       return;
 
-#if LOCAL_DEBUG
-   printf("%s(%s, %s) - Creating HUD object\n", __func__, dev_name,
-          mode == DISKSTAT_RD ? "RD" :
-          mode == DISKSTAT_WR ? "WR" : "UNDEFINED");
-#endif
-
    dsi = find_dsi_by_name(dev_name, mode);
    if (!dsi)
       return;
diff --git a/src/gallium/auxiliary/hud/hud_nic.c b/src/gallium/auxiliary/hud/hud_nic.c
index 36088a0..fb6b8c0 100644
--- a/src/gallium/auxiliary/hud/hud_nic.c
+++ b/src/gallium/auxiliary/hud/hud_nic.c
@@ -48,8 +48,6 @@
 #include <sys/ioctl.h>
 #include <linux/wireless.h>
 
-#define LOCAL_DEBUG 0
-
 struct nic_info
 {
    struct list_head list;
@@ -168,13 +166,6 @@ query_nic_rssi(const struct nic_info *nic, uint64_t *leveldBm)
    *leveldBm = ((char) stats.qual.level * -1);
 
    close(sockfd);
-
-#if LOCAL_DEBUG
-   printf("NIC signal level%s is %d%s.\n",
-          (stats.qual.updated & IW_QUAL_DBM ? " (in dBm)" : ""),
-          (char) stats.qual.level,
-          (stats.qual.updated & IW_QUAL_LEVEL_UPDATED ? " (updated)" : ""));
-#endif
 }
 
 static void
@@ -268,13 +259,6 @@ hud_nic_graph_install(struct hud_pane *pane, const char *nic_name,
    if (num_nics <= 0)
       return;
 
-#if LOCAL_DEBUG
-   printf("%s(%s, %s) - Creating HUD object\n", __func__, nic_name,
-          mode == NIC_DIRECTION_RX ? "RX" :
-          mode == NIC_DIRECTION_TX ? "TX" :
-          mode == NIC_RSSI_DBM ? "RSSI" : "UNDEFINED");
-#endif
-
    nic = find_nic_by_name(nic_name, mode);
    if (!nic)
       return;
diff --git a/src/gallium/auxiliary/hud/hud_sensors_temp.c b/src/gallium/auxiliary/hud/hud_sensors_temp.c
index 7d1398a..e41b847 100644
--- a/src/gallium/auxiliary/hud/hud_sensors_temp.c
+++ b/src/gallium/auxiliary/hud/hud_sensors_temp.c
@@ -44,8 +44,6 @@
 #include <unistd.h>
 #include <sensors/sensors.h>
 
-#define LOCAL_DEBUG 0
-
 /* TODO: We don't handle dynamic sensor discovery / arrival or removal.
  * Static globals specific to this HUD category.
  */
@@ -139,12 +137,6 @@ get_sensor_values(struct sensors_temp_info *sti)
                                SENSORS_SUBFEATURE_TEMP_MAX);
    if (sf)
       sti->max = get_value(sti->chip, sf);
-#if LOCAL_DEBUG
-   printf("%s.%s.current = %.1f\n", sti->chipname, sti->featurename,
-          sti->current);
-   printf("%s.%s.critical = %.1f\n", sti->chipname, sti->featurename,
-          sti->critical);
-#endif
 }
 
 static struct sensors_temp_info *
@@ -224,14 +216,6 @@ hud_sensors_temp_graph_install(struct hud_pane *pane, const char *dev_name,
    int num_devs = hud_get_num_sensors(0);
    if (num_devs <= 0)
       return;
-#if LOCAL_DEBUG
-   printf("%s(%s, %s) - Creating HUD object\n", __func__, dev_name,
-          mode == SENSORS_VOLTAGE_CURRENT ? "VOLTS" :
-          mode == SENSORS_CURRENT_CURRENT ? "AMPS" :
-          mode == SENSORS_TEMP_CURRENT ? "CU" :
-          mode == SENSORS_POWER_CURRENT ? "POWER" :
-          mode == SENSORS_TEMP_CRITICAL ? "CR" : "UNDEFINED");
-#endif
 
    sti = find_sti_by_name(dev_name, mode);
    if (!sti)
@@ -281,9 +265,6 @@ create_object(const char *chipname, const char *featurename,
              const sensors_chip_name *chip, const sensors_feature *feature,
              int mode)
 {
-#if LOCAL_DEBUG
-   printf("%03d: %s.%s\n", gsensors_temp_count, chipname, featurename);
-#endif
    struct sensors_temp_info *sti = CALLOC_STRUCT(sensors_temp_info);
 
    sti->mode = mode;
-- 
2.7.4



More information about the mesa-dev mailing list