Changeset a1732929 in mainline for uspace/lib/usbhid/src/hidreq.c


Ignore:
Timestamp:
2018-01-15T17:04:34Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ff99e8
Parents:
c1a966e
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-15 17:04:32)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-15 17:04:34)
Message:

usb: unified logging

Use logger instead of printf. Logger adds newlines automatically.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhid/src/hidreq.c

    rc1a966e ra1732929  
    6262{
    6363        if (ctrl_pipe == NULL) {
    64                 usb_log_warning("usbhid_req_set_report(): no pipe given.\n");
     64                usb_log_warning("usbhid_req_set_report(): no pipe given.");
    6565                return EINVAL;
    6666        }
     
    8282        value |= (type << 8);
    8383
    84         usb_log_debug("Sending Set Report request to the device.\n");
     84        usb_log_debug("Sending Set Report request to the device.");
    8585       
    8686        rc = usb_control_request_set(ctrl_pipe,
     
    112112{
    113113        if (ctrl_pipe == NULL) {
    114                 usb_log_warning("usbhid_req_set_report(): no pipe given.\n");
     114                usb_log_warning("usbhid_req_set_report(): no pipe given.");
    115115                return EINVAL;
    116116        }
     
    160160{
    161161        if (ctrl_pipe == NULL) {
    162                 usb_log_warning("usbhid_req_set_report(): no pipe given.\n");
     162                usb_log_warning("usbhid_req_set_report(): no pipe given.");
    163163                return EINVAL;
    164164        }
     
    215215{
    216216        if (ctrl_pipe == NULL) {
    217                 usb_log_warning("usbhid_req_set_report(): no pipe given.\n");
     217                usb_log_warning("usbhid_req_set_report(): no pipe given.");
    218218                return EINVAL;
    219219        }
     
    235235        value |= (type << 8);
    236236       
    237         usb_log_debug("Sending Get Report request to the device.\n");
     237        usb_log_debug("Sending Get Report request to the device.");
    238238       
    239239        rc = usb_control_request_get(ctrl_pipe,
     
    266266{
    267267        if (ctrl_pipe == NULL) {
    268                 usb_log_warning("usbhid_req_set_report(): no pipe given.\n");
     268                usb_log_warning("usbhid_req_set_report(): no pipe given.");
    269269                return EINVAL;
    270270        }
     
    300300       
    301301        if (actual_size != 1) {
    302                 usb_log_warning("Wrong data size: %zu, expected: 1.\n",
     302                usb_log_warning("Wrong data size: %zu, expected: 1.",
    303303                        actual_size);
    304304                return ELIMIT;
     
    327327{
    328328        if (ctrl_pipe == NULL) {
    329                 usb_log_warning("usbhid_req_set_report(): no pipe given.\n");
     329                usb_log_warning("usbhid_req_set_report(): no pipe given.");
    330330                return EINVAL;
    331331        }
     
    363363       
    364364        if (actual_size != 1) {
    365                 usb_log_warning("Wrong data size: %zu, expected: 1.\n",
     365                usb_log_warning("Wrong data size: %zu, expected: 1.",
    366366                        actual_size);
    367367                return ELIMIT;
Note: See TracChangeset for help on using the changeset viewer.