From 836bee9eee6d13cb4f3bf2a53133fab576877dac Mon Sep 17 00:00:00 2001 From: Ken Cox Date: Thu, 26 Jun 2014 09:55:55 -0500 Subject: [PATCH] Staging: unisys: remove references to __DATE__ and __TIME__ 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 Signed-off-by: Ken Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/include/vbushelper.h | 8 +++----- drivers/staging/unisys/uislib/uisutils.c | 11 ++++------- drivers/staging/unisys/virthba/virthba.c | 5 ----- drivers/staging/unisys/virtpci/virtpci.c | 14 +++----------- drivers/staging/unisys/virtpci/virtpci.h | 2 -- .../unisys/visorchipset/visorchipset_main.c | 4 ++-- 6 files changed, 12 insertions(+), 32 deletions(-) diff --git a/drivers/staging/unisys/include/vbushelper.h b/drivers/staging/unisys/include/vbushelper.h index 93e35f039ded..ed943759634a 100644 --- a/drivers/staging/unisys/include/vbushelper.h +++ b/drivers/staging/unisys/include/vbushelper.h @@ -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 diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c index 0f1bb739975e..07e5535fc340 100644 --- a/drivers/staging/unisys/uislib/uisutils.c +++ b/drivers/staging/unisys/uislib/uisutils.c @@ -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); diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index 5c5aa7001767..4d1347ad6527 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -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); diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c index 71246feb154f..5ab17e76c804 100644 --- a/drivers/staging/unisys/virtpci/virtpci.c +++ b/drivers/staging/unisys/virtpci/virtpci.c @@ -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); diff --git a/drivers/staging/unisys/virtpci/virtpci.h b/drivers/staging/unisys/virtpci/virtpci.h index f7be17b669c4..7539fcb30d38 100644 --- a/drivers/staging/unisys/virtpci/virtpci.h +++ b/drivers/staging/unisys/virtpci/virtpci.h @@ -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, diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 0a602b9c130b..f89712849d72 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -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); -- 2.20.1