* [PATCH] staging: lustre: o2iblnd: replace space indentation with tabs
@ 2016-11-05 0:02 Nicholas Hanley
2016-11-07 2:02 ` James Simmons
0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Hanley @ 2016-11-05 0:02 UTC (permalink / raw)
To: oleg.drokin, andreas.dilger, gregkh, jsimmons
Cc: lustre-devel, devel, linux-kernel, Nicholas Hanley
This patch fixes all CODE_INDENT checkpatch errors in o2iblnd.
Signed-off-by: Nicholas Hanley <nicholasjhanley@gmail.com>
---
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +-
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
index 9e88021..13235b0 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
@@ -1637,7 +1637,7 @@ int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx,
{
__u64 *pages = tx->tx_pages;
bool is_rx = (rd != tx->tx_rd);
- bool tx_pages_mapped = 0;
+ bool tx_pages_mapped = 0;
struct kib_fmr_pool *fpo;
int npages = 0;
__u64 version;
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index b27de88..92692a2 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -1912,12 +1912,12 @@ kiblnd_close_conn_locked(struct kib_conn *conn, int error)
libcfs_nid2str(peer->ibp_nid));
} else {
CNETERR("Closing conn to %s: error %d%s%s%s%s%s\n",
- libcfs_nid2str(peer->ibp_nid), error,
- list_empty(&conn->ibc_tx_queue) ? "" : "(sending)",
- list_empty(&conn->ibc_tx_noops) ? "" : "(sending_noops)",
- list_empty(&conn->ibc_tx_queue_rsrvd) ? "" : "(sending_rsrvd)",
- list_empty(&conn->ibc_tx_queue_nocred) ? "" : "(sending_nocred)",
- list_empty(&conn->ibc_active_txs) ? "" : "(waiting)");
+ libcfs_nid2str(peer->ibp_nid), error,
+ list_empty(&conn->ibc_tx_queue) ? "" : "(sending)",
+ list_empty(&conn->ibc_tx_noops) ? "" : "(sending_noops)",
+ list_empty(&conn->ibc_tx_queue_rsrvd) ? "" : "(sending_rsrvd)",
+ list_empty(&conn->ibc_tx_queue_nocred) ? "" : "(sending_nocred)",
+ list_empty(&conn->ibc_active_txs) ? "" : "(waiting)");
}
dev = ((struct kib_net *)peer->ibp_ni->ni_data)->ibn_dev;
@@ -2643,7 +2643,7 @@ kiblnd_check_reconnect(struct kib_conn *conn, int version,
if (incarnation)
peer->ibp_incarnation = incarnation;
out:
- write_unlock_irqrestore(glock, flags);
+ write_unlock_irqrestore(glock, flags);
CNETERR("%s: %s (%s), %x, %x, msg_size: %d, queue_depth: %d/%d, max_frags: %d/%d\n",
libcfs_nid2str(peer->ibp_nid),
@@ -2651,7 +2651,7 @@ kiblnd_check_reconnect(struct kib_conn *conn, int version,
reason, IBLND_MSG_VERSION, version, msg_size,
conn->ibc_queue_depth, queue_dep,
conn->ibc_max_frags, frag_num);
- /**
+ /**
* if conn::ibc_reconnect is TRUE, connd will reconnect to the peer
* while destroying the zombie
*/
@@ -2976,7 +2976,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event)
case RDMA_CM_EVENT_ADDR_ERROR:
peer = (struct kib_peer *)cmid->context;
CNETERR("%s: ADDR ERROR %d\n",
- libcfs_nid2str(peer->ibp_nid), event->status);
+ libcfs_nid2str(peer->ibp_nid), event->status);
kiblnd_peer_connect_failed(peer, 1, -EHOSTUNREACH);
kiblnd_peer_decref(peer);
return -EHOSTUNREACH; /* rc destroys cmid */
@@ -3021,7 +3021,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event)
return kiblnd_active_connect(cmid);
CNETERR("Can't resolve route for %s: %d\n",
- libcfs_nid2str(peer->ibp_nid), event->status);
+ libcfs_nid2str(peer->ibp_nid), event->status);
kiblnd_peer_connect_failed(peer, 1, event->status);
kiblnd_peer_decref(peer);
return event->status; /* rc destroys cmid */
@@ -3031,7 +3031,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event)
LASSERT(conn->ibc_state == IBLND_CONN_ACTIVE_CONNECT ||
conn->ibc_state == IBLND_CONN_PASSIVE_WAIT);
CNETERR("%s: UNREACHABLE %d\n",
- libcfs_nid2str(conn->ibc_peer->ibp_nid), event->status);
+ libcfs_nid2str(conn->ibc_peer->ibp_nid), event->status);
kiblnd_connreq_done(conn, -ENETDOWN);
kiblnd_conn_decref(conn);
return 0;
--
2.10.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: lustre: o2iblnd: replace space indentation with tabs
2016-11-05 0:02 [PATCH] staging: lustre: o2iblnd: replace space indentation with tabs Nicholas Hanley
@ 2016-11-07 2:02 ` James Simmons
2016-11-07 2:47 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: James Simmons @ 2016-11-07 2:02 UTC (permalink / raw)
To: Nicholas Hanley
Cc: oleg.drokin, andreas.dilger, gregkh, lustre-devel, devel, linux-kernel
> This patch fixes all CODE_INDENT checkpatch errors in o2iblnd.
Reviewed-by: James Simmons <jsimmons@infradead.org>
> Signed-off-by: Nicholas Hanley <nicholasjhanley@gmail.com>
> ---
> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +-
> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 22 +++++++++++-----------
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
> index 9e88021..13235b0 100644
> --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
> +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
> @@ -1637,7 +1637,7 @@ int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx,
> {
> __u64 *pages = tx->tx_pages;
> bool is_rx = (rd != tx->tx_rd);
> - bool tx_pages_mapped = 0;
> + bool tx_pages_mapped = 0;
> struct kib_fmr_pool *fpo;
> int npages = 0;
> __u64 version;
> diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
> index b27de88..92692a2 100644
> --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
> +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
> @@ -1912,12 +1912,12 @@ kiblnd_close_conn_locked(struct kib_conn *conn, int error)
> libcfs_nid2str(peer->ibp_nid));
> } else {
> CNETERR("Closing conn to %s: error %d%s%s%s%s%s\n",
> - libcfs_nid2str(peer->ibp_nid), error,
> - list_empty(&conn->ibc_tx_queue) ? "" : "(sending)",
> - list_empty(&conn->ibc_tx_noops) ? "" : "(sending_noops)",
> - list_empty(&conn->ibc_tx_queue_rsrvd) ? "" : "(sending_rsrvd)",
> - list_empty(&conn->ibc_tx_queue_nocred) ? "" : "(sending_nocred)",
> - list_empty(&conn->ibc_active_txs) ? "" : "(waiting)");
> + libcfs_nid2str(peer->ibp_nid), error,
> + list_empty(&conn->ibc_tx_queue) ? "" : "(sending)",
> + list_empty(&conn->ibc_tx_noops) ? "" : "(sending_noops)",
> + list_empty(&conn->ibc_tx_queue_rsrvd) ? "" : "(sending_rsrvd)",
> + list_empty(&conn->ibc_tx_queue_nocred) ? "" : "(sending_nocred)",
> + list_empty(&conn->ibc_active_txs) ? "" : "(waiting)");
> }
>
> dev = ((struct kib_net *)peer->ibp_ni->ni_data)->ibn_dev;
> @@ -2643,7 +2643,7 @@ kiblnd_check_reconnect(struct kib_conn *conn, int version,
> if (incarnation)
> peer->ibp_incarnation = incarnation;
> out:
> - write_unlock_irqrestore(glock, flags);
> + write_unlock_irqrestore(glock, flags);
>
> CNETERR("%s: %s (%s), %x, %x, msg_size: %d, queue_depth: %d/%d, max_frags: %d/%d\n",
> libcfs_nid2str(peer->ibp_nid),
> @@ -2651,7 +2651,7 @@ kiblnd_check_reconnect(struct kib_conn *conn, int version,
> reason, IBLND_MSG_VERSION, version, msg_size,
> conn->ibc_queue_depth, queue_dep,
> conn->ibc_max_frags, frag_num);
> - /**
> + /**
> * if conn::ibc_reconnect is TRUE, connd will reconnect to the peer
> * while destroying the zombie
> */
> @@ -2976,7 +2976,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event)
> case RDMA_CM_EVENT_ADDR_ERROR:
> peer = (struct kib_peer *)cmid->context;
> CNETERR("%s: ADDR ERROR %d\n",
> - libcfs_nid2str(peer->ibp_nid), event->status);
> + libcfs_nid2str(peer->ibp_nid), event->status);
> kiblnd_peer_connect_failed(peer, 1, -EHOSTUNREACH);
> kiblnd_peer_decref(peer);
> return -EHOSTUNREACH; /* rc destroys cmid */
> @@ -3021,7 +3021,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event)
> return kiblnd_active_connect(cmid);
>
> CNETERR("Can't resolve route for %s: %d\n",
> - libcfs_nid2str(peer->ibp_nid), event->status);
> + libcfs_nid2str(peer->ibp_nid), event->status);
> kiblnd_peer_connect_failed(peer, 1, event->status);
> kiblnd_peer_decref(peer);
> return event->status; /* rc destroys cmid */
> @@ -3031,7 +3031,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event)
> LASSERT(conn->ibc_state == IBLND_CONN_ACTIVE_CONNECT ||
> conn->ibc_state == IBLND_CONN_PASSIVE_WAIT);
> CNETERR("%s: UNREACHABLE %d\n",
> - libcfs_nid2str(conn->ibc_peer->ibp_nid), event->status);
> + libcfs_nid2str(conn->ibc_peer->ibp_nid), event->status);
> kiblnd_connreq_done(conn, -ENETDOWN);
> kiblnd_conn_decref(conn);
> return 0;
> --
> 2.10.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: lustre: o2iblnd: replace space indentation with tabs
2016-11-07 2:02 ` James Simmons
@ 2016-11-07 2:47 ` Joe Perches
2016-11-07 3:55 ` James Simmons
0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2016-11-07 2:47 UTC (permalink / raw)
To: James Simmons, Nicholas Hanley
Cc: oleg.drokin, andreas.dilger, gregkh, lustre-devel, devel, linux-kernel
On Mon, 2016-11-07 at 02:02 +0000, James Simmons wrote:
> > This patch fixes all CODE_INDENT checkpatch errors in o2iblnd.
> Reviewed-by: James Simmons <jsimmons@infradead.org>
[]
> > diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
[]
> > @@ -1637,7 +1637,7 @@ int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx,
> > {
> > __u64 *pages = tx->tx_pages;
> > bool is_rx = (rd != tx->tx_rd);
> > - bool tx_pages_mapped = 0;
> > + bool tx_pages_mapped = 0;
It's generally better to use bool assignments to true/false not 1/0.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: lustre: o2iblnd: replace space indentation with tabs
2016-11-07 2:47 ` Joe Perches
@ 2016-11-07 3:55 ` James Simmons
2016-11-07 6:43 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: James Simmons @ 2016-11-07 3:55 UTC (permalink / raw)
To: Joe Perches
Cc: Nicholas Hanley, oleg.drokin, andreas.dilger, gregkh,
lustre-devel, devel, linux-kernel
> On Mon, 2016-11-07 at 02:02 +0000, James Simmons wrote:
> > > This patch fixes all CODE_INDENT checkpatch errors in o2iblnd.
> > Reviewed-by: James Simmons <jsimmons@infradead.org>
> []
> > > diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
> []
> > > @@ -1637,7 +1637,7 @@ int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx,
> > > {
> > > __u64 *pages = tx->tx_pages;
> > > bool is_rx = (rd != tx->tx_rd);
> > > - bool tx_pages_mapped = 0;
> > > + bool tx_pages_mapped = 0;
>
> It's generally better to use bool assignments to true/false not 1/0.
Nicholas can you resubmit with tx_pages_mapped = false. Looking at the
lustre code its the only place like this. Thanks for pointing this out.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: lustre: o2iblnd: replace space indentation with tabs
2016-11-07 3:55 ` James Simmons
@ 2016-11-07 6:43 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2016-11-07 6:43 UTC (permalink / raw)
To: James Simmons
Cc: Joe Perches, devel, oleg.drokin, andreas.dilger, linux-kernel,
Nicholas Hanley, lustre-devel
On Mon, Nov 07, 2016 at 03:55:36AM +0000, James Simmons wrote:
>
> > On Mon, 2016-11-07 at 02:02 +0000, James Simmons wrote:
> > > > This patch fixes all CODE_INDENT checkpatch errors in o2iblnd.
> > > Reviewed-by: James Simmons <jsimmons@infradead.org>
> > []
> > > > diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
> > []
> > > > @@ -1637,7 +1637,7 @@ int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx,
> > > > {
> > > > __u64 *pages = tx->tx_pages;
> > > > bool is_rx = (rd != tx->tx_rd);
> > > > - bool tx_pages_mapped = 0;
> > > > + bool tx_pages_mapped = 0;
> >
> > It's generally better to use bool assignments to true/false not 1/0.
>
> Nicholas can you resubmit with tx_pages_mapped = false. Looking at the
> lustre code its the only place like this. Thanks for pointing this out.
No, make it a separate patch, don't change code when you are just
changing indentation in the same patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-07 6:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-05 0:02 [PATCH] staging: lustre: o2iblnd: replace space indentation with tabs Nicholas Hanley
2016-11-07 2:02 ` James Simmons
2016-11-07 2:47 ` Joe Perches
2016-11-07 3:55 ` James Simmons
2016-11-07 6:43 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).