Hi Michal, > --- > monitor/packet.c | 321 +++++++------------------------------------------------ > 1 file changed, 37 insertions(+), 284 deletions(-) > > diff --git a/monitor/packet.c b/monitor/packet.c > index e1f69b145..c697890cf 100644 > --- a/monitor/packet.c > +++ b/monitor/packet.c > @@ -557,6 +557,25 @@ void packet_print_error(const char *label, uint8_t error) > print_error(label, error); > } > > +static void print_enable(const char *label, uint8_t enable) > +{ > + const char *str; > + > + switch (enable) { > + case 0x00: > + str = "Disable”; “Disabled”. > + break; > + case 0x01: > + str = "Enabled"; > + break; > + default: > + str = "Reserved"; > + break; > + } > + > + print_field("%s: %s (0x%2.2x)", label, str, enable); > +} > + > static void print_addr_type(const char *label, uint8_t addr_type) > { > const char *str; > @@ -1198,21 +1217,7 @@ static void print_power_level(int8_t level, const char *type) > > static void print_sync_flow_control(uint8_t enable) > { > - const char *str; > - > - switch (enable) { > - case 0x00: > - str = "Disabled"; > - break; > - case 0x01: > - str = "Enabled"; > - break; > - default: > - str = "Reserved"; > - break; > - } > - > - print_field("Flow control: %s (0x%2.2x)", str, enable); > + print_enable("Flow control", enable); > } Don’t do this. Use print_enable right where used to have print_sync_flow_control (and so on). Too many indirections are a bad thing. Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html