提交 ae1724df 编写于 作者: I Ira Weiny 提交者: Greg Kroah-Hartman

staging/rdma/hfi1: Fix camel case variables

physState, linkState, and devState should be phys_state, link_state, and
dev_state
Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NIra Weiny <ira.weiny@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c0d4c258
...@@ -972,9 +972,9 @@ static long hfi1_ioctl(struct file *fp, unsigned int cmd, unsigned long arg) ...@@ -972,9 +972,9 @@ static long hfi1_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
void *filter_value = NULL; void *filter_value = NULL;
long ret = 0; long ret = 0;
int value = 0; int value = 0;
u8 physState = 0; u8 phys_state = 0;
u8 linkState = 0; u8 link_state = 0;
u16 devState = 0; u16 dev_state = 0;
unsigned long flags = 0; unsigned long flags = 0;
unsigned long *argp = NULL; unsigned long *argp = NULL;
struct hfi1_packet_filter_command filter_cmd = {0}; struct hfi1_packet_filter_command filter_cmd = {0};
...@@ -1038,31 +1038,31 @@ static long hfi1_ioctl(struct file *fp, unsigned int cmd, unsigned long arg) ...@@ -1038,31 +1038,31 @@ static long hfi1_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
} }
/* What we want to transition to */ /* What we want to transition to */
physState = (value >> 4) & 0xF; phys_state = (value >> 4) & 0xF;
linkState = value & 0xF; link_state = value & 0xF;
snoop_dbg("Setting link state 0x%x", value); snoop_dbg("Setting link state 0x%x", value);
switch (linkState) { switch (link_state) {
case IB_PORT_NOP: case IB_PORT_NOP:
if (physState == 0) if (phys_state == 0)
break; break;
/* fall through */ /* fall through */
case IB_PORT_DOWN: case IB_PORT_DOWN:
switch (physState) { switch (phys_state) {
case 0: case 0:
devState = HLS_DN_DOWNDEF; dev_state = HLS_DN_DOWNDEF;
break; break;
case 2: case 2:
devState = HLS_DN_POLL; dev_state = HLS_DN_POLL;
break; break;
case 3: case 3:
devState = HLS_DN_DISABLE; dev_state = HLS_DN_DISABLE;
break; break;
default: default:
ret = -EINVAL; ret = -EINVAL;
goto done; goto done;
} }
ret = set_link_state(ppd, devState); ret = set_link_state(ppd, dev_state);
break; break;
case IB_PORT_ARMED: case IB_PORT_ARMED:
ret = set_link_state(ppd, HLS_UP_ARMED); ret = set_link_state(ppd, HLS_UP_ARMED);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册