Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

RDMA/core: Remove redundant spaces

Space is not required after '(', before ')', before ',' and between '*'
and symbol name of a definition.

Link: https://lore.kernel.org/r/1617783353-48249-5-git-send-email-liweihang@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

authored by

Wenpeng Liang and committed by
Jason Gunthorpe
f681967a 9516b8f9

+48 -48
+15 -16
drivers/infiniband/core/cm.c
··· 420 420 return 0; 421 421 } 422 422 423 - static void * cm_copy_private_data(const void *private_data, 424 - u8 private_data_len) 423 + static void *cm_copy_private_data(const void *private_data, u8 private_data_len) 425 424 { 426 425 void *data; 427 426 ··· 679 680 return cm_id_priv; 680 681 } 681 682 682 - static struct cm_id_private * cm_find_listen(struct ib_device *device, 683 - __be64 service_id) 683 + static struct cm_id_private *cm_find_listen(struct ib_device *device, 684 + __be64 service_id) 684 685 { 685 686 struct rb_node *node = cm.listen_service_table.rb_node; 686 687 struct cm_id_private *cm_id_priv; ··· 707 708 return NULL; 708 709 } 709 710 710 - static struct cm_timewait_info * cm_insert_remote_id(struct cm_timewait_info 711 - *timewait_info) 711 + static struct cm_timewait_info * 712 + cm_insert_remote_id(struct cm_timewait_info *timewait_info) 712 713 { 713 714 struct rb_node **link = &cm.remote_id_table.rb_node; 714 715 struct rb_node *parent = NULL; ··· 766 767 return res; 767 768 } 768 769 769 - static struct cm_timewait_info * cm_insert_remote_qpn(struct cm_timewait_info 770 - *timewait_info) 770 + static struct cm_timewait_info * 771 + cm_insert_remote_qpn(struct cm_timewait_info *timewait_info) 771 772 { 772 773 struct rb_node **link = &cm.remote_qp_table.rb_node; 773 774 struct rb_node *parent = NULL; ··· 796 797 return NULL; 797 798 } 798 799 799 - static struct cm_id_private * cm_insert_remote_sidr(struct cm_id_private 800 - *cm_id_priv) 800 + static struct cm_id_private * 801 + cm_insert_remote_sidr(struct cm_id_private *cm_id_priv) 801 802 { 802 803 struct rb_node **link = &cm.remote_sidr_table.rb_node; 803 804 struct rb_node *parent = NULL; ··· 896 897 } 897 898 EXPORT_SYMBOL(ib_create_cm_id); 898 899 899 - static struct cm_work * cm_dequeue_work(struct cm_id_private *cm_id_priv) 900 + static struct cm_work *cm_dequeue_work(struct cm_id_private *cm_id_priv) 900 901 { 901 902 struct cm_work *work; 902 903 ··· 985 986 } 986 987 } 987 988 988 - static struct cm_timewait_info * cm_create_timewait_info(__be32 local_id) 989 + static struct cm_timewait_info *cm_create_timewait_info(__be32 local_id) 989 990 { 990 991 struct cm_timewait_info *timewait_info; 991 992 ··· 1976 1977 free: cm_free_msg(msg); 1977 1978 } 1978 1979 1979 - static struct cm_id_private * cm_match_req(struct cm_work *work, 1980 - struct cm_id_private *cm_id_priv) 1980 + static struct cm_id_private *cm_match_req(struct cm_work *work, 1981 + struct cm_id_private *cm_id_priv) 1981 1982 { 1982 1983 struct cm_id_private *listen_cm_id_priv, *cur_cm_id_priv; 1983 1984 struct cm_timewait_info *timewait_info; ··· 2993 2994 IBA_GET_MEM_PTR(CM_REJ_PRIVATE_DATA, rej_msg); 2994 2995 } 2995 2996 2996 - static struct cm_id_private * cm_acquire_rejected_id(struct cm_rej_msg *rej_msg) 2997 + static struct cm_id_private *cm_acquire_rejected_id(struct cm_rej_msg *rej_msg) 2997 2998 { 2998 2999 struct cm_id_private *cm_id_priv; 2999 3000 __be32 remote_id; ··· 3155 3156 } 3156 3157 EXPORT_SYMBOL(ib_send_cm_mra); 3157 3158 3158 - static struct cm_id_private * cm_acquire_mraed_id(struct cm_mra_msg *mra_msg) 3159 + static struct cm_id_private *cm_acquire_mraed_id(struct cm_mra_msg *mra_msg) 3159 3160 { 3160 3161 switch (IBA_GET(CM_MRA_MESSAGE_MRAED, mra_msg)) { 3161 3162 case CM_MSG_RESPONSE_REQ:
+11 -11
drivers/infiniband/core/mad.c
··· 807 807 808 808 /* Allocate data segments. */ 809 809 for (left = send_buf->data_len + pad; left > 0; left -= seg_size) { 810 - seg = kmalloc(sizeof (*seg) + seg_size, gfp_mask); 810 + seg = kmalloc(sizeof(*seg) + seg_size, gfp_mask); 811 811 if (!seg) { 812 812 free_send_rmpp_list(send_wr); 813 813 return -ENOMEM; ··· 837 837 } 838 838 EXPORT_SYMBOL(ib_mad_kernel_rmpp_agent); 839 839 840 - struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent, 841 - u32 remote_qpn, u16 pkey_index, 842 - int rmpp_active, 843 - int hdr_len, int data_len, 844 - gfp_t gfp_mask, 845 - u8 base_version) 840 + struct ib_mad_send_buf *ib_create_send_mad(struct ib_mad_agent *mad_agent, 841 + u32 remote_qpn, u16 pkey_index, 842 + int rmpp_active, int hdr_len, 843 + int data_len, gfp_t gfp_mask, 844 + u8 base_version) 846 845 { 847 846 struct ib_mad_agent_private *mad_agent_priv; 848 847 struct ib_mad_send_wr_private *mad_send_wr; ··· 1676 1677 rwc->recv_buf.mad->mad_hdr.mgmt_class; 1677 1678 } 1678 1679 1679 - static inline int rcv_has_same_gid(const struct ib_mad_agent_private *mad_agent_priv, 1680 - const struct ib_mad_send_wr_private *wr, 1681 - const struct ib_mad_recv_wc *rwc ) 1680 + static inline int 1681 + rcv_has_same_gid(const struct ib_mad_agent_private *mad_agent_priv, 1682 + const struct ib_mad_send_wr_private *wr, 1683 + const struct ib_mad_recv_wc *rwc) 1682 1684 { 1683 1685 struct rdma_ah_attr attr; 1684 1686 u8 send_resp, rcv_resp; ··· 2256 2256 adjust_timeout(mad_agent_priv); 2257 2257 spin_unlock_irqrestore(&mad_agent_priv->lock, flags); 2258 2258 2259 - if (mad_send_wr->status != IB_WC_SUCCESS ) 2259 + if (mad_send_wr->status != IB_WC_SUCCESS) 2260 2260 mad_send_wc->status = mad_send_wr->status; 2261 2261 if (ret == IB_RMPP_RESULT_INTERNAL) 2262 2262 ib_rmpp_send_handler(mad_send_wc);
+5 -5
drivers/infiniband/core/mad_rmpp.c
··· 382 382 return be32_to_cpu(rmpp_mad->rmpp_hdr.seg_num); 383 383 } 384 384 385 - static inline struct ib_mad_recv_buf * get_next_seg(struct list_head *rmpp_list, 386 - struct ib_mad_recv_buf *seg) 385 + static inline struct ib_mad_recv_buf *get_next_seg(struct list_head *rmpp_list, 386 + struct ib_mad_recv_buf *seg) 387 387 { 388 388 if (seg->list.next == rmpp_list) 389 389 return NULL; ··· 396 396 return max(agent->qp_info->recv_queue.max_active >> 3, 1); 397 397 } 398 398 399 - static struct ib_mad_recv_buf * find_seg_location(struct list_head *rmpp_list, 400 - int seg_num) 399 + static struct ib_mad_recv_buf *find_seg_location(struct list_head *rmpp_list, 400 + int seg_num) 401 401 { 402 402 struct ib_mad_recv_buf *seg_buf; 403 403 int cur_seg_num; ··· 449 449 return hdr_size + rmpp_recv->seg_num * data_size - pad; 450 450 } 451 451 452 - static struct ib_mad_recv_wc * complete_rmpp(struct mad_rmpp_recv *rmpp_recv) 452 + static struct ib_mad_recv_wc *complete_rmpp(struct mad_rmpp_recv *rmpp_recv) 453 453 { 454 454 struct ib_mad_recv_wc *rmpp_wc; 455 455
+3 -3
drivers/infiniband/core/sysfs.c
··· 297 297 298 298 static const char *phys_state_to_str(enum ib_port_phys_state phys_state) 299 299 { 300 - static const char * phys_state_str[] = { 300 + static const char *phys_state_str[] = { 301 301 "<unknown>", 302 302 "Sleep", 303 303 "Polling", ··· 470 470 struct port_table_attribute port_pma_attr_##_name = { \ 471 471 .attr = __ATTR(_name, S_IRUGO, show_pma_counter, NULL), \ 472 472 .index = (_offset) | ((_width) << 16) | ((_counter) << 24), \ 473 - .attr_id = IB_PMA_PORT_COUNTERS , \ 473 + .attr_id = IB_PMA_PORT_COUNTERS, \ 474 474 } 475 475 476 476 #define PORT_PMA_ATTR_EXT(_name, _width, _offset) \ 477 477 struct port_table_attribute port_pma_attr_ext_##_name = { \ 478 478 .attr = __ATTR(_name, S_IRUGO, show_pma_counter, NULL), \ 479 479 .index = (_offset) | ((_width) << 16), \ 480 - .attr_id = IB_PMA_PORT_COUNTERS_EXT , \ 480 + .attr_id = IB_PMA_PORT_COUNTERS_EXT, \ 481 481 } 482 482 483 483 /*
+2 -2
drivers/infiniband/core/user_mad.c
··· 165 165 166 166 static int hdr_size(struct ib_umad_file *file) 167 167 { 168 - return file->use_pkey_index ? sizeof (struct ib_user_mad_hdr) : 169 - sizeof (struct ib_user_mad_hdr_old); 168 + return file->use_pkey_index ? sizeof(struct ib_user_mad_hdr) : 169 + sizeof(struct ib_user_mad_hdr_old); 170 170 } 171 171 172 172 /* caller must hold file->mutex */
+12 -11
drivers/infiniband/core/uverbs_cmd.c
··· 2002 2002 2003 2003 static void *alloc_wr(size_t wr_size, __u32 num_sge) 2004 2004 { 2005 - if (num_sge >= (U32_MAX - ALIGN(wr_size, sizeof (struct ib_sge))) / 2006 - sizeof (struct ib_sge)) 2005 + if (num_sge >= (U32_MAX - ALIGN(wr_size, sizeof(struct ib_sge))) / 2006 + sizeof(struct ib_sge)) 2007 2007 return NULL; 2008 2008 2009 - return kmalloc(ALIGN(wr_size, sizeof (struct ib_sge)) + 2010 - num_sge * sizeof (struct ib_sge), GFP_KERNEL); 2009 + return kmalloc(ALIGN(wr_size, sizeof(struct ib_sge)) + 2010 + num_sge * sizeof(struct ib_sge), 2011 + GFP_KERNEL); 2011 2012 } 2012 2013 2013 2014 static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs) ··· 2217 2216 const struct ib_sge __user *sgls; 2218 2217 const void __user *wqes; 2219 2218 2220 - if (wqe_size < sizeof (struct ib_uverbs_recv_wr)) 2219 + if (wqe_size < sizeof(struct ib_uverbs_recv_wr)) 2221 2220 return ERR_PTR(-EINVAL); 2222 2221 2223 2222 wqes = uverbs_request_next_ptr(iter, wqe_size * wr_count); ··· 2250 2249 } 2251 2250 2252 2251 if (user_wr->num_sge >= 2253 - (U32_MAX - ALIGN(sizeof *next, sizeof (struct ib_sge))) / 2254 - sizeof (struct ib_sge)) { 2252 + (U32_MAX - ALIGN(sizeof(*next), sizeof(struct ib_sge))) / 2253 + sizeof(struct ib_sge)) { 2255 2254 ret = -EINVAL; 2256 2255 goto err; 2257 2256 } 2258 2257 2259 - next = kmalloc(ALIGN(sizeof *next, sizeof (struct ib_sge)) + 2260 - user_wr->num_sge * sizeof (struct ib_sge), 2258 + next = kmalloc(ALIGN(sizeof(*next), sizeof(struct ib_sge)) + 2259 + user_wr->num_sge * sizeof(struct ib_sge), 2261 2260 GFP_KERNEL); 2262 2261 if (!next) { 2263 2262 ret = -ENOMEM; ··· 2275 2274 next->num_sge = user_wr->num_sge; 2276 2275 2277 2276 if (next->num_sge) { 2278 - next->sg_list = (void *) next + 2279 - ALIGN(sizeof *next, sizeof (struct ib_sge)); 2277 + next->sg_list = (void *)next + 2278 + ALIGN(sizeof(*next), sizeof(struct ib_sge)); 2280 2279 if (copy_from_user(next->sg_list, sgls + sg_ind, 2281 2280 next->num_sge * 2282 2281 sizeof(struct ib_sge))) {