提交 74182acd 编写于 作者: J Jubin John 提交者: Doug Ledford

staging/rdma/hfi1: Remove multiple blank lines

Remove multiple blank lines to fix checkpatch check:
CHECK: Please don't use multiple blank lines
Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: NIra Weiny <ira.weiny@intel.com>
Reviewed-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: NJubin John <jubin.john@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 8638b77f
...@@ -986,7 +986,6 @@ static struct flag_table dc8051_info_host_msg_flags[] = { ...@@ -986,7 +986,6 @@ static struct flag_table dc8051_info_host_msg_flags[] = {
FLAG_ENTRY0("Link going down", 0x0100), FLAG_ENTRY0("Link going down", 0x0100),
}; };
static u32 encoded_size(u32 size); static u32 encoded_size(u32 size);
static u32 chip_to_opa_lstate(struct hfi1_devdata *dd, u32 chip_lstate); static u32 chip_to_opa_lstate(struct hfi1_devdata *dd, u32 chip_lstate);
static int set_physical_link_state(struct hfi1_devdata *dd, u64 state); static int set_physical_link_state(struct hfi1_devdata *dd, u64 state);
...@@ -1285,7 +1284,6 @@ static inline u64 read_write_csr(const struct hfi1_devdata *dd, u32 csr, ...@@ -1285,7 +1284,6 @@ static inline u64 read_write_csr(const struct hfi1_devdata *dd, u32 csr,
{ {
u64 ret; u64 ret;
if (mode == CNTR_MODE_R) { if (mode == CNTR_MODE_R) {
ret = read_csr(dd, csr); ret = read_csr(dd, csr);
} else if (mode == CNTR_MODE_W) { } else if (mode == CNTR_MODE_W) {
...@@ -10748,7 +10746,6 @@ int set_buffer_control(struct hfi1_pportdata *ppd, ...@@ -10748,7 +10746,6 @@ int set_buffer_control(struct hfi1_pportdata *ppd,
#define valid_vl(idx) ((idx) < TXE_NUM_DATA_VL || (idx) == 15) #define valid_vl(idx) ((idx) < TXE_NUM_DATA_VL || (idx) == 15)
#define NUM_USABLE_VLS 16 /* look at VL15 and less */ #define NUM_USABLE_VLS 16 /* look at VL15 and less */
/* find the new total credits, do sanity check on unused VLs */ /* find the new total credits, do sanity check on unused VLs */
for (i = 0; i < OPA_MAX_VLS; i++) { for (i = 0; i < OPA_MAX_VLS; i++) {
if (valid_vl(i)) { if (valid_vl(i)) {
...@@ -11891,7 +11888,6 @@ static int init_cntrs(struct hfi1_devdata *dd) ...@@ -11891,7 +11888,6 @@ static int init_cntrs(struct hfi1_devdata *dd)
if (!dd->scntrs) if (!dd->scntrs)
goto bail; goto bail;
/* allocate space for the counter names */ /* allocate space for the counter names */
dd->cntrnameslen = sz; dd->cntrnameslen = sz;
dd->cntrnames = kmalloc(sz, GFP_KERNEL); dd->cntrnames = kmalloc(sz, GFP_KERNEL);
...@@ -12060,7 +12056,6 @@ static int init_cntrs(struct hfi1_devdata *dd) ...@@ -12060,7 +12056,6 @@ static int init_cntrs(struct hfi1_devdata *dd)
return -ENOMEM; return -ENOMEM;
} }
static u32 chip_to_opa_lstate(struct hfi1_devdata *dd, u32 chip_lstate) static u32 chip_to_opa_lstate(struct hfi1_devdata *dd, u32 chip_lstate)
{ {
switch (chip_lstate) { switch (chip_lstate) {
...@@ -14282,7 +14277,6 @@ static u16 delay_cycles(struct hfi1_pportdata *ppd, u32 desired_egress_rate, ...@@ -14282,7 +14277,6 @@ static u16 delay_cycles(struct hfi1_pportdata *ppd, u32 desired_egress_rate,
return (u16)delta_cycles; return (u16)delta_cycles;
} }
/** /**
* create_pbc - build a pbc for transmission * create_pbc - build a pbc for transmission
* @flags: special case flags or-ed in built pbc * @flags: special case flags or-ed in built pbc
......
...@@ -102,7 +102,6 @@ do { \ ...@@ -102,7 +102,6 @@ do { \
pr_warn("create of %s failed\n", name); \ pr_warn("create of %s failed\n", name); \
} while (0) } while (0)
#define DEBUGFS_SEQ_FILE_CREATE(name, parent, data) \ #define DEBUGFS_SEQ_FILE_CREATE(name, parent, data) \
DEBUGFS_FILE_CREATE(#name, parent, data, &_##name##_file_ops, S_IRUGO) DEBUGFS_FILE_CREATE(#name, parent, data, &_##name##_file_ops, S_IRUGO)
...@@ -127,7 +126,6 @@ static void *_opcode_stats_seq_next(struct seq_file *s, void *v, loff_t *pos) ...@@ -127,7 +126,6 @@ static void *_opcode_stats_seq_next(struct seq_file *s, void *v, loff_t *pos)
return pos; return pos;
} }
static void _opcode_stats_seq_stop(struct seq_file *s, void *v) static void _opcode_stats_seq_stop(struct seq_file *s, void *v)
__releases(RCU) __releases(RCU)
{ {
...@@ -308,7 +306,6 @@ static void *_sdes_seq_next(struct seq_file *s, void *v, loff_t *pos) ...@@ -308,7 +306,6 @@ static void *_sdes_seq_next(struct seq_file *s, void *v, loff_t *pos)
return pos; return pos;
} }
static void _sdes_seq_stop(struct seq_file *s, void *v) static void _sdes_seq_stop(struct seq_file *s, void *v)
__releases(RCU) __releases(RCU)
{ {
......
...@@ -162,7 +162,6 @@ enum mmap_types { ...@@ -162,7 +162,6 @@ enum mmap_types {
#define dbg(fmt, ...) \ #define dbg(fmt, ...) \
pr_info(fmt, ##__VA_ARGS__) pr_info(fmt, ##__VA_ARGS__)
static inline int is_valid_mmap(u64 token) static inline int is_valid_mmap(u64 token)
{ {
return (HFI1_MMAP_TOKEN_GET(MAGIC, token) == HFI1_MMAP_MAGIC); return (HFI1_MMAP_TOKEN_GET(MAGIC, token) == HFI1_MMAP_MAGIC);
...@@ -1589,7 +1588,6 @@ static loff_t ui_lseek(struct file *filp, loff_t offset, int whence) ...@@ -1589,7 +1588,6 @@ static loff_t ui_lseek(struct file *filp, loff_t offset, int whence)
return filp->f_pos; return filp->f_pos;
} }
/* NOTE: assumes unsigned long is 8 bytes */ /* NOTE: assumes unsigned long is 8 bytes */
static ssize_t ui_read(struct file *filp, char __user *buf, size_t count, static ssize_t ui_read(struct file *filp, char __user *buf, size_t count,
loff_t *f_pos) loff_t *f_pos)
......
...@@ -878,7 +878,6 @@ struct hfi1_devdata { ...@@ -878,7 +878,6 @@ struct hfi1_devdata {
wait_queue_head_t sdma_unfreeze_wq; wait_queue_head_t sdma_unfreeze_wq;
atomic_t sdma_unfreeze_count; atomic_t sdma_unfreeze_count;
/* hfi1_pportdata, points to array of (physical) port-specific /* hfi1_pportdata, points to array of (physical) port-specific
* data structs, indexed by pidx (0..n-1) * data structs, indexed by pidx (0..n-1)
*/ */
...@@ -1598,7 +1597,6 @@ static inline struct cc_state *get_cc_state(struct hfi1_pportdata *ppd) ...@@ -1598,7 +1597,6 @@ static inline struct cc_state *get_cc_state(struct hfi1_pportdata *ppd)
/* IB dword length mask in PBC (lower 11 bits); same for all chips */ /* IB dword length mask in PBC (lower 11 bits); same for all chips */
#define HFI1_PBC_LENGTH_MASK ((1 << 11) - 1) #define HFI1_PBC_LENGTH_MASK ((1 << 11) - 1)
/* ctxt_flag bit offsets */ /* ctxt_flag bit offsets */
/* context has been setup */ /* context has been setup */
#define HFI1_CTXT_SETUP_DONE 1 #define HFI1_CTXT_SETUP_DONE 1
......
...@@ -1723,7 +1723,6 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) ...@@ -1723,7 +1723,6 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd)
rcd->ctxt, rcd->egrbufs.alloced, rcd->egrbufs.rcvtid_size, rcd->ctxt, rcd->egrbufs.alloced, rcd->egrbufs.rcvtid_size,
rcd->egrbufs.size); rcd->egrbufs.size);
/* /*
* Set the contexts rcv array head update threshold to the closest * Set the contexts rcv array head update threshold to the closest
* power of 2 (so we can use a mask instead of modulo) below half * power of 2 (so we can use a mask instead of modulo) below half
......
...@@ -179,7 +179,6 @@ void handle_linkup_change(struct hfi1_devdata *dd, u32 linkup) ...@@ -179,7 +179,6 @@ void handle_linkup_change(struct hfi1_devdata *dd, u32 linkup)
signal_ib_event(ppd, ev); signal_ib_event(ppd, ev);
} }
} }
/* /*
......
...@@ -2310,7 +2310,6 @@ static void a0_portstatus(struct hfi1_pportdata *ppd, ...@@ -2310,7 +2310,6 @@ static void a0_portstatus(struct hfi1_pportdata *ppd,
} }
} }
static int pma_get_opa_portstatus(struct opa_pma_mad *pmp, static int pma_get_opa_portstatus(struct opa_pma_mad *pmp,
struct ib_device *ibdev, u8 port, u32 *resp_len) struct ib_device *ibdev, u8 port, u32 *resp_len)
{ {
......
...@@ -235,7 +235,6 @@ struct ib_pma_portcounters_cong { ...@@ -235,7 +235,6 @@ struct ib_pma_portcounters_cong {
#define IB_CC_SVCTYPE_RD 0x2 #define IB_CC_SVCTYPE_RD 0x2
#define IB_CC_SVCTYPE_UD 0x3 #define IB_CC_SVCTYPE_UD 0x3
/* /*
* There should be an equivalent IB #define for the following, but * There should be an equivalent IB #define for the following, but
* I cannot find it. * I cannot find it.
......
...@@ -447,7 +447,6 @@ void restore_pci_variables(struct hfi1_devdata *dd) ...@@ -447,7 +447,6 @@ void restore_pci_variables(struct hfi1_devdata *dd)
pci_write_config_dword(dd->pcidev, PCIE_CFG_TPH2, dd->pci_tph2); pci_write_config_dword(dd->pcidev, PCIE_CFG_TPH2, dd->pci_tph2);
} }
/* /*
* BIOS may not set PCIe bus-utilization parameters for best performance. * BIOS may not set PCIe bus-utilization parameters for best performance.
* Check and optionally adjust them to maximize our throughput. * Check and optionally adjust them to maximize our throughput.
......
...@@ -852,7 +852,6 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type, ...@@ -852,7 +852,6 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type,
sc->credit_ctrl, sc->credit_ctrl,
thresh); thresh);
return sc; return sc;
} }
......
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
* *
*/ */
/* send context types */ /* send context types */
#define SC_KERNEL 0 #define SC_KERNEL 0
#define SC_ACK 1 #define SC_ACK 1
...@@ -318,7 +317,6 @@ void pio_kernel_unfreeze(struct hfi1_devdata *dd); ...@@ -318,7 +317,6 @@ void pio_kernel_unfreeze(struct hfi1_devdata *dd);
void __cm_reset(struct hfi1_devdata *dd, u64 sendctrl); void __cm_reset(struct hfi1_devdata *dd, u64 sendctrl);
void pio_send_control(struct hfi1_devdata *dd, int op); void pio_send_control(struct hfi1_devdata *dd, int op);
/* PIO copy routines */ /* PIO copy routines */
void pio_copy(struct hfi1_devdata *dd, struct pio_buf *pbuf, u64 pbc, void pio_copy(struct hfi1_devdata *dd, struct pio_buf *pbuf, u64 pbc,
const void *from, size_t count); const void *from, size_t count);
......
...@@ -609,7 +609,6 @@ static void sdma_sw_clean_up_task(unsigned long opaque) ...@@ -609,7 +609,6 @@ static void sdma_sw_clean_up_task(unsigned long opaque)
* descq are ours to play with. * descq are ours to play with.
*/ */
/* /*
* In the error clean up sequence, software clean must be called * In the error clean up sequence, software clean must be called
* before the hardware clean so we can use the hardware head in * before the hardware clean so we can use the hardware head in
...@@ -1690,7 +1689,6 @@ static void set_sdma_integrity(struct sdma_engine *sde) ...@@ -1690,7 +1689,6 @@ static void set_sdma_integrity(struct sdma_engine *sde)
write_sde_csr(sde, SD(CHECK_ENABLE), reg); write_sde_csr(sde, SD(CHECK_ENABLE), reg);
} }
static void init_sdma_regs( static void init_sdma_regs(
struct sdma_engine *sde, struct sdma_engine *sde,
u32 credits, u32 credits,
......
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
/* Hardware limit for SDMA packet size */ /* Hardware limit for SDMA packet size */
#define MAX_SDMA_PKT_SIZE ((16 * 1024) - 1) #define MAX_SDMA_PKT_SIZE ((16 * 1024) - 1)
#define SDMA_TXREQ_S_OK 0 #define SDMA_TXREQ_S_OK 0
#define SDMA_TXREQ_S_SENDERROR 1 #define SDMA_TXREQ_S_SENDERROR 1
#define SDMA_TXREQ_S_ABORTED 2 #define SDMA_TXREQ_S_ABORTED 2
...@@ -418,7 +417,6 @@ struct sdma_engine { ...@@ -418,7 +417,6 @@ struct sdma_engine {
struct list_head flushlist; struct list_head flushlist;
}; };
int sdma_init(struct hfi1_devdata *dd, u8 port); int sdma_init(struct hfi1_devdata *dd, u8 port);
void sdma_start(struct hfi1_devdata *dd); void sdma_start(struct hfi1_devdata *dd);
void sdma_exit(struct hfi1_devdata *dd); void sdma_exit(struct hfi1_devdata *dd);
...@@ -464,7 +462,6 @@ static inline int __sdma_running(struct sdma_engine *engine) ...@@ -464,7 +462,6 @@ static inline int __sdma_running(struct sdma_engine *engine)
return engine->state.current_state == sdma_state_s99_running; return engine->state.current_state == sdma_state_s99_running;
} }
/** /**
* sdma_running() - state suitability test * sdma_running() - state suitability test
* @engine: sdma engine * @engine: sdma engine
...@@ -494,7 +491,6 @@ void _sdma_txreq_ahgadd( ...@@ -494,7 +491,6 @@ void _sdma_txreq_ahgadd(
u32 *ahg, u32 *ahg,
u8 ahg_hlen); u8 ahg_hlen);
/** /**
* sdma_txinit_ahg() - initialize an sdma_txreq struct with AHG * sdma_txinit_ahg() - initialize an sdma_txreq struct with AHG
* @tx: tx request to initialize * @tx: tx request to initialize
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
#include "mad.h" #include "mad.h"
#include "trace.h" #include "trace.h"
/* /*
* Start of per-port congestion control structures and support code * Start of per-port congestion control structures and support code
*/ */
...@@ -254,7 +253,6 @@ HFI1_SC2VL_ATTR(29); ...@@ -254,7 +253,6 @@ HFI1_SC2VL_ATTR(29);
HFI1_SC2VL_ATTR(30); HFI1_SC2VL_ATTR(30);
HFI1_SC2VL_ATTR(31); HFI1_SC2VL_ATTR(31);
static struct attribute *sc2vl_default_attributes[] = { static struct attribute *sc2vl_default_attributes[] = {
&hfi1_sc2vl_attr_0.attr, &hfi1_sc2vl_attr_0.attr,
&hfi1_sc2vl_attr_1.attr, &hfi1_sc2vl_attr_1.attr,
...@@ -360,7 +358,6 @@ HFI1_SL2SC_ATTR(29); ...@@ -360,7 +358,6 @@ HFI1_SL2SC_ATTR(29);
HFI1_SL2SC_ATTR(30); HFI1_SL2SC_ATTR(30);
HFI1_SL2SC_ATTR(31); HFI1_SL2SC_ATTR(31);
static struct attribute *sl2sc_default_attributes[] = { static struct attribute *sl2sc_default_attributes[] = {
&hfi1_sl2sc_attr_0.attr, &hfi1_sl2sc_attr_0.attr,
&hfi1_sl2sc_attr_1.attr, &hfi1_sl2sc_attr_1.attr,
...@@ -493,7 +490,6 @@ static struct kobj_type hfi1_vl2mtu_ktype = { ...@@ -493,7 +490,6 @@ static struct kobj_type hfi1_vl2mtu_ktype = {
.default_attrs = vl2mtu_default_attributes .default_attrs = vl2mtu_default_attributes
}; };
/* end of per-port file structures and support code */ /* end of per-port file structures and support code */
/* /*
...@@ -535,7 +531,6 @@ static ssize_t show_boardversion(struct device *device, ...@@ -535,7 +531,6 @@ static ssize_t show_boardversion(struct device *device,
return scnprintf(buf, PAGE_SIZE, "%s", dd->boardversion); return scnprintf(buf, PAGE_SIZE, "%s", dd->boardversion);
} }
static ssize_t show_nctxts(struct device *device, static ssize_t show_nctxts(struct device *device,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
...@@ -702,7 +697,6 @@ int hfi1_create_port_files(struct ib_device *ibdev, u8 port_num, ...@@ -702,7 +697,6 @@ int hfi1_create_port_files(struct ib_device *ibdev, u8 port_num,
} }
kobject_uevent(&ppd->vl2mtu_kobj, KOBJ_ADD); kobject_uevent(&ppd->vl2mtu_kobj, KOBJ_ADD);
ret = kobject_init_and_add(&ppd->pport_cc_kobj, &port_cc_ktype, ret = kobject_init_and_add(&ppd->pport_cc_kobj, &port_cc_ktype,
kobj, "CCMgtA"); kobj, "CCMgtA");
if (ret) { if (ret) {
......
...@@ -380,7 +380,6 @@ const char *parse_sdma_flags( ...@@ -380,7 +380,6 @@ const char *parse_sdma_flags(
#define __parse_sdma_flags(desc0, desc1) parse_sdma_flags(p, desc0, desc1) #define __parse_sdma_flags(desc0, desc1) parse_sdma_flags(p, desc0, desc1)
#define lrh_name(lrh) { HFI1_##lrh, #lrh } #define lrh_name(lrh) { HFI1_##lrh, #lrh }
#define show_lnh(lrh) \ #define show_lnh(lrh) \
__print_symbolic(lrh, \ __print_symbolic(lrh, \
...@@ -427,7 +426,6 @@ __print_symbolic(opcode, \ ...@@ -427,7 +426,6 @@ __print_symbolic(opcode, \
ib_opcode_name(UD_SEND_ONLY_WITH_IMMEDIATE), \ ib_opcode_name(UD_SEND_ONLY_WITH_IMMEDIATE), \
ib_opcode_name(CNP)) ib_opcode_name(CNP))
#define LRH_PRN "vl %d lver %d sl %d lnh %d,%s dlid %.4x len %d slid %.4x" #define LRH_PRN "vl %d lver %d sl %d lnh %d,%s dlid %.4x len %d slid %.4x"
#define BTH_PRN \ #define BTH_PRN \
"op 0x%.2x,%s se %d m %d pad %d tver %d pkey 0x%.4x " \ "op 0x%.2x,%s se %d m %d pad %d tver %d pkey 0x%.4x " \
...@@ -563,7 +561,6 @@ DEFINE_EVENT(hfi1_ibhdr_template, output_ibhdr, ...@@ -563,7 +561,6 @@ DEFINE_EVENT(hfi1_ibhdr_template, output_ibhdr,
#undef TRACE_SYSTEM #undef TRACE_SYSTEM
#define TRACE_SYSTEM hfi1_snoop #define TRACE_SYSTEM hfi1_snoop
TRACE_EVENT(snoop_capture, TRACE_EVENT(snoop_capture,
TP_PROTO(struct hfi1_devdata *dd, TP_PROTO(struct hfi1_devdata *dd,
int hdr_len, int hdr_len,
...@@ -760,7 +757,6 @@ DECLARE_EVENT_CLASS(hfi1_bct_template, ...@@ -760,7 +757,6 @@ DECLARE_EVENT_CLASS(hfi1_bct_template,
) )
); );
DEFINE_EVENT(hfi1_bct_template, bct_set, DEFINE_EVENT(hfi1_bct_template, bct_set,
TP_PROTO(struct hfi1_devdata *dd, struct buffer_control *bc), TP_PROTO(struct hfi1_devdata *dd, struct buffer_control *bc),
TP_ARGS(dd, bc)); TP_ARGS(dd, bc));
......
...@@ -65,5 +65,4 @@ int hfi1_twsi_blk_rd(struct hfi1_devdata *dd, u32 target, int dev, int addr, ...@@ -65,5 +65,4 @@ int hfi1_twsi_blk_rd(struct hfi1_devdata *dd, u32 target, int dev, int addr,
int hfi1_twsi_blk_wr(struct hfi1_devdata *dd, u32 target, int dev, int addr, int hfi1_twsi_blk_wr(struct hfi1_devdata *dd, u32 target, int dev, int addr,
const void *buffer, int len); const void *buffer, int len);
#endif /* _TWSI_H */ #endif /* _TWSI_H */
...@@ -647,7 +647,6 @@ static int opa_smp_check(struct hfi1_ibport *ibp, u16 pkey, u8 sc5, ...@@ -647,7 +647,6 @@ static int opa_smp_check(struct hfi1_ibport *ibp, u16 pkey, u8 sc5,
return 0; return 0;
} }
/** /**
* hfi1_ud_rcv - receive an incoming UD packet * hfi1_ud_rcv - receive an incoming UD packet
* @ibp: the port the packet came in on * @ibp: the port the packet came in on
......
...@@ -376,7 +376,6 @@ static inline int qp_ok(int opcode, struct hfi1_packet *packet) ...@@ -376,7 +376,6 @@ static inline int qp_ok(int opcode, struct hfi1_packet *packet)
return 0; return 0;
} }
/** /**
* hfi1_ib_rcv - process an incoming packet * hfi1_ib_rcv - process an incoming packet
* @packet: data packet information * @packet: data packet information
...@@ -965,7 +964,6 @@ static inline int egress_pkey_check(struct hfi1_pportdata *ppd, ...@@ -965,7 +964,6 @@ static inline int egress_pkey_check(struct hfi1_pportdata *ppd,
if ((sc5 == 0xf) && ((pkey & PKEY_LOW_15_MASK) != PKEY_LOW_15_MASK)) if ((sc5 == 0xf) && ((pkey & PKEY_LOW_15_MASK) != PKEY_LOW_15_MASK))
goto bad; goto bad;
/* Is the pkey = 0x0, or 0x8000? */ /* Is the pkey = 0x0, or 0x8000? */
if ((pkey & PKEY_LOW_15_MASK) == 0) if ((pkey & PKEY_LOW_15_MASK) == 0)
goto bad; goto bad;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册