Lines Matching refs:a
32 static int btca_ds_cmp2(const struct ptp_dataset *a, const struct ptp_dataset *b) in btca_ds_cmp2() argument
36 if (b->steps_rm + 1 < a->steps_rm) { in btca_ds_cmp2()
39 if (a->steps_rm + 1 < b->steps_rm) { in btca_ds_cmp2()
42 if (a->steps_rm > b->steps_rm) { in btca_ds_cmp2()
43 diff = btca_port_id_cmp(&a->receiver, &a->sender); in btca_ds_cmp2()
53 if (a->steps_rm < b->steps_rm) { in btca_ds_cmp2()
65 diff = btca_port_id_cmp(&a->sender, &b->sender); in btca_ds_cmp2()
73 if (a->receiver.port_number > b->receiver.port_number) { in btca_ds_cmp2()
76 if (a->receiver.port_number > b->receiver.port_number) { in btca_ds_cmp2()
83 int ptp_btca_ds_cmp(const struct ptp_dataset *a, const struct ptp_dataset *b) in ptp_btca_ds_cmp() argument
85 if (a == b) { in ptp_btca_ds_cmp()
88 if (a && !b) { in ptp_btca_ds_cmp()
91 if (!a && b) { in ptp_btca_ds_cmp()
95 int id_diff = memcmp(&a->clk_id, &b->clk_id, sizeof(a->clk_id)); in ptp_btca_ds_cmp()
98 return btca_ds_cmp2(a, b); in ptp_btca_ds_cmp()
100 if (a->priority1 > b->priority1) { in ptp_btca_ds_cmp()
103 if (a->clk_quality.cls > b->clk_quality.cls) { in ptp_btca_ds_cmp()
106 if (a->clk_quality.accuracy > b->clk_quality.accuracy) { in ptp_btca_ds_cmp()
109 if (a->clk_quality.offset_scaled_log_variance > b->clk_quality.offset_scaled_log_variance) { in ptp_btca_ds_cmp()
112 if (a->priority2 > b->priority2) { in ptp_btca_ds_cmp()