Commit 836bee9e authored by Ken Cox's avatar Ken Cox Committed by Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKen Cox <jkc@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5573e4f6
......@@ -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
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment