aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_main.c
diff options
context:
space:
mode:
authorHoang-Nam Nguyen <hnguyen@de.ibm.com>2007-07-12 11:53:47 -0400
committerRoland Dreier <rolandd@cisco.com>2007-07-17 21:37:40 -0400
commit2b94397adc68c2f0f851539884cc426e03444a26 (patch)
treef510f23f62efea31f1de472c6a384d55f593b6be /drivers/infiniband/hw/ehca/ehca_main.c
parent187c72e31f92791ec70395b80aa9883f2edad97f (diff)
IB/ehca: Fix warnings issued by checkpatch.pl
Run the existing ehca code through checkpatch.pl and clean up the worst of the coding style violations. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_main.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_main.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
index 203d01f87c30..36377c6db3d4 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -107,7 +107,7 @@ static DEFINE_SPINLOCK(shca_list_lock);
107static struct timer_list poll_eqs_timer; 107static struct timer_list poll_eqs_timer;
108 108
109#ifdef CONFIG_PPC_64K_PAGES 109#ifdef CONFIG_PPC_64K_PAGES
110static struct kmem_cache *ctblk_cache = NULL; 110static struct kmem_cache *ctblk_cache;
111 111
112void *ehca_alloc_fw_ctrlblock(gfp_t flags) 112void *ehca_alloc_fw_ctrlblock(gfp_t flags)
113{ 113{
@@ -200,8 +200,8 @@ static void ehca_destroy_slab_caches(void)
200#endif 200#endif
201} 201}
202 202
203#define EHCA_HCAAVER EHCA_BMASK_IBM(32,39) 203#define EHCA_HCAAVER EHCA_BMASK_IBM(32, 39)
204#define EHCA_REVID EHCA_BMASK_IBM(40,63) 204#define EHCA_REVID EHCA_BMASK_IBM(40, 63)
205 205
206static struct cap_descr { 206static struct cap_descr {
207 u64 mask; 207 u64 mask;
@@ -295,7 +295,7 @@ int ehca_sense_attributes(struct ehca_shca *shca)
295 if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap)) 295 if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap))
296 ehca_gen_dbg(" %s", hca_cap_descr[i].descr); 296 ehca_gen_dbg(" %s", hca_cap_descr[i].descr);
297 297
298 port = (struct hipz_query_port *) rblock; 298 port = (struct hipz_query_port *)rblock;
299 h_ret = hipz_h_query_port(shca->ipz_hca_handle, 1, port); 299 h_ret = hipz_h_query_port(shca->ipz_hca_handle, 1, port);
300 if (h_ret != H_SUCCESS) { 300 if (h_ret != H_SUCCESS) {
301 ehca_gen_err("Cannot query port properties. h_ret=%lx", 301 ehca_gen_err("Cannot query port properties. h_ret=%lx",
@@ -444,7 +444,7 @@ static int ehca_create_aqp1(struct ehca_shca *shca, u32 port)
444 return -EPERM; 444 return -EPERM;
445 } 445 }
446 446
447 ibcq = ib_create_cq(&shca->ib_device, NULL, NULL, (void*)(-1), 10, 0); 447 ibcq = ib_create_cq(&shca->ib_device, NULL, NULL, (void *)(-1), 10, 0);
448 if (IS_ERR(ibcq)) { 448 if (IS_ERR(ibcq)) {
449 ehca_err(&shca->ib_device, "Cannot create AQP1 CQ."); 449 ehca_err(&shca->ib_device, "Cannot create AQP1 CQ.");
450 return PTR_ERR(ibcq); 450 return PTR_ERR(ibcq);
@@ -671,7 +671,7 @@ static int __devinit ehca_probe(struct ibmebus_dev *dev,
671 } 671 }
672 672
673 /* create internal protection domain */ 673 /* create internal protection domain */
674 ibpd = ehca_alloc_pd(&shca->ib_device, (void*)(-1), NULL); 674 ibpd = ehca_alloc_pd(&shca->ib_device, (void *)(-1), NULL);
675 if (IS_ERR(ibpd)) { 675 if (IS_ERR(ibpd)) {
676 ehca_err(&shca->ib_device, "Cannot create internal PD."); 676 ehca_err(&shca->ib_device, "Cannot create internal PD.");
677 ret = PTR_ERR(ibpd); 677 ret = PTR_ERR(ibpd);
@@ -868,18 +868,21 @@ int __init ehca_module_init(void)
868 printk(KERN_INFO "eHCA Infiniband Device Driver " 868 printk(KERN_INFO "eHCA Infiniband Device Driver "
869 "(Rel.: SVNEHCA_0023)\n"); 869 "(Rel.: SVNEHCA_0023)\n");
870 870
871 if ((ret = ehca_create_comp_pool())) { 871 ret = ehca_create_comp_pool();
872 if (ret) {
872 ehca_gen_err("Cannot create comp pool."); 873 ehca_gen_err("Cannot create comp pool.");
873 return ret; 874 return ret;
874 } 875 }
875 876
876 if ((ret = ehca_create_slab_caches())) { 877 ret = ehca_create_slab_caches();
878 if (ret) {
877 ehca_gen_err("Cannot create SLAB caches"); 879 ehca_gen_err("Cannot create SLAB caches");
878 ret = -ENOMEM; 880 ret = -ENOMEM;
879 goto module_init1; 881 goto module_init1;
880 } 882 }
881 883
882 if ((ret = ibmebus_register_driver(&ehca_driver))) { 884 ret = ibmebus_register_driver(&ehca_driver);
885 if (ret) {
883 ehca_gen_err("Cannot register eHCA device driver"); 886 ehca_gen_err("Cannot register eHCA device driver");
884 ret = -EINVAL; 887 ret = -EINVAL;
885 goto module_init2; 888 goto module_init2;