usb_ecm: fixes 64 bit warnings
This commit is contained in:
parent
19d7d464e5
commit
0e8bd8493a
|
@ -38,7 +38,7 @@ usb_ecm_device_added(usb_device device, void **cookie)
|
||||||
if (gECMDevices[i]->CompareAndReattach(device) != B_OK)
|
if (gECMDevices[i]->CompareAndReattach(device) != B_OK)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
TRACE_ALWAYS("ecm device %ld replugged\n", i);
|
TRACE_ALWAYS("ecm device %" B_PRId32 " replugged\n", i);
|
||||||
*cookie = gECMDevices[i];
|
*cookie = gECMDevices[i];
|
||||||
mutex_unlock(&gDriverLock);
|
mutex_unlock(&gDriverLock);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
@ -60,7 +60,7 @@ usb_ecm_device_added(usb_device device, void **cookie)
|
||||||
gECMDevices[i] = ecmDevice;
|
gECMDevices[i] = ecmDevice;
|
||||||
*cookie = ecmDevice;
|
*cookie = ecmDevice;
|
||||||
|
|
||||||
TRACE_ALWAYS("ecm device %ld added\n", i);
|
TRACE_ALWAYS("ecm device %" B_PRId32 " added\n", i);
|
||||||
mutex_unlock(&gDriverLock);
|
mutex_unlock(&gDriverLock);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,8 @@ publish_devices()
|
||||||
|
|
||||||
gDeviceNames[deviceCount] = (char *)malloc(strlen(sDeviceBaseName) + 4);
|
gDeviceNames[deviceCount] = (char *)malloc(strlen(sDeviceBaseName) + 4);
|
||||||
if (gDeviceNames[deviceCount]) {
|
if (gDeviceNames[deviceCount]) {
|
||||||
sprintf(gDeviceNames[deviceCount], "%s%ld", sDeviceBaseName, i);
|
sprintf(gDeviceNames[deviceCount], "%s%" B_PRId32, sDeviceBaseName,
|
||||||
|
i);
|
||||||
TRACE("publishing %s\n", gDeviceNames[deviceCount]);
|
TRACE("publishing %s\n", gDeviceNames[deviceCount]);
|
||||||
deviceCount++;
|
deviceCount++;
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -195,7 +195,7 @@ ECMDevice::Read(uint8 *buffer, size_t *numBytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fStatusRead != B_OK && fStatusRead != B_CANCELED && !fRemoved) {
|
if (fStatusRead != B_OK && fStatusRead != B_CANCELED && !fRemoved) {
|
||||||
TRACE_ALWAYS("device status error 0x%08lx\n", fStatusRead);
|
TRACE_ALWAYS("device status error 0x%08" B_PRIx32 "\n", fStatusRead);
|
||||||
result = gUSBModule->clear_feature(fReadEndpoint,
|
result = gUSBModule->clear_feature(fReadEndpoint,
|
||||||
USB_FEATURE_ENDPOINT_HALT);
|
USB_FEATURE_ENDPOINT_HALT);
|
||||||
if (result != B_OK) {
|
if (result != B_OK) {
|
||||||
|
@ -232,7 +232,7 @@ ECMDevice::Write(const uint8 *buffer, size_t *numBytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fStatusWrite != B_OK && fStatusWrite != B_CANCELED && !fRemoved) {
|
if (fStatusWrite != B_OK && fStatusWrite != B_CANCELED && !fRemoved) {
|
||||||
TRACE_ALWAYS("device status error 0x%08lx\n", fStatusWrite);
|
TRACE_ALWAYS("device status error 0x%08" B_PRIx32 "\n", fStatusWrite);
|
||||||
result = gUSBModule->clear_feature(fWriteEndpoint,
|
result = gUSBModule->clear_feature(fWriteEndpoint,
|
||||||
USB_FEATURE_ENDPOINT_HALT);
|
USB_FEATURE_ENDPOINT_HALT);
|
||||||
if (result != B_OK) {
|
if (result != B_OK) {
|
||||||
|
@ -279,7 +279,7 @@ ECMDevice::Control(uint32 op, void *buffer, size_t length)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
TRACE_ALWAYS("unsupported ioctl %lu\n", op);
|
TRACE_ALWAYS("unsupported ioctl %" B_PRIu32 "\n", op);
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_DEV_INVALID_IOCTL;
|
return B_DEV_INVALID_IOCTL;
|
||||||
|
@ -506,7 +506,7 @@ ECMDevice::_ReadMACAddress(usb_device device, uint8 *buffer)
|
||||||
|
|
||||||
void
|
void
|
||||||
ECMDevice::_ReadCallback(void *cookie, int32 status, void *data,
|
ECMDevice::_ReadCallback(void *cookie, int32 status, void *data,
|
||||||
uint32 actualLength)
|
size_t actualLength)
|
||||||
{
|
{
|
||||||
ECMDevice *device = (ECMDevice *)cookie;
|
ECMDevice *device = (ECMDevice *)cookie;
|
||||||
device->fActualLengthRead = actualLength;
|
device->fActualLengthRead = actualLength;
|
||||||
|
@ -517,7 +517,7 @@ ECMDevice::_ReadCallback(void *cookie, int32 status, void *data,
|
||||||
|
|
||||||
void
|
void
|
||||||
ECMDevice::_WriteCallback(void *cookie, int32 status, void *data,
|
ECMDevice::_WriteCallback(void *cookie, int32 status, void *data,
|
||||||
uint32 actualLength)
|
size_t actualLength)
|
||||||
{
|
{
|
||||||
ECMDevice *device = (ECMDevice *)cookie;
|
ECMDevice *device = (ECMDevice *)cookie;
|
||||||
device->fActualLengthWrite = actualLength;
|
device->fActualLengthWrite = actualLength;
|
||||||
|
@ -528,7 +528,7 @@ ECMDevice::_WriteCallback(void *cookie, int32 status, void *data,
|
||||||
|
|
||||||
void
|
void
|
||||||
ECMDevice::_NotifyCallback(void *cookie, int32 status, void *data,
|
ECMDevice::_NotifyCallback(void *cookie, int32 status, void *data,
|
||||||
uint32 actualLength)
|
size_t actualLength)
|
||||||
{
|
{
|
||||||
ECMDevice *device = (ECMDevice *)cookie;
|
ECMDevice *device = (ECMDevice *)cookie;
|
||||||
atomic_add(&device->fInsideNotify, 1);
|
atomic_add(&device->fInsideNotify, 1);
|
||||||
|
@ -580,7 +580,7 @@ ECMDevice::_NotifyCallback(void *cookie, int32 status, void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
TRACE_ALWAYS("device status error 0x%08lx\n", status);
|
TRACE_ALWAYS("device status error 0x%08" B_PRIx32 "\n", status);
|
||||||
if (gUSBModule->clear_feature(device->fNotifyEndpoint,
|
if (gUSBModule->clear_feature(device->fNotifyEndpoint,
|
||||||
USB_FEATURE_ENDPOINT_HALT) != B_OK)
|
USB_FEATURE_ENDPOINT_HALT) != B_OK)
|
||||||
TRACE_ALWAYS("failed to clear halt state in notify hook\n");
|
TRACE_ALWAYS("failed to clear halt state in notify hook\n");
|
||||||
|
|
|
@ -32,11 +32,11 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void _ReadCallback(void *cookie, int32 status,
|
static void _ReadCallback(void *cookie, int32 status,
|
||||||
void *data, uint32 actualLength);
|
void *data, size_t actualLength);
|
||||||
static void _WriteCallback(void *cookie, int32 status,
|
static void _WriteCallback(void *cookie, int32 status,
|
||||||
void *data, uint32 actualLength);
|
void *data, size_t actualLength);
|
||||||
static void _NotifyCallback(void *cookie, int32 status,
|
static void _NotifyCallback(void *cookie, int32 status,
|
||||||
void *data, uint32 actualLength);
|
void *data, size_t actualLength);
|
||||||
|
|
||||||
status_t _SetupDevice();
|
status_t _SetupDevice();
|
||||||
status_t _ReadMACAddress(usb_device device, uint8 *buffer);
|
status_t _ReadMACAddress(usb_device device, uint8 *buffer);
|
||||||
|
|
Loading…
Reference in New Issue