Skip to content

Commit

Permalink
staging: lustre: remove LPX64 define
Browse files Browse the repository at this point in the history
Just use the proper modifier type...

Cc: Andreas Dilger <[email protected]>
Cc: Oleg Drokin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jul 13, 2014
1 parent b0f5aad commit 55f5a82
Show file tree
Hide file tree
Showing 53 changed files with 165 additions and 183 deletions.
4 changes: 0 additions & 4 deletions drivers/staging/lustre/include/linux/libcfs/linux/kp30.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,4 @@

#include "portals_compat25.h"

/* this is a bit chunky */

# define LPX64 "%#llx"

#endif
16 changes: 7 additions & 9 deletions drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ kiblnd_close_stale_conns_locked (kib_peer_t *peer,
continue;

CDEBUG(D_NET, "Closing stale conn -> %s version: %x, "
"incarnation:"LPX64"(%x, "LPX64")\n",
"incarnation:%#llx(%x, %#llx)\n",
libcfs_nid2str(peer->ibp_nid),
conn->ibc_version, conn->ibc_incarnation,
version, incarnation);
Expand Down Expand Up @@ -1202,7 +1202,7 @@ kiblnd_map_rx_descs(kib_conn_t *conn)
rx->rx_msgaddr));
KIBLND_UNMAP_ADDR_SET(rx, rx_msgunmap, rx->rx_msgaddr);

CDEBUG(D_NET,"rx %d: %p "LPX64"("LPX64")\n",
CDEBUG(D_NET,"rx %d: %p %#llx(%#llx)\n",
i, rx->rx_msg, rx->rx_msgaddr,
lnet_page2phys(pg) + pg_off);

Expand Down Expand Up @@ -2336,7 +2336,7 @@ kiblnd_hdev_get_attr(kib_hca_dev_t *hdev)
return 0;
}

CERROR("Invalid mr size: "LPX64"\n", hdev->ibh_mr_size);
CERROR("Invalid mr size: %#llx\n", hdev->ibh_mr_size);
return -EINVAL;
}

Expand Down Expand Up @@ -2418,8 +2418,8 @@ kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev)

if (hdev->ibh_mr_shift < 32 || hdev->ibh_nmrs > 1024) {
/* it's 4T..., assume we will re-code at that time */
CERROR("Can't support memory size: x"LPX64
" with MR size: x"LPX64"\n", mm_size, mr_size);
CERROR("Can't support memory size: x%#llx with MR size: x%#llx\n",
mm_size, mr_size);
return -EINVAL;
}

Expand All @@ -2440,8 +2440,7 @@ kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev)

