Project

General

Profile

Issue #2150

libsamsung-ipc: improve board drivers print

Added by Denis 'GNUtoo' Carikli 7 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Telephony and mobile data
Target version:
Start date:
10/21/2020
Due date:
% Done:

0%

Estimated time:
Resolution:
Device:
Unknown
Grant:
Type of work:
C programming
#1

Updated by Denis 'GNUtoo' Carikli 7 months ago

For many devices, we have code like that:

        rc = xmm626_kernel_smdk4412_power(client, modem_boot_fd, 1);
        rc |= xmm626_kernel_smdk4412_hci_power(client, 1);

        if (rc < 0) {
                ipc_client_log(client, "Turning the modem on failed");
                goto error;
        }

While it takes more time to write, it would be better to have two distinct
error messages:

        rc = xmm626_kernel_smdk4412_power(client, modem_boot_fd, 1);
        if (rc < 0) {
                ipc_client_log(client, "Turning the modem on failed");
                goto error;
        }

        rc = xmm626_kernel_smdk4412_hci_power(client, 1);

        if (rc < 0) {
                ipc_client_log(client, "Powering on the HCI bus failed");
                goto error;
        }

#2

Updated by _I3^ RELATIVISM about 2 months ago

  • Type of work C programming added

Also available in: Atom PDF