[PATCH 21/91] staging: unisys: fix up ULTRA_CHANNEL_CLIENT_TRANSITION macro
Benjamin Romer
benjamin.romer at unisys.com
Thu Oct 23 18:30:00 UTC 2014
Rename the macro to SPAR_CHANNEL_CLIENT_TRANSITION, and fix CamelCase
parameters:
pChan => ch
chanId => id
logCtx => log
Update all places the macro was used to call the new name.
Signed-off-by: Benjamin Romer <benjamin.romer at unisys.com>
---
.../unisys/common-spar/include/channels/channel.h | 22 ++++++++++------------
drivers/staging/unisys/virthba/virthba.c | 6 +++---
drivers/staging/unisys/virtpci/virtpci.c | 12 ++++++------
3 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/unisys/common-spar/include/channels/channel.h b/drivers/staging/unisys/common-spar/include/channels/channel.h
index c68d36c..0f575e8 100644
--- a/drivers/staging/unisys/common-spar/include/channels/channel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/channel.h
@@ -128,26 +128,24 @@ ULTRA_CHANNELCLI_STRING(u32 v)
line); \
} while (0)
-#define ULTRA_CHANNEL_CLIENT_TRANSITION(pChan, chanId, \
- newstate, logCtx) \
+#define SPAR_CHANNEL_CLIENT_TRANSITION(ch, id, newstate, log) \
do { \
SPAR_CHANNEL_CLIENT_CHK_TRANSITION( \
- readl(&(((struct channel_header __iomem *) \
- (pChan))->cli_state_os)), \
- newstate, \
- chanId, logCtx, __FILE__, __LINE__); \
+ readl(&(((struct channel_header __iomem *)\
+ (ch))->cli_state_os)), \
+ newstate, id, log, __FILE__, __LINE__); \
pr_info("%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n", \
- chanId, "CliStateOS", \
+ id, "CliStateOS", \
ULTRA_CHANNELCLI_STRING( \
readl(&((struct channel_header __iomem *)\
- (pChan))->cli_state_os)), \
- readl(&((struct channel_header __iomem *) \
- (pChan))->cli_state_os), \
+ (ch))->cli_state_os)), \
+ readl(&((struct channel_header __iomem *)\
+ (ch))->cli_state_os), \
ULTRA_CHANNELCLI_STRING(newstate), \
newstate, \
pathname_last_n_nodes(__FILE__, 4), __LINE__); \
- writel(newstate, &((struct channel_header __iomem *) \
- (pChan))->cli_state_os); \
+ writel(newstate, &((struct channel_header __iomem *)\
+ (ch))->cli_state_os); \
mb(); /* required for channel synch */ \
} while (0)
diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index 3e9a56d..9e98af8 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -1498,9 +1498,9 @@ virthba_serverup(struct virtpci_dev *virtpcidev)
/* Must transition channel to ATTACHED state BEFORE we
* can start using the device again
*/
- ULTRA_CHANNEL_CLIENT_TRANSITION(virthbainfo->chinfo.queueinfo->chan,
- dev_name(&virtpcidev->generic_dev),
- CHANNELCLI_ATTACHED, NULL);
+ SPAR_CHANNEL_CLIENT_TRANSITION(virthbainfo->chinfo.queueinfo->chan,
+ dev_name(&virtpcidev->generic_dev),
+ CHANNELCLI_ATTACHED, NULL);
/* Start Processing the IOVM Response Queue Again */
if (!uisthread_start(&virthbainfo->chinfo.threadinfo,
diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c
index 160ed82..eaae4e8 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -1009,9 +1009,9 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
* queues can begin at any time after device_register().
*/
pDev = &virtpcidev->generic_dev;
- ULTRA_CHANNEL_CLIENT_TRANSITION(addparams->chanptr,
- BUS_ID(pDev),
- CHANNELCLI_ATTACHED, NULL);
+ SPAR_CHANNEL_CLIENT_TRANSITION(addparams->chanptr,
+ BUS_ID(pDev),
+ CHANNELCLI_ATTACHED, NULL);
/* don't register until device has been added to
* list. Otherwise, a device_unregister from this function can
@@ -1032,9 +1032,9 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
if (ret) {
LOGERR("device_register returned %d\n", ret);
pDev = &virtpcidev->generic_dev;
- ULTRA_CHANNEL_CLIENT_TRANSITION(addparams->chanptr,
- BUS_ID(pDev),
- CHANNELCLI_DETACHED, NULL);
+ SPAR_CHANNEL_CLIENT_TRANSITION(addparams->chanptr,
+ BUS_ID(pDev),
+ CHANNELCLI_DETACHED, NULL);
/* remove virtpcidev, the one we just added, from the list */
write_lock_irqsave(&VpcidevListLock, flags);
for (tmpvpcidev = VpcidevListHead, prev = NULL;
--
1.9.1
More information about the devel
mailing list