Staging: unisys: remove references to __DATE__ and __TIME__
authorKen Cox <jkc@redhat.com>
Thu, 26 Jun 2014 14:55:55 +0000 (09:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:15:27 +0000 (20:15 -0400)
The use of __DATE__ and __TIME__ is no longer allowed in the kernel so this
commit removes those.  They were once useful when the drivers were being
built externally, but now that the drivers are in the kernel the use of the
macros is redundant since the kernel already has the same information
elsewhere.

In addition, using these macros breaks the build if using gcc 4.9.0

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/include/vbushelper.h
drivers/staging/unisys/uislib/uisutils.c
drivers/staging/unisys/virthba/virthba.c
drivers/staging/unisys/virtpci/virtpci.c
drivers/staging/unisys/virtpci/virtpci.h
drivers/staging/unisys/visorchipset/visorchipset_main.c

index 93e35f0..ed94375 100644 (file)
@@ -28,8 +28,7 @@
 static inline void
 BusDeviceInfo_Init(ULTRA_VBUS_DEVICEINFO *pBusDeviceInfo,
                   const char *deviceType, const char *driverName,
-                  const char *ver, const char *verTag,
-                  const char *buildDate, const char *buildTime)
+                  const char *ver, const char *verTag)
 {
        memset(pBusDeviceInfo, 0, sizeof(ULTRA_VBUS_DEVICEINFO));
        snprintf(pBusDeviceInfo->devType, sizeof(pBusDeviceInfo->devType),
@@ -37,11 +36,10 @@ BusDeviceInfo_Init(ULTRA_VBUS_DEVICEINFO *pBusDeviceInfo,
        snprintf(pBusDeviceInfo->drvName, sizeof(pBusDeviceInfo->drvName),
                 "%s", (driverName) ? driverName : "unknownDriver");
        snprintf(pBusDeviceInfo->infoStrings,
-                sizeof(pBusDeviceInfo->infoStrings), "%s\t%s\t%s %s\t%s",
+                sizeof(pBusDeviceInfo->infoStrings), "%s\t%s\t%s",
                 (ver) ? ver : "unknownVer",
                 (verTag) ? verTag : "unknownVerTag",
-                (buildDate) ? buildDate : "noBuildDate",
-                (buildTime) ? buildTime : "nobuildTime", TARGET_HOSTNAME);
+                TARGET_HOSTNAME);
 }
 
 #endif
index 0f1bb73..07e5535 100644 (file)
@@ -96,9 +96,8 @@ uisctrl_register_req_handler(int type, void *fptr,
                return 0;
        }
        if (chipset_DriverInfo)
-               BusDeviceInfo_Init(chipset_DriverInfo,
-                                  "chipset", "uislib",
-                                  VERSION, NULL, __DATE__, __TIME__);
+               BusDeviceInfo_Init(chipset_DriverInfo, "chipset", "uislib",
+                                  VERSION, NULL);
 
        return 1;
 }