mr = ib_reg_phys_mr(hdev->ibh_pd, &ipb, 1, acflags, &iova);
if (IS_ERR(mr)) {
CERROR("Failed ib_reg_phys_mr addr "LPX64
" size "LPX64" : %ld\n",
CERROR("Failed ib_reg_phys_mr addr %#llx size %#llx : %ld\n",
ipb.addr, ipb.size, PTR_ERR(mr));
kiblnd_hdev_cleanup_mrs(hdev);
return PTR_ERR(mr);
Expand All @@ -2454,8 +2453,7 @@ kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev)

out:
if (hdev->ibh_mr_size != ~0ULL || hdev->ibh_nmrs != 1)
LCONSOLE_INFO("Register global MR array, MR size: "
LPX64", array size: %d\n",
LCONSOLE_INFO("Register global MR array, MR size: %#llx, array size: %d\n",
hdev->ibh_mr_size, hdev->ibh_nmrs);
return 0;
}
Expand Down
5 changes: 2 additions & 3 deletions drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ kiblnd_handle_completion(kib_conn_t *conn, int txtype, int status, __u64 cookie)
if (tx == NULL) {
spin_unlock(&conn->ibc_lock);

CWARN("Unmatched completion type %x cookie "LPX64" from %s\n",
CWARN("Unmatched completion type %x cookie %#llx from %s\n",
txtype, cookie, libcfs_nid2str(conn->ibc_peer->ibp_nid));
kiblnd_close_conn(conn, -EPROTO);
return;
Expand Down Expand Up @@ -1005,8 +1005,7 @@ kiblnd_tx_complete (kib_tx_t *tx, int status)

if (failed) {
if (conn->ibc_state == IBLND_CONN_ESTABLISHED)
CNETERR("Tx -> %s cookie "LPX64
" sending %d waiting %d: failed %d\n",
CNETERR("Tx -> %s cookie %#llx sending %d waiting %d: failed %d\n",
libcfs_nid2str(conn->ibc_peer->ibp_nid),
tx->tx_cookie, tx->tx_sending, tx->tx_waiting,
status);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lnet/lnet/api-ni.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ EXPORT_SYMBOL(LNetGetId);
void
LNetSnprintHandle(char *str, int len, lnet_handle_any_t h)
{
snprintf(str, len, LPX64, h.cookie);
snprintf(str, len, "%#llx", h.cookie);
}
EXPORT_SYMBOL(LNetSnprintHandle);

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lnet/lnet/lib-me.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ lnet_me_unlink(lnet_me_t *me)
static void
lib_me_dump(lnet_me_t *me)
{
CWARN("Match Entry %p ("LPX64")\n", me,
CWARN("Match Entry %p (%#llx)\n", me,
me->me_lh.lh_cookie);

CWARN("\tMatch/Ignore\t= %016lx / %016lx\n",
Expand Down
22 changes: 10 additions & 12 deletions drivers/staging/lustre/lnet/lnet/lib-move.c
Original file line number Diff line number Diff line change
Expand Up @@ -1518,8 +1518,7 @@ lnet_parse_reply(lnet_ni_t *ni, lnet_msg_t *msg)
/* NB handles only looked up by creator (no flips) */
md = lnet_wire_handle2md(&hdr->msg.reply.dst_wmd);
if (md == NULL || md->md_threshold == 0 || md->md_me != NULL) {
CNETERR("%s: Dropping REPLY from %s for %s "
"MD "LPX64"."LPX64"\n",
CNETERR("%s: Dropping REPLY from %s for %s MD %#llx.%#llx\n",
libcfs_nid2str(ni->ni_nid), libcfs_id2str(src),
(md == NULL) ? "invalid" : "inactive",
hdr->msg.reply.dst_wmd.wh_interface_cookie,
Expand All @@ -1539,16 +1538,15 @@ lnet_parse_reply(lnet_ni_t *ni, lnet_msg_t *msg)

if (mlength < rlength &&
(md->md_options & LNET_MD_TRUNCATE) == 0) {
CNETERR("%s: Dropping REPLY from %s length %d "
"for MD "LPX64" would overflow (%d)\n",
CNETERR("%s: Dropping REPLY from %s length %d for MD %#llx would overflow (%d)\n",
libcfs_nid2str(ni->ni_nid), libcfs_id2str(src),
rlength, hdr->msg.reply.dst_wmd.wh_object_cookie,
mlength);
lnet_res_unlock(cpt);
return ENOENT; /* +ve: OK but no match */
}

CDEBUG(D_NET, "%s: Reply from %s of length %d/%d into md "LPX64"\n",
CDEBUG(D_NET, "%s: Reply from %s of length %d/%d into md %#llx\n",
libcfs_nid2str(ni->ni_nid), libcfs_id2str(src),
mlength, rlength, hdr->msg.reply.dst_wmd.wh_object_cookie);

Expand Down Expand Up @@ -1588,7 +1586,7 @@ lnet_parse_ack(lnet_ni_t *ni, lnet_msg_t *msg)
if (md == NULL || md->md_threshold == 0 || md->md_me != NULL) {
/* Don't moan; this is expected */
CDEBUG(D_NET,
"%s: Dropping ACK from %s to %s MD "LPX64"."LPX64"\n",
"%s: Dropping ACK from %s to %s MD %#llx.%#llx\n",
libcfs_nid2str(ni->ni_nid), libcfs_id2str(src),
(md == NULL) ? "invalid" : "inactive",
hdr->msg.ack.dst_wmd.wh_interface_cookie,
Expand All @@ -1601,7 +1599,7 @@ lnet_parse_ack(lnet_ni_t *ni, lnet_msg_t *msg)
return ENOENT; /* +ve! */
}

CDEBUG(D_NET, "%s: ACK from %s into md "LPX64"\n",
CDEBUG(D_NET, "%s: ACK from %s into md %#llx\n",
libcfs_nid2str(ni->ni_nid), libcfs_id2str(src),
hdr->msg.ack.dst_wmd.wh_object_cookie);

Expand Down Expand Up @@ -1678,19 +1676,19 @@ lnet_print_hdr(lnet_hdr_t *hdr)
break;

case LNET_MSG_PUT:
CWARN(" Ptl index %d, ack md "LPX64"."LPX64", "
CWARN(" Ptl index %d, ack md %#llx.%#llx, "
"match bits %llu\n",
hdr->msg.put.ptl_index,
hdr->msg.put.ack_wmd.wh_interface_cookie,
hdr->msg.put.ack_wmd.wh_object_cookie,
hdr->msg.put.match_bits);
CWARN(" Length %d, offset %d, hdr data "LPX64"\n",
CWARN(" Length %d, offset %d, hdr data %#llx\n",
hdr->payload_length, hdr->msg.put.offset,
hdr->msg.put.hdr_data);
break;

case LNET_MSG_GET:
CWARN(" Ptl index %d, return md "LPX64"."LPX64", "
CWARN(" Ptl index %d, return md %#llx.%#llx, "
"match bits %llu\n", hdr->msg.get.ptl_index,
hdr->msg.get.return_wmd.wh_interface_cookie,
hdr->msg.get.return_wmd.wh_object_cookie,
Expand All @@ -1701,15 +1699,15 @@ lnet_print_hdr(lnet_hdr_t *hdr)
break;

case LNET_MSG_ACK:
CWARN(" dst md "LPX64"."LPX64", "
CWARN(" dst md %#llx.%#llx, "
"manipulated length %d\n",
hdr->msg.ack.dst_wmd.wh_interface_cookie,
hdr->msg.ack.dst_wmd.wh_object_cookie,
hdr->msg.ack.mlength);
break;

case LNET_MSG_REPLY:
CWARN(" dst md "LPX64"."LPX64", "
CWARN(" dst md %#llx.%#llx, "
"length %d\n",
hdr->msg.reply.dst_wmd.wh_interface_cookie,
hdr->msg.reply.dst_wmd.wh_object_cookie,
Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/lustre/lnet/lnet/lib-ptl.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ lnet_try_match_md(lnet_libmd_t *md,

/* Commit to this ME/MD */
CDEBUG(D_NET, "Incoming %s index %x from %s of "
"length %d/%d into md "LPX64" [%d] + %d\n",
"length %d/%d into md %#llx [%d] + %d\n",
(info->mi_opc == LNET_MD_OP_PUT) ? "put" : "get",
info->mi_portal, libcfs_id2str(info->mi_id), mlength,
info->mi_rlength, md->md_lh.lh_cookie, md->md_niov, offset);
Expand Down Expand Up @@ -540,9 +540,9 @@ lnet_ptl_match_md(struct lnet_match_info *info, struct lnet_msg *msg)
struct lnet_portal *ptl;
int rc;

CDEBUG(D_NET, "Request from %s of length %d into portal %d "
"MB="LPX64"\n", libcfs_id2str(info->mi_id),
info->mi_rlength, info->mi_portal, info->mi_mbits);
CDEBUG(D_NET, "Request from %s of length %d into portal %d MB=%#llx\n",
libcfs_id2str(info->mi_id), info->mi_rlength, info->mi_portal,
info->mi_mbits);

if (info->mi_portal >= the_lnet.ln_nportals) {
CERROR("Invalid portal %d not in [0-%d]\n",
Expand Down Expand Up @@ -596,7 +596,7 @@ lnet_ptl_match_md(struct lnet_match_info *info, struct lnet_msg *msg)

if (msg->msg_rx_delayed) {
CDEBUG(D_NET,
"Delaying %s from %s ptl %d MB "LPX64" off %d len %d\n",
"Delaying %s from %s ptl %d MB %#llx off %d len %d\n",
info->mi_opc == LNET_MD_OP_PUT ? "PUT" : "GET",
libcfs_id2str(info->mi_id), info->mi_portal,
info->mi_mbits, info->mi_roffset, info->mi_rlength);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lnet/selftest/brw_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ brw_check_page(struct page *pg, int pattern, __u64 magic)
LBUG();

bad_data:
CERROR("Bad data in page %p: "LPX64", "LPX64" expected\n",
CERROR("Bad data in page %p: %#llx, %#llx expected\n",
pg, data, magic);
return 1;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/lustre/lnet/selftest/rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf,
}

CDEBUG (D_NET,
"Posted passive RDMA: peer %s, portal %d, matchbits "LPX64"\n",
"Posted passive RDMA: peer %s, portal %d, matchbits %#llx\n",
libcfs_id2str(peer), portal, matchbits);
return 0;
}
Expand Down Expand Up @@ -437,7 +437,7 @@ srpc_post_active_rdma(int portal, __u64 matchbits, void *buf, int len,
LASSERT (rc == 0);
} else {
CDEBUG (D_NET,
"Posted active RDMA: peer %s, portal %u, matchbits "LPX64"\n",
"Posted active RDMA: peer %s, portal %u, matchbits %#llx\n",
libcfs_id2str(peer), portal, matchbits);
}
return 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lustre/fid/fid_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static int seq_client_alloc_seq(const struct lu_env *env,
*seqnr = seq->lcs_space.lsr_start;
seq->lcs_space.lsr_start += 1;

CDEBUG(D_INFO, "%s: Allocated sequence ["LPX64"]\n", seq->lcs_name,
CDEBUG(D_INFO, "%s: Allocated sequence [%#llx]\n", seq->lcs_name,
*seqnr);

return rc;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lustre/fid/lproc_fid.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ lprocfs_fid_space_seq_show(struct seq_file *m, void *unused)
LASSERT(seq != NULL);

mutex_lock(&seq->lcs_mutex);
rc = seq_printf(m, "["LPX64" - "LPX64"]:%x:%s\n", PRANGE(&seq->lcs_space));
rc = seq_printf(m, "[%#llx - %#llx]:%x:%s\n", PRANGE(&seq->lcs_space));
mutex_unlock(&seq->lcs_mutex);

return rc;
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/lustre/lustre/fld/fld_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fld_rrb_scan(struct lu_client_fld *fld, seqno_t seq)
return target;
}

CERROR("%s: Can't find target by hash %d (seq "LPX64"). Targets (%d):\n",
CERROR("%s: Can't find target by hash %d (seq %#llx). Targets (%d):\n",
fld->lcf_name, hash, seq, fld->lcf_count);

list_for_each_entry(target, &fld->lcf_targets, ft_chain) {
Expand Down Expand Up @@ -184,7 +184,7 @@ fld_client_get_target(struct lu_client_fld *fld, seqno_t seq)
spin_unlock(&fld->lcf_lock);

if (target != NULL) {
CDEBUG(D_INFO, "%s: Found target (idx %llu) by seq "LPX64"\n",
CDEBUG(D_INFO, "%s: Found target (idx %llu) by seq %#llx\n",
fld->lcf_name, target->ft_idx, seq);
}

Expand Down Expand Up @@ -472,7 +472,7 @@ int fld_client_lookup(struct lu_client_fld *fld, seqno_t seq, mdsno_t *mds,
target = fld_client_get_target(fld, seq);
LASSERT(target != NULL);

CDEBUG(D_INFO, "%s: Lookup fld entry (seq: "LPX64") on target %s (idx %llu)\n",
CDEBUG(D_INFO, "%s: Lookup fld entry (seq: %#llx) on target %s (idx %llu)\n",
fld->lcf_name, seq, fld_target_name(target), target->ft_idx);

res.lsr_start = seq;
Expand Down
6 changes: 2 additions & 4 deletions drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@
#ifndef _LUSTRE_IDL_H_
#define _LUSTRE_IDL_H_

#if !defined(LPX64)
#include "../../../include/linux/libcfs/libcfs.h" /* for LPUX64, etc */
#endif
#include "../../../include/linux/libcfs/libcfs.h"

/* Defn's shared with user-space. */
#include "lustre_user.h"
Expand Down Expand Up @@ -2747,7 +2745,7 @@ struct ldlm_res_id {
__u64 name[RES_NAME_SIZE];
};

#define DLDLMRES "["LPX64":"LPX64":"LPX64"].%llx"
#define DLDLMRES "[%#llx:%#llx:%#llx].%llx"
#define PLDLMRES(res) (res)->lr_name.name[0], (res)->lr_name.name[1], \
(res)->lr_name.name[2], (res)->lr_name.name[3]

Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/lustre/lustre/include/lustre/lustre_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ struct ost_id {
};
};

#define DOSTID LPX64":%llu"
#define DOSTID "%#llx:%llu"
#define POSTID(oi) ostid_seq(oi), ostid_id(oi)

/*
Expand Down Expand Up @@ -475,7 +475,7 @@ static inline void obd_uuid2fsname(char *buf, char *uuid, int buflen)
e.g. printf("file FID is "DFID"\n", PFID(fid)); */
#define FID_NOBRACE_LEN 40
#define FID_LEN (FID_NOBRACE_LEN + 2)
#define DFID_NOBRACE LPX64":0x%x:0x%x"
#define DFID_NOBRACE "%#llx:0x%x:0x%x"
#define DFID "["DFID_NOBRACE"]"
#define PFID(fid) \
(fid)->f_seq, \
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lustre/include/lustre_fid.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ static inline void lu_last_id_fid(struct lu_fid *fid, __u64 seq)
fid->f_seq = fid_idif_seq(0, 0);
} else {
LASSERTF(fid_seq_is_norm(seq) || fid_seq_is_echo(seq) ||
fid_seq_is_idif(seq), LPX64"\n", seq);
fid_seq_is_idif(seq), "%#llx\n", seq);
fid->f_seq = seq;
}
fid->f_oid = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lustre/lclient/lcommon_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int cl_ocd_update(struct obd_device *host,
cli = &watched->u.cli;
lco = owner;
flags = cli->cl_import->imp_connect_data.ocd_connect_flags;
CDEBUG(D_SUPER, "Changing connect_flags: "LPX64" -> "LPX64"\n",
CDEBUG(D_SUPER, "Changing connect_flags: %#llx -> %#llx\n",
lco->lco_flags, flags);
mutex_lock(&lco->lco_lock);
lco->lco_flags &= flags;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ int client_connect_import(const struct lu_env *env,

if (data) {
LASSERTF((ocd->ocd_connect_flags & data->ocd_connect_flags) ==
ocd->ocd_connect_flags, "old "LPX64", new "LPX64"\n",
ocd->ocd_connect_flags, "old %#llx, new %#llx\n",
data->ocd_connect_flags, ocd->ocd_connect_flags);
data->ocd_connect_flags = ocd->ocd_connect_flags;
}
Expand Down Expand Up @@ -545,7 +545,7 @@ int client_disconnect_export(struct obd_export *exp)
int rc = 0, err;

if (!obd) {
CERROR("invalid export for disconnect: exp %p cookie "LPX64"\n",
CERROR("invalid export for disconnect: exp %p cookie %#llx\n",
exp, exp ? exp->exp_handle.h_cookie : -1);
return -EINVAL;
}
Expand Down
Loading

0 comments on commit 55f5a82

Please sign in to comment.