Skip to content

Commit

Permalink
dwc3/core: Fix logspam with !IPC_LOGGING and !DEBUG_FS
Browse files Browse the repository at this point in the history
Silences:
[    0.722095] usbnet_init: Error getting ipc_log_ctxt
[    0.722101] usbnet_init: Error getting ipc_log_ctxt
[    0.722104] usbnet_init: Error getting ipc_log_ctxt
[    0.730743] dwc3 a600000.dwc3: Error getting ipc_log_ctxt
[    0.730765] dwc3 a600000.dwc3: Error getting ipc_log_ctxt for ep_events

Change-Id: 09a7f62eb3ce5342a2b72eb5894c9209ee1d9b6c
Link: https://github.com/eun0115/kernel_xiaomi_ginkgo/commit/eb775336be2d2d7c50e7157f617075a1617efbe2
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: TogoFire <italomellopereira@gmail.com>
  • Loading branch information
cyberknight777 authored and TogoFire committed Jan 9, 2023
1 parent c96836a commit 3fce7e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,10 +1363,12 @@ static int dwc3_probe(struct platform_device *pdev)
goto err_core_init;
}

#ifdef CONFIG_IPC_LOGGING
dwc->dwc_ipc_log_ctxt = ipc_log_context_create(NUM_LOG_PAGES,
dev_name(dwc->dev), 0);
if (!dwc->dwc_ipc_log_ctxt)
dev_err(dwc->dev, "Error getting ipc_log_ctxt\n");
#endif

dwc3_instance[count] = dwc;
dwc->index = count;
Expand Down Expand Up @@ -1419,8 +1421,10 @@ static int dwc3_remove(struct platform_device *pdev)
dwc3_free_event_buffers(dwc);
dwc3_free_scratch_buffers(dwc);

#ifdef CONFIG_IPC_LOGGING
ipc_log_context_destroy(dwc->dwc_ipc_log_ctxt);
dwc->dwc_ipc_log_ctxt = NULL;
#endif
count--;
dwc3_instance[dwc->index] = NULL;

Expand Down

0 comments on commit 3fce7e2

Please sign in to comment.