Commit ff97a3fd authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman
Browse files

staging: unisys: fix up ULTRA_CHANNEL_CLIENT_TRANSITION macro



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: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8800bfbc
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -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__);		\
				 (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)),	\
					      (ch))->cli_state_os)),	\
				readl(&((struct channel_header __iomem *)\
				      (pChan))->cli_state_os),		\
				      (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);		\
				   (ch))->cli_state_os);		\
		mb(); /* required for channel synch */			\
	} while (0)

+3 −3
Original line number Diff line number Diff line
@@ -1498,7 +1498,7 @@ 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,
	SPAR_CHANNEL_CLIENT_TRANSITION(virthbainfo->chinfo.queueinfo->chan,
				       dev_name(&virtpcidev->generic_dev),
				       CHANNELCLI_ATTACHED, NULL);

+6 −6
Original line number Diff line number Diff line
@@ -1009,7 +1009,7 @@ 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,
	SPAR_CHANNEL_CLIENT_TRANSITION(addparams->chanptr,
				       BUS_ID(pDev),
				       CHANNELCLI_ATTACHED, NULL);

@@ -1032,7 +1032,7 @@ 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,
		SPAR_CHANNEL_CLIENT_TRANSITION(addparams->chanptr,
					       BUS_ID(pDev),
					       CHANNELCLI_DETACHED, NULL);
		/* remove virtpcidev, the one we just added, from the list */