Changeset 6da6039 in mainline


Ignore:
Timestamp:
2017-08-20T23:53:22Z (7 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ab5a0830
Parents:
3d8a3bd
Message:

Removed old unneeded allocation in add_cmd, cmd should always be non-NULL now.

Location:
uspace/drv/bus/usb/xhci
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/commands.c

    r3d8a3bd r6da6039  
    170170}
    171171
    172 static inline int add_cmd(xhci_hc_t *hc, xhci_cmd_t *cmd)
    173 {
    174         if (cmd == NULL) {
    175                 cmd = xhci_alloc_command();
    176                 if (cmd == NULL)
    177                         return ENOMEM;
    178 
    179                 cmd->has_owner = false;
    180         }
     172static inline void add_cmd(xhci_hc_t *hc, xhci_cmd_t *cmd)
     173{
     174        assert(cmd);
    181175
    182176        list_append(&cmd->link, &hc->commands);
    183177        cmd->trb = hc->command_ring.enqueue_trb;
    184 
    185         return EOK;
    186178}
    187179
  • uspace/drv/bus/usb/xhci/trb_ring.c

    r3d8a3bd r6da6039  
    310310                ring->dequeue_trb = segment_begin(ring->dequeue_segment);
    311311        }
    312        
    313 
    314         return EOK;
    315 }
     312
     313        return EOK;
     314}
Note: See TracChangeset for help on using the changeset viewer.