]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: lustre: add missing spaces for LNet layer reported by checkpatch.pl
authorJames Simmons <jsimmons@infradead.org>
Fri, 12 Feb 2016 17:06:04 +0000 (12:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Feb 2016 00:20:32 +0000 (16:20 -0800)
Add missing spaces in the code reported by checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 files changed:
drivers/staging/lustre/include/linux/lnet/lib-types.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c
drivers/staging/lustre/lnet/lnet/api-ni.c
drivers/staging/lustre/lnet/lnet/config.c
drivers/staging/lustre/lnet/lnet/lib-eq.c
drivers/staging/lustre/lnet/lnet/lib-socket.c
drivers/staging/lustre/lnet/lnet/nidstrings.c

index 55d9d4311f0c4865df419f3e5c24152e3e6c03b1..42f08c889456a45b9772c81cc872b23f561110e8 100644 (file)
@@ -112,7 +112,7 @@ typedef struct lnet_libhandle {
 } lnet_libhandle_t;
 
 #define lh_entry(ptr, type, member) \
-       ((type *)((char *)(ptr)-(char *)(&((type *)0)->member)))
+       ((type *)((char *)(ptr) - (char *)(&((type *)0)->member)))
 
 typedef struct lnet_eq {
        struct list_head          eq_list;
index 09eaecd536d2bfe144126c69de0329afc7df997b..812d9b53c64883271755c97bcb132e64ae2c41c3 100644 (file)
@@ -1400,7 +1400,7 @@ static int kiblnd_create_fmr_pool(kib_fmr_poolset_t *fps,
        kib_dev_t *dev = fps->fps_net->ibn_dev;
        kib_fmr_pool_t *fpo;
        struct ib_fmr_pool_param param = {
-               .max_pages_per_fmr = LNET_MAX_PAYLOAD/PAGE_SIZE,
+               .max_pages_per_fmr = LNET_MAX_PAYLOAD / PAGE_SIZE,
                .page_shift        = PAGE_SHIFT,
                .access            = (IB_ACCESS_LOCAL_WRITE |
                                      IB_ACCESS_REMOTE_WRITE),
index dbbbf5515b6b5c0c24eb0d4084467eef682f7f8e..288f0d2fe0e8f2a1b33a2727cf59652e3b73b8bd 100644 (file)
@@ -146,7 +146,7 @@ kiblnd_concurrent_sends_v1(void)
 #define IBLND_OOB_CAPABLE(v)       ((v) != IBLND_MSG_VERSION_1)
 #define IBLND_OOB_MSGS(v)         (IBLND_OOB_CAPABLE(v) ? 2 : 0)
 
-#define IBLND_MSG_SIZE       (4<<10)            /* max size of queued messages (inc hdr) */
+#define IBLND_MSG_SIZE         (4 << 10)        /* max size of queued messages (inc hdr) */
 #define IBLND_MAX_RDMA_FRAGS    LNET_MAX_IOV      /* max # of fragments supported */
 #define IBLND_CFG_RDMA_FRAGS       (*kiblnd_tunables.kib_map_on_demand != 0 ? \
                                    *kiblnd_tunables.kib_map_on_demand :      \
@@ -691,7 +691,7 @@ kiblnd_send_keepalive(kib_conn_t *conn)
 {
        return (*kiblnd_tunables.kib_keepalive > 0) &&
                cfs_time_after(jiffies, conn->ibc_last_send +
-                              *kiblnd_tunables.kib_keepalive*HZ);
+                              *kiblnd_tunables.kib_keepalive * HZ);
 }
 
 static inline int
index 6b5a0b3d6fb2abc03678c6877d9f075c5ef04270..46d1810953118fa69c1896bdca4ed8028ee9f64d 100644 (file)
@@ -1217,7 +1217,7 @@ static int kiblnd_resolve_addr(struct rdma_cm_id *cmid,
        }
 
        /* look for a free privileged port */
-       for (port = PROT_SOCK-1; port > 0; port--) {
+       for (port = PROT_SOCK - 1; port > 0; port--) {
                srcaddr->sin_port = htons(port);
                rc = rdma_resolve_addr(cmid,
                                       (struct sockaddr *)srcaddr,
index c428684ef93e45a61d84d396bd99d056ab76c92b..4ab7f298f8e40d19fe61aa9946c28289fd4a8741 100644 (file)
@@ -357,7 +357,7 @@ ksocknal_associate_route_conn_locked(ksock_route_t *route, ksock_conn_t *conn)
                        iface->ksni_nroutes++;
        }
 
-       route->ksnr_connected |= (1<<type);
+       route->ksnr_connected |= (1 << type);
        route->ksnr_conn_count++;
 
        /*
@@ -839,7 +839,7 @@ ksocknal_select_ips(ksock_peer_t *peer, __u32 *peerips, int n_peerips)
                        best_iface->ksni_npeers++;
                        ip = best_iface->ksni_ipaddr;
                        peer->ksnp_passive_ips[i] = ip;
-                       peer->ksnp_n_passive_ips = i+1;
+                       peer->ksnp_n_passive_ips = i + 1;
                }
 
                /* mark the best matching peer IP used */
@@ -2047,8 +2047,8 @@ ksocknal_peer_del_interface_locked(ksock_peer_t *peer, __u32 ipaddr)
 
        for (i = 0; i < peer->ksnp_n_passive_ips; i++)
                if (peer->ksnp_passive_ips[i] == ipaddr) {
-                       for (j = i+1; j < peer->ksnp_n_passive_ips; j++)
-                               peer->ksnp_passive_ips[j-1] =
+                       for (j = i + 1; j < peer->ksnp_n_passive_ips; j++)
+                               peer->ksnp_passive_ips[j - 1] =
                                        peer->ksnp_passive_ips[j];
                        peer->ksnp_n_passive_ips--;
                        break;
@@ -2099,8 +2099,8 @@ ksocknal_del_interface(lnet_ni_t *ni, __u32 ipaddress)
 
                rc = 0;
 
-               for (j = i+1; j < net->ksnn_ninterfaces; j++)
-                       net->ksnn_interfaces[j-1] =
+               for (j = i + 1; j < net->ksnn_ninterfaces; j++)
+                       net->ksnn_interfaces[j - 1] =
                                net->ksnn_interfaces[j];
 
                net->ksnn_ninterfaces--;
index c82ed27be9d70548048a7613f4f8eeca44f4e21a..31b8d46f56a1bd92b8fa0a0fff051d63baf37b8e 100644 (file)
@@ -1960,7 +1960,7 @@ ksocknal_connect (ksock_route_t *route)
                         * so min_reconnectms should be good heuristic
                         */
                        route->ksnr_retry_interval =
-                               cfs_time_seconds(*ksocknal_tunables.ksnd_min_reconnectms)/1000;
+                               cfs_time_seconds(*ksocknal_tunables.ksnd_min_reconnectms) / 1000;
                        route->ksnr_timeout = cfs_time_add(cfs_time_current(),
                                                           route->ksnr_retry_interval);
                }
@@ -1981,10 +1981,10 @@ ksocknal_connect (ksock_route_t *route)
        route->ksnr_retry_interval *= 2;
        route->ksnr_retry_interval =
                max(route->ksnr_retry_interval,
-                   cfs_time_seconds(*ksocknal_tunables.ksnd_min_reconnectms)/1000);
+                   cfs_time_seconds(*ksocknal_tunables.ksnd_min_reconnectms) / 1000);
        route->ksnr_retry_interval =
                min(route->ksnr_retry_interval,
-                   cfs_time_seconds(*ksocknal_tunables.ksnd_max_reconnectms)/1000);
+                   cfs_time_seconds(*ksocknal_tunables.ksnd_max_reconnectms) / 1000);
 
        LASSERT (route->ksnr_retry_interval != 0);
        route->ksnr_timeout = cfs_time_add(cfs_time_current(),
index 374ba6793784b30cbf18e01b7d5fe281cb35c2f1..77ce597df98c43aed152d212205645af59d7d6a7 100644 (file)
@@ -74,7 +74,7 @@ static int typed_conns = 1;
 module_param(typed_conns, int, 0444);
 MODULE_PARM_DESC(typed_conns, "use different sockets for bulk");
 
-static int min_bulk = 1<<10;
+static int min_bulk = 1 << 10;
 module_param(min_bulk, int, 0644);
 MODULE_PARM_DESC(min_bulk, "smallest 'large' message");
 
index 78188a9017538bb0bf44b4771caa6e62027bb5c9..f7d53cdfbd99a95b3b3b8ca794733770dd5243c8 100644 (file)
@@ -1394,7 +1394,7 @@ LNetCtl(unsigned int cmd, void *arg)
                id.pid = data->ioc_u32[0];
                rc = lnet_ping(id, data->ioc_u32[1], /* timeout */
                               data->ioc_pbuf1,
-                              data->ioc_plen1/sizeof(lnet_process_id_t));
+                              data->ioc_plen1 / sizeof(lnet_process_id_t));
                if (rc < 0)
                        return rc;
                data->ioc_count = rc;
index 695db24d451bc989d1674f2a954003d137efd18a..e30a959ffc036acbc7f91140f2cf281df3cac90e 100644 (file)
@@ -44,8 +44,8 @@ struct lnet_text_buf {            /* tmp struct for parsing routes */
 };
 
 static int lnet_tbnob;                 /* track text buf allocation */
-#define LNET_MAX_TEXTBUF_NOB     (64<<10)      /* bound allocation */
-#define LNET_SINGLE_TEXTBUF_NOB  (4<<10)
+#define LNET_MAX_TEXTBUF_NOB     (64 << 10)    /* bound allocation */
+#define LNET_SINGLE_TEXTBUF_NOB  (4 << 10)
 
 static void
 lnet_syntax(char *name, char *str, int offset, int width)
@@ -54,9 +54,9 @@ lnet_syntax(char *name, char *str, int offset, int width)
        static char dashes[LNET_SINGLE_TEXTBUF_NOB];
 
        memset(dots, '.', sizeof(dots));
-       dots[sizeof(dots)-1] = 0;
+       dots[sizeof(dots) - 1] = 0;
        memset(dashes, '-', sizeof(dashes));
-       dashes[sizeof(dashes)-1] = 0;
+       dashes[sizeof(dashes) - 1] = 0;
 
        LCONSOLE_ERROR_MSG(0x10f, "Error parsing '%s=\"%s\"'\n", name, str);
        LCONSOLE_ERROR_MSG(0x110, "here...........%.*s..%.*s|%.*s|\n",
@@ -492,7 +492,7 @@ lnet_expand1tb(struct list_head *list,
 
        memcpy(ltb->ltb_text, str, len1);
        memcpy(&ltb->ltb_text[len1], item, itemlen);
-       memcpy(&ltb->ltb_text[len1+itemlen], sep2 + 1, len2);
+       memcpy(&ltb->ltb_text[len1 + itemlen], sep2 + 1, len2);
        ltb->ltb_text[len1 + itemlen + len2] = 0;
 
        list_add_tail(&ltb->ltb_list, list);
@@ -542,7 +542,6 @@ lnet_str2tbs_expand(struct list_head *tbs, char *str)
                                                   (int)(enditem - parsed)) != 0) {
                                        goto failed;
                                }
-
                                continue;
                        }
 
@@ -605,7 +604,7 @@ lnet_parse_priority(char *str, unsigned int *priority, char **token)
        }
        len = strlen(sep + 1);
 
-       if ((sscanf((sep+1), "%u%n", priority, &nob) < 1) || (len != nob)) {
+       if ((sscanf((sep + 1), "%u%n", priority, &nob) < 1) || (len != nob)) {
                /*
                 * Update the caller's token pointer so it treats the found
                 * priority as the token to report in the error message.
@@ -1020,7 +1019,7 @@ lnet_match_networks(char **networksp, char *ip2nets, __u32 *ipaddrs, int nip)
                tb = list_entry(raw_entries.next, struct lnet_text_buf,
                                ltb_list);
                strncpy(source, tb->ltb_text, sizeof(source));
-               source[sizeof(source)-1] = '\0';
+               source[sizeof(source) - 1] = '\0';
 
                /* replace ltb_text with the network(s) add on match */
                rc = lnet_match_network_tokens(tb->ltb_text, ipaddrs, nip);
index e543cb4b11ec915e34603fc11b4b5dcecc26a663..683eb45aecf5b739ad1e47a33eac3b54ec2c0b4d 100644 (file)
@@ -332,7 +332,6 @@ __must_hold(&the_lnet.ln_eq_wait_lock)
 
        if (tms < 0) {
                schedule();
-
        } else {
                now = jiffies;
                schedule_timeout(msecs_to_jiffies(tms));
index 0b3ef1740b26c5973bea8e9515da408004c2249d..f775879b3396f3831881fbd9e0e0fd7fa578f5d3 100644 (file)
@@ -159,7 +159,7 @@ lnet_ipif_enumerate(char ***namesp)
        for (;;) {
                if (nalloc * sizeof(*ifr) > PAGE_CACHE_SIZE) {
                        toobig = 1;
-                       nalloc = PAGE_CACHE_SIZE/sizeof(*ifr);
+                       nalloc = PAGE_CACHE_SIZE / sizeof(*ifr);
                        CWARN("Too many interfaces: only enumerating first %d\n",
                              nalloc);
                }
@@ -183,7 +183,7 @@ lnet_ipif_enumerate(char ***namesp)
 
                LASSERT(rc == 0);
 
-               nfound = ifc.ifc_len/sizeof(*ifr);
+               nfound = ifc.ifc_len / sizeof(*ifr);
                LASSERT(nfound <= nalloc);
 
                if (nfound < nalloc || toobig)
index 00de4faf2b829053dc3d76bfbf261afaddd5b488..449efc7b49ca85df2b9a3559f8a8edafbdf931b0 100644 (file)
@@ -808,7 +808,7 @@ libcfs_ip_str2addr(const char *str, int nob, __u32 *addr)
            n == nob &&
            (a & ~0xff) == 0 && (b & ~0xff) == 0 &&
            (c & ~0xff) == 0 && (d & ~0xff) == 0) {
-               *addr = ((a<<24)|(b<<16)|(c<<8)|d);
+               *addr = ((a << 24) | (b << 16) | (c << 8) | d);
                return 1;
        }