@@ -149,10 +148,8 @@ uisctrl_register_req_handler_ex(uuid_le switchTypeGuid,
 Away:
        if (rc) {
                if (chipset_DriverInfo)
-                       BusDeviceInfo_Init(chipset_DriverInfo,
-                                          "chipset", "uislib",
-                                          VERSION, NULL,
-                                          __DATE__, __TIME__);
+                       BusDeviceInfo_Init(chipset_DriverInfo, "chipset",
+                                          "uislib", VERSION, NULL);
        } else
                LOGERR("failed to register type %pUL.\n", &switchTypeGuid);
 
index 5c5aa70..4d1347a 100644 (file)
@@ -139,8 +139,6 @@ static struct virtpci_driver virthba_driver = {
        .name = "uisvirthba",
        .version = VERSION,
        .vertag = NULL,
-       .build_date = __DATE__,
-       .build_time = __TIME__,
        .id_table = virthba_id_table,
        .probe = virthba_probe,
        .remove = virthba_remove,
@@ -1413,9 +1411,6 @@ info_proc_read(struct file *file, char __user *buf, size_t len, loff_t *offset)
                length += sprintf(vbuf + length, "\nvirthba result queue poll wait:%d usecs.\n",
                                  rsltq_wait_usecs);
 
-               length += sprintf(vbuf + length,
-                                 "\nModule build: Date:%s Time:%s\n",
-                                 __DATE__, __TIME__);
                length += sprintf(vbuf + length, "\ninterrupts_rcvd = %llu, interrupts_disabled = %llu\n",
                                  virthbainfo->interrupts_rcvd,
                                  virthbainfo->interrupts_disabled);
index 71246fe..5ab17e7 100644 (file)
@@ -794,8 +794,7 @@ static void fix_vbus_devInfo(struct device *dev, int devNo, int devType,
        BusDeviceInfo_Init(&devInfo, stype,
                           virtpcidrv->name,
                           virtpcidrv->version,
-                          virtpcidrv->vertag,
-                          virtpcidrv->build_date, virtpcidrv->build_time);
+                          virtpcidrv->vertag);
        write_vbus_devInfo(pChan, &devInfo, devNo);
 
        /* Re-write bus+chipset info, because it is possible that this
@@ -1480,10 +1479,6 @@ static ssize_t info_proc_read(struct file *file, char __user *buf,
        }
        read_unlock_irqrestore(&VpcidevListLock, flags);
 
-       length +=
-           sprintf(vbuf + length, "\nModule build: Date:%s Time:%s\n", __DATE__,
-                   __TIME__);
-
        length += sprintf(vbuf + length, "\n");
        if (copy_to_user(buf, vbuf, length)) {
                kfree(vbuf);
@@ -1686,8 +1681,6 @@ static int __init virtpci_mod_init(void)
        if (!unisys_spar_platform)
                return -ENODEV;
 
-       LOGINF("Module build: Date:%s Time:%s...\n", __DATE__, __TIME__);
-
        POSTCODE_LINUX_2(VPCI_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 
        ret = bus_register(&virtpci_bus_type);
@@ -1701,9 +1694,8 @@ static int __init virtpci_mod_init(void)
                return ret;
        }
        DBGINF("bus_register successful\n");
-       BusDeviceInfo_Init(&Bus_DriverInfo,
-                          "clientbus", "virtpci",
-                          VERSION, NULL, __DATE__, __TIME__);
+       BusDeviceInfo_Init(&Bus_DriverInfo, "clientbus", "virtpci",
+                          VERSION, NULL);
 
        /* create a root bus used to parent all the virtpci buses. */
        ret = device_register(&virtpci_rootbus_device);
index f7be17b..7539fcb 100644 (file)
@@ -77,8 +77,6 @@ struct virtpci_driver {
        const char *name;       /* the name of the driver in sysfs */
        const char *version;
        const char *vertag;
-       const char *build_date;
-       const char *build_time;
        const struct pci_device_id *id_table;   /* must be non-NULL for probe
                                                 * to be called */
        int (*probe)(struct virtpci_dev *dev,
index 0a602b9..f897128 100644 (file)
@@ -569,7 +569,7 @@ visorchipset_register_busdev_server(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
                *responders = BusDev_Responders;
        if (driverInfo)
                BusDeviceInfo_Init(driverInfo, "chipset", "visorchipset",
-                                  VERSION, NULL, __DATE__, __TIME__);
+                                  VERSION, NULL);
 
        UNLOCKSEM(&NotifierLock);
 }
@@ -593,7 +593,7 @@ visorchipset_register_busdev_client(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
                *responders = BusDev_Responders;
        if (driverInfo)
                BusDeviceInfo_Init(driverInfo, "chipset(bolts)", "visorchipset",
-                                  VERSION, NULL, __DATE__, __TIME__);
+                                  VERSION, NULL);
        UNLOCKSEM(&NotifierLock);
 }
 EXPORT_SYMBOL_GPL(visorchipset_register_busdev_client);