IB/mthca: Formatting cleanups

Fix a few whitespace and other coding style problems.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
Roland Dreier 2008-04-16 21:01:03 -07:00
parent 4b119e21d0
commit b39993936d
6 changed files with 11 additions and 11 deletions

View File

@ -219,7 +219,7 @@ static void mthca_cmd_post_dbell(struct mthca_dev *dev,
__raw_writel((__force u32) cpu_to_be32((1 << HCR_GO_BIT) | __raw_writel((__force u32) cpu_to_be32((1 << HCR_GO_BIT) |
(1 << HCA_E_BIT) | (1 << HCA_E_BIT) |
(op_modifier << HCR_OPMOD_SHIFT) | (op_modifier << HCR_OPMOD_SHIFT) |
op), ptr + offs[6]); op), ptr + offs[6]);
wmb(); wmb();
__raw_writel((__force u32) 0, ptr + offs[7]); __raw_writel((__force u32) 0, ptr + offs[7]);
wmb(); wmb();

View File

@ -390,11 +390,11 @@ extern void __buggy_use_of_MTHCA_PUT(void);
do { \ do { \
void *__p = (char *) (source) + (offset); \ void *__p = (char *) (source) + (offset); \
switch (sizeof (dest)) { \ switch (sizeof (dest)) { \
case 1: (dest) = *(u8 *) __p; break; \ case 1: (dest) = *(u8 *) __p; break; \
case 2: (dest) = be16_to_cpup(__p); break; \ case 2: (dest) = be16_to_cpup(__p); break; \
case 4: (dest) = be32_to_cpup(__p); break; \ case 4: (dest) = be32_to_cpup(__p); break; \
case 8: (dest) = be64_to_cpup(__p); break; \ case 8: (dest) = be64_to_cpup(__p); break; \
default: __buggy_use_of_MTHCA_GET(); \ default: __buggy_use_of_MTHCA_GET(); \
} \ } \
} while (0) } while (0)

View File

@ -232,9 +232,9 @@ static inline struct mthca_eqe *get_eqe(struct mthca_eq *eq, u32 entry)
return eq->page_list[off / PAGE_SIZE].buf + off % PAGE_SIZE; return eq->page_list[off / PAGE_SIZE].buf + off % PAGE_SIZE;
} }
static inline struct mthca_eqe* next_eqe_sw(struct mthca_eq *eq) static inline struct mthca_eqe *next_eqe_sw(struct mthca_eq *eq)
{ {
struct mthca_eqe* eqe; struct mthca_eqe *eqe;
eqe = get_eqe(eq, eq->cons_index); eqe = get_eqe(eq, eq->cons_index);
return (MTHCA_EQ_ENTRY_OWNER_HW & eqe->owner) ? NULL : eqe; return (MTHCA_EQ_ENTRY_OWNER_HW & eqe->owner) ? NULL : eqe;
} }

View File

@ -125,7 +125,7 @@ static void smp_snoop(struct ib_device *ibdev,
event.device = ibdev; event.device = ibdev;
event.element.port_num = port_num; event.element.port_num = port_num;
if(pinfo->clientrereg_resv_subnetto & 0x80) if (pinfo->clientrereg_resv_subnetto & 0x80)
event.event = IB_EVENT_CLIENT_REREGISTER; event.event = IB_EVENT_CLIENT_REREGISTER;
else else
event.event = IB_EVENT_LID_CHANGE; event.event = IB_EVENT_LID_CHANGE;

View File

@ -412,7 +412,7 @@ err:
if (table->icm[i]) { if (table->icm[i]) {
mthca_UNMAP_ICM(dev, virt + i * MTHCA_TABLE_CHUNK_SIZE, mthca_UNMAP_ICM(dev, virt + i * MTHCA_TABLE_CHUNK_SIZE,
MTHCA_TABLE_CHUNK_SIZE / MTHCA_ICM_PAGE_SIZE, MTHCA_TABLE_CHUNK_SIZE / MTHCA_ICM_PAGE_SIZE,
&status); &status);
mthca_free_icm(dev, table->icm[i], table->coherent); mthca_free_icm(dev, table->icm[i], table->coherent);
} }

View File

@ -60,7 +60,7 @@ static int mthca_query_device(struct ib_device *ibdev,
struct ib_smp *in_mad = NULL; struct ib_smp *in_mad = NULL;
struct ib_smp *out_mad = NULL; struct ib_smp *out_mad = NULL;
int err = -ENOMEM; int err = -ENOMEM;
struct mthca_dev* mdev = to_mdev(ibdev); struct mthca_dev *mdev = to_mdev(ibdev);
u8 status; u8 status;