Changeset 36795edf in mainline for uspace/drv/bus


Ignore:
Timestamp:
2021-03-12T19:16:51Z (5 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a85d5c6
Parents:
17fac946
Message:

Improve lists and other data structures

Provide more standard-compliant member_to_inst implementation that uses
offsetof. Avoid potential undefined behavior in list_foreach and
list_foreach_rev by avoiding assinging an unaligned pointer value. Use
size_t instead of unsigned long for list length.

Location:
uspace/drv/bus/usb
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/hc.c

    r17fac946 r36795edf  
    358358                fibril_mutex_lock(&hc->guard);
    359359
    360                 usb_log_debug2("HC(%p): Scanning %lu pending endpoints", hc,
     360                usb_log_debug2("HC(%p): Scanning %zu pending endpoints", hc,
    361361                    list_count(&hc->pending_endpoints));
    362362                list_foreach_safe(hc->pending_endpoints, current, next) {
  • uspace/drv/bus/usb/uhci/hc.h

    r17fac946 r36795edf  
    4141#include <fibril.h>
    4242#include <macros.h>
     43#include <member.h>
    4344#include <stdbool.h>
    4445#include <ddi.h>
  • uspace/drv/bus/usb/vhc/vhcd.h

    r17fac946 r36795edf  
    4141#include <async.h>
    4242#include <macros.h>
     43#include <member.h>
    4344
    4445#include <usb/host/hcd.h>
  • uspace/drv/bus/usb/xhci/hc.h

    r17fac946 r36795edf  
    3838
    3939#include <fibril_synch.h>
     40#include <member.h>
    4041#include <usb/host/usb_transfer_batch.h>
    4142#include <usb/host/utility.h>
Note: See TracChangeset for help on using the changeset viewer.