Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 078e0e6 in mainline


Ignore:
Timestamp:
2017-10-05T16:21:02Z (4 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master
Children:
e9e24f2
Parents:
4930b15
Message:

Removed unnecessary calls to malloc32 and free32.

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

Legend:

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

    r4930b15 r078e0e6  
    9595xhci_cmd_t *xhci_cmd_alloc(void)
    9696{
    97         xhci_cmd_t *cmd = malloc32(sizeof(xhci_cmd_t));
     97        xhci_cmd_t *cmd = malloc(sizeof(xhci_cmd_t));
    9898        xhci_cmd_init(cmd);
    9999
     
    120120{
    121121        xhci_cmd_fini(cmd);
    122         free32(cmd);
     122        free(cmd);
    123123}
    124124
  • uspace/drv/bus/usb/xhci/hc.c

    r4930b15 r078e0e6  
    193193                return ENOMEM;
    194194
    195         hc->dcbaa_virt = malloc32((1 + hc->max_slots) * sizeof(xhci_virt_device_ctx_t));
     195        hc->dcbaa_virt = malloc((1 + hc->max_slots) * sizeof(xhci_virt_device_ctx_t));
    196196        if (!hc->dcbaa_virt) {
    197197                err = ENOMEM;
  • uspace/drv/bus/usb/xhci/rh.c

    r4930b15 r078e0e6  
    103103//      xhci_cmd_fini(&cmd);
    104104//
    105 //      xhci_input_ctx_t *ictx = malloc32(sizeof(xhci_input_ctx_t));
     105//      xhci_input_ctx_t *ictx = malloc(sizeof(xhci_input_ctx_t));
    106106//      if (!ictx) {
    107107//              return ENOMEM;
     
    119119//      XHCI_SLOT_ROUTE_STRING_SET(ictx->slot_ctx, route_str);
    120120//
    121 //      xhci_trb_ring_t *ep_ring = malloc32(sizeof(xhci_trb_ring_t));
     121//      xhci_trb_ring_t *ep_ring = malloc(sizeof(xhci_trb_ring_t));
    122122//      if (!ep_ring) {
    123123//              err = ENOMEM;
     
    144144//
    145145//      // TODO: What's the alignment?
    146 //      xhci_device_ctx_t *dctx = malloc32(sizeof(xhci_device_ctx_t));
     146//      xhci_device_ctx_t *dctx = malloc(sizeof(xhci_device_ctx_t));
    147147//      if (!dctx) {
    148148//              err = ENOMEM;
     
    171171// err_dctx:
    172172//      if (dctx) {
    173 //              free32(dctx);
     173//              free(dctx);
    174174//              hc->dcbaa[slot_id] = 0;
    175175//              memset(&hc->dcbaa_virt[slot_id], 0, sizeof(xhci_virt_device_ctx_t));
     
    178178//      if (ep_ring) {
    179179//              xhci_trb_ring_fini(ep_ring);
    180 //              free32(ep_ring);
     180//              free(ep_ring);
    181181//      }
    182182// err_ictx:
    183 //      free32(ictx);
     183//      free(ictx);
    184184//      return err;
    185185// }
Note: See TracChangeset for help on using the changeset viewer.