Project

General

Profile

Actions

Issue #2150

open

libsamsung-ipc: improve board drivers print

Added by Denis 'GNUtoo' Carikli over 3 years ago. Updated about 3 years 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
Actions #1

Updated by Denis 'GNUtoo' Carikli over 3 years 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;
        }

Actions #2

Updated by _I3^ RELATIVISM about 3 years ago

  • Type of work C programming added
Actions

Also available in: Atom PDF