Skip to content

Commit 0097d51

Browse files
jannaumarcan
authored andcommitted
afk/dptx: Convert noisy/misleading printf to dprintf
Signed-off-by: Janne Grunau <[email protected]>
1 parent 595ecb4 commit 0097d51

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/afk.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ int afk_epic_work(afk_epic_t *afk, int endpoint)
394394
if (ret < 0) {
395395
return ret;
396396
}
397-
printf("EPIC[0x%02x]: ignoring message type %d\n", cur->ep, rmsg->type);
397+
dprintf("EPIC[0x%02x]: ignoring message type %d\n", cur->ep, rmsg->type);
398398
afk_epic_rx_ack(cur);
399399
}
400400
}
@@ -488,7 +488,7 @@ static int afk_epic_handle_std_service(afk_epic_ep_t *epic, int channel, u8 cate
488488
return 0;
489489
}
490490

491-
printf("AFK: channel %d received unhandled standard service message: %x\n", channel, category);
491+
dprintf("AFK: channel %d received unhandled standard service message: %x\n", channel, category);
492492

493493
return -1;
494494
}
@@ -597,8 +597,8 @@ static void afk_epic_notify_handler(afk_epic_ep_t *epic)
597597
return;
598598

599599
if (rmsg->type != TYPE_NOTIFY) {
600-
printf("EPIC[0x%02x]: got unexpected message type %d in %s\n", epic->ep, rmsg->type,
601-
__func__);
600+
dprintf("EPIC[0x%02x]: got unexpected message type %d in %s\n", epic->ep, rmsg->type,
601+
__func__);
602602
afk_epic_rx_ack(epic);
603603
return;
604604
}
@@ -612,8 +612,8 @@ static void afk_epic_notify_handler(afk_epic_ep_t *epic)
612612
afk_epic_handle_std_service(epic, rmsg->channel, sub->category, sub->seq, payload,
613613
payload_size);
614614
} else {
615-
printf("EPIC[0x%02x]: %s: rx: Ch %u, Type:0x%02x sub cat:%x type:%x \n", epic->ep, __func__,
616-
rmsg->channel, rmsg->type, sub->category, sub->type);
615+
dprintf("EPIC[0x%02x]: %s: rx: Ch %u, Type:0x%02x sub cat:%x type:%x \n", epic->ep,
616+
__func__, rmsg->channel, rmsg->type, sub->category, sub->type);
617617
}
618618

619619
afk_epic_rx_ack(epic);
@@ -738,8 +738,8 @@ int afk_epic_start_interface(afk_epic_ep_t *epic, void *intf, size_t txsize, siz
738738
return ret;
739739

740740
if (msg->type != TYPE_NOTIFY && msg->type != TYPE_REPLY) {
741-
printf("AFK[ep:%02x]: got unexpected message type %d during iface start\n", epic->ep,
742-
msg->type);
741+
dprintf("AFK[ep:%02x]: got unexpected message type %d during iface start\n", epic->ep,
742+
msg->type);
743743
afk_epic_rx_ack(epic);
744744
continue;
745745
}
@@ -748,8 +748,8 @@ int afk_epic_start_interface(afk_epic_ep_t *epic, void *intf, size_t txsize, siz
748748
struct epic_sub_hdr *sub = (void *)(hdr + 1);
749749

750750
if (sub->category != CAT_REPORT || sub->type != SUBTYPE_ANNOUNCE) {
751-
printf("AFK[ep:%02x]: got unexpected message %02x:%04x during iface start\n", epic->ep,
752-
sub->category, sub->type);
751+
dprintf("AFK[ep:%02x]: got unexpected message %02x:%04x during iface start\n", epic->ep,
752+
sub->category, sub->type);
753753
afk_epic_rx_ack(epic);
754754
continue;
755755
}
@@ -805,8 +805,8 @@ int afk_epic_start_interface(afk_epic_ep_t *epic, void *intf, size_t txsize, siz
805805
service->seq = 0;
806806

807807
ops->init(service, epic_name, service_name, epic_unit);
808-
printf("AFK[ep:%02x]: new service %s on channel %d\n", epic->ep, service_name,
809-
msg->channel);
808+
dprintf("AFK[ep:%02x]: new service %s on channel %d\n", epic->ep, service_name,
809+
msg->channel);
810810
free(epic_name);
811811
free(epic_class);
812812

@@ -829,7 +829,7 @@ int afk_epic_start_interface(afk_epic_ep_t *epic, void *intf, size_t txsize, siz
829829
return -1;
830830
}
831831

832-
printf("AFK[ep:%02x]: started interface with %d services\n", epic->ep, channels);
832+
dprintf("AFK[ep:%02x]: started interface with %d services\n", epic->ep, channels);
833833

834834
return 0;
835835
}

src/dcp/dpav_ep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static void dpav_init(afk_epic_service_t *service, const char *name, const char
2929
UNUSED(name);
3030
UNUSED(eclass);
3131
UNUSED(unit);
32-
// printf("DPAV: init(name='%s', class='%s' unit=%ld:\n", name, eclass, unit);
32+
dprintf("DPAV: init(name='%s', class='%s' unit=%ld:\n", name, eclass, unit);
3333
}
3434

3535
static const afk_epic_service_ops_t dcp_dpav_ops[] = {

src/dcp/dptx_phy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ int dptx_phy_set_active_lane_count(dptx_phy_t *phy, u32 num_lanes)
209209
{
210210
u32 l;
211211

212-
printf("DPTX-PHY: set_active_lane_count(%u) phy_regs = {0x%lx, 0x%lx}\n", num_lanes,
213-
phy->regs[0], phy->regs[1]);
212+
dprintf("DPTX-PHY: set_active_lane_count(%u) phy_regs = {0x%lx, 0x%lx}\n", num_lanes,
213+
phy->regs[0], phy->regs[1]);
214214

215215
if (num_lanes == 3 || num_lanes > DPTX_MAX_LANES)
216216
return -1;

src/dcp/dptx_port_ep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static int dptxport_call(afk_epic_service_t *service, u32 idx, const void *data,
459459
return 0;
460460
default:
461461
/* just try to ACK and hope for the best... */
462-
printf("DPTXPort: unhandled call %d\n", idx);
462+
dprintf("DPTXPort: unhandled call %d\n", idx);
463463
// fallthrough
464464
/* we can silently ignore and just ACK these calls */
465465
case DPTX_APCALL_DEACTIVATE:

0 commit comments

Comments
 (0)