fix format warnings in rcom.c and recoverd.c
This fixes the following gcc warnings generated on
the architectures where uint64_t != unsigned long long (e.g. ppc64).
fs/dlm/rcom.c:154: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'uint64_t' fs/dlm/rcom.c:154: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'uint64_t' fs/dlm/recoverd.c:48: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t' fs/dlm/recoverd.c:202: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t' fs/dlm/recoverd.c:210: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t'
---
fs/dlm/rcom.c +2 -1
@@ -152,7 +152,8 @@ static void receive_sync_reply(struct dl {if (rc_in->rc_id != ls->ls_rcom_seq) {log_debug (ls,"reject old reply %d got %llx wanted %llx" , - rc_in->rc_type, rc_in->rc_id, ls->ls_rcom_seq); + rc_in->rc_type, (unsigned long long )rc_in->rc_id, + (unsigned long long )ls->ls_rcom_seq);return ; }memcpy (ls->ls_recover_buf, rc_in, rc_in->rc_header.h_length);
fs/dlm/recoverd.c +5 -3
@@ -45,7 +45,7 @@ static int ls_recover(struct dlm_ls *ls,unsigned long start;int error, neg =0 ; -log_debug (ls,"recover %llx" , rv->seq); +log_debug (ls,"recover %llx" , (unsigned long long )rv->seq);mutex_lock (&ls->ls_recoverd_active);
@@ -199,7 +199,8 @@ static int ls_recover(struct dlm_ls *ls,dlm_astd_wake (); -log_debug (ls,"recover %llx done: %u ms" , rv->seq, +log_debug (ls,"recover %llx done: %u ms" , + (unsigned long long )rv->seq,jiffies_to_msecs (jiffies - start));mutex_unlock (&ls->ls_recoverd_active);
@@ -207,7 +208,8 @@ static int ls_recover(struct dlm_ls *ls, fail:dlm_release_root_list (ls); -log_debug (ls,"recover %llx error %d" , rv->seq, error); +log_debug (ls,"recover %llx error %d" , + (unsigned long long )rv->seq, error);mutex_unlock (&ls->ls_recoverd_active);return error; }
Hi,
I had to fix this up as it didn't apply directly to my git tree (conflict was in rcom.c) but I've pushed it now to my -nmw git tree, so once kernel.org updates to show it, please check to see that I've done the right thing,
Steve.
Quoted 60 lines · Ryusuke Konishi
This fixes the following gcc warnings generated on
the architectures whereuint64_t!= unsigned long long (e.g. ppc64).
fs/dlm/rcom.c:154: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'uint64_t'fs/dlm/rcom.c:154: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'uint64_t'fs/dlm/recoverd.c:48: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t'fs/dlm/recoverd.c:202: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t'fs/dlm/recoverd.c:210: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t'Signed-off-by Ryusuke Konishi <[email protected]>---
fs/dlm/rcom.c +2
-1@@ -152,7 +152,8 @@ static void receive_sync_reply(struct dl {if (rc_in->rc_id != ls->ls_rcom_seq) {log_debug (ls,"reject old reply %d got %llx wanted %llx" , - rc_in->rc_type, rc_in->rc_id, ls->ls_rcom_seq); + rc_in->rc_type, (unsigned long long )rc_in->rc_id, + (unsigned long long )ls->ls_rcom_seq);return ; }memcpy (ls->ls_recover_buf, rc_in, rc_in->rc_header.h_length);fs/dlm/recoverd.c +5
-3@@ -45,7 +45,7 @@ static int ls_recover(struct dlm_ls *ls,unsigned long start;int error, neg =0 ; -log_debug (ls,"recover %llx" , rv->seq); +log_debug (ls,"recover %llx" , (unsigned long long )rv->seq);mutex_lock (&ls->ls_recoverd_active);@@ -199,7 +199,8 @@ static int ls_recover(struct dlm_ls *ls,dlm_astd_wake (); -log_debug (ls,"recover %llx done: %u ms" , rv->seq, +log_debug (ls,"recover %llx done: %u ms" , + (unsigned long long )rv->seq,jiffies_to_msecs (jiffies - start));mutex_unlock (&ls->ls_recoverd_active);@@ -207,7 +208,8 @@ static int ls_recover(struct dlm_ls *ls, fail:dlm_release_root_list (ls); -log_debug (ls,"recover %llx error %d" , rv->seq, error); +log_debug (ls,"recover %llx error %d" , + (unsigned long long )rv->seq, error);mutex_unlock (&ls->ls_recoverd_active);return error; }
Hi,
I confirmed the modified patch seen on the -nmw git tree. And, that was good.
I've also compiled the latest -nmw tree on my ppc64 machine to be sure that no new warnings were imported.
The result was good too for both DLM and GFS2.
Regards,
Ryusuke.
Quoted 8 lines · Steven Whitehouse
Hi,
I had to fix this up as it didn't apply directly to my git tree (conflict was in
rcom.c) but I've pushed it now to my -nmw git tree, so once kernel.org updates to show it, please check to see that I've done the right thing,Steve.
Hi,
Excellent :-) Thanks for testing this for us,
Steve.
Quoted 22 lines · Ryusuke Konishi
Hi,
I confirmed the modified patch seen on the -nmw git tree. And, that was good.
I've also compiled the latest -nmw tree on my ppc64 machine to be sure that no new warnings were imported.
The result was good too for both DLM and GFS2.Regards,
Ryusuke.
Quoted 8 lines · Steven Whitehouse
Hi,
I had to fix this up as it didn't apply directly to my git tree (conflict was in
rcom.c) but I've pushed it now to my -nmw git tree, so once kernel.org updates to show it, please check to see that I've done the right thing,Steve.