* the interface bundle list locked here.
*/
if (gb_bundle_find(intf, bundle_id)) {
- pr_err("duplicate bundle id 0x%02hhx\n", bundle_id);
+ pr_err("duplicate bundle id 0x%02x\n", bundle_id);
return NULL;
}
retval = device_add(&bundle->dev);
if (retval) {
- pr_err("failed to add bundle device for id 0x%02hhx\n",
+ pr_err("failed to add bundle device for id 0x%02x\n",
bundle_id);
put_device(&bundle->dev);
return NULL;
}
snprintf(connection->name, sizeof(connection->name),
- "%hu/%hhu:%hu", hd_cport_id, intf_id, cport_id);
+ "%u/%u:%u", hd_cport_id, intf_id, cport_id);
}
/*
* about holding the connection lock.
*/
if (bundle && gb_connection_intf_find(bundle->intf, cport_id)) {
- dev_err(&bundle->dev, "cport 0x%04hx already connected\n",
+ dev_err(&bundle->dev, "cport 0x%04x already connected\n",
cport_id);
return NULL;
}
connection->minor);
if (!protocol) {
dev_warn(&connection->hd->dev,
- "protocol 0x%02hhx version %hhu.%hhu not found\n",
+ "protocol 0x%02x version %u.%u not found\n",
connection->protocol_id,
connection->major, connection->minor);
return 0;
USB_RECIP_INTERFACE, cport_id, 0,
NULL, 0, ES2_TIMEOUT);
if (retval < 0) {
- dev_err(&udev->dev, "failed to reset cport %hu: %d\n", cport_id,
+ dev_err(&udev->dev, "failed to reset cport %u: %d\n", cport_id,
retval);
return retval;
}
endpoint->bEndpointAddress;
} else {
dev_err(&udev->dev,
- "Unknown endpoint type found, address %x\n",
+ "Unknown endpoint type found, address %02x\n",
endpoint->bEndpointAddress);
}
}
return gb_firmware_ready_to_boot(op);
default:
dev_err(&op->connection->bundle->dev,
- "unsupported request: %hhu\n", type);
+ "unsupported request: %u\n", type);
return -EINVAL;
}
}
// hid->bus = BUS_GREYBUS; /* Need a bustype for GREYBUS in <linux/input.h> */
/* Set HID device's name */
- snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX",
+ snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X",
dev_name(&ghid->connection->bundle->dev),
hid->vendor, hid->product);
return 0;
default:
- dev_err(dev, "unsupported request: %hhu\n", type);
+ dev_err(dev, "unsupported request: %u\n", type);
return -EINVAL;
}
}
break;
case GREYBUS_TYPE_INVALID:
default:
- pr_err("invalid descriptor type (%hhu)\n", desc_header->type);
+ pr_err("invalid descriptor type (%u)\n", desc_header->type);
return -EINVAL;
}
header = &manifest->header;
manifest_size = le16_to_cpu(header->size);
if (manifest_size != size) {
- pr_err("manifest size mismatch (%zu != %hu)\n",
+ pr_err("manifest size mismatch (%zu != %u)\n",
size, manifest_size);
return false;
}
/* Validate major/minor number */
if (header->version_major > GREYBUS_VERSION_MAJOR) {
- pr_err("manifest version too new (%hhu.%hhu > %hhu.%hhu)\n",
+ pr_err("manifest version too new (%u.%u > %u.%u)\n",
header->version_major, header->version_minor,
GREYBUS_VERSION_MAJOR, GREYBUS_VERSION_MINOR);
return false;
status = protocol->request_recv(operation->type, operation);
} else {
dev_err(&connection->hd->dev,
- "%s: unexpected incoming request of type 0x%02hhx\n",
+ "%s: unexpected incoming request of type 0x%02x\n",
connection->name, operation->type);
status = -EPROTONOSUPPORT;
ret = gb_operation_response_send(operation, status);
if (ret) {
dev_err(&connection->hd->dev,
- "%s: failed to send response %d for type 0x%02hhx: %d\n",
+ "%s: failed to send response %d for type 0x%02x: %d\n",
connection->name, status, operation->type, ret);
return;
}
if (message == operation->response) {
if (status) {
dev_err(&connection->hd->dev,
- "%s: error sending response 0x%02hhx: %d\n",
+ "%s: error sending response 0x%02x: %d\n",
connection->name, operation->type, status);
}
gb_operation_put_active(operation);
operation = gb_operation_find_outgoing(connection, operation_id);
if (!operation) {
dev_err(&connection->hd->dev,
- "%s: unexpected response id 0x%04hx received\n",
+ "%s: unexpected response id 0x%04x received\n",
connection->name, operation_id);
return;
}
message_size = sizeof(*message->header) + message->payload_size;
if (!errno && size != message_size) {
dev_err(&connection->hd->dev,
- "%s: malformed response 0x%02hhx received (%zu != %zu)\n",
+ "%s: malformed response 0x%02x received (%zu != %zu)\n",
connection->name, message->header->type, size,
message_size);
errno = -EMSGSIZE;
msg_size = le16_to_cpu(header.size);
if (size < msg_size) {
dev_err(dev,
- "%s: incomplete message 0x%04hx of type 0x%02hhx received (%zu < %zu)\n",
+ "%s: incomplete message 0x%04x of type 0x%02x received (%zu < %zu)\n",
connection->name, le16_to_cpu(header.operation_id),
header.type, size, msg_size);
return; /* XXX Should still complete operation */
ret = gb_operation_request_send_sync_timeout(operation, timeout);
if (ret) {
dev_err(&connection->hd->dev,
- "%s: synchronous operation of type 0x%02hhx failed: %d\n",
+ "%s: synchronous operation of type 0x%02x failed: %d\n",
connection->name, type, ret);
} else {
if (response_size) {
if (response.major > connection->protocol->major) {
dev_err(&connection->hd->dev,
- "%s: unsupported major version (%hhu > %hhu)\n",
+ "%s: unsupported major version (%u > %u)\n",
connection->name, response.major,
connection->protocol->major);
return -ENOTSUPP;
connection->module_minor = response.minor;
dev_dbg(&connection->hd->dev,
- "%s: %s (0x%02hhx) v%hhu.%hhu\n", connection->name,
+ "%s: %s (0x%02x) v%u.%u\n", connection->name,
protocol->name, protocol->id, response.major, response.minor);
return 0;
&request, sizeof(request),
&response, sizeof(response));
if (ret) {
- dev_err(&svc->dev, "failed to get DME attribute (%hhu %hx %hu): %d\n",
+ dev_err(&svc->dev, "failed to get DME attribute (%u %04x %u): %d\n",
intf_id, attr, selector, ret);
return ret;
}
result = le16_to_cpu(response.result_code);
if (result) {
- dev_err(&svc->dev, "UniPro error while getting DME attribute (%hhu %hx %hu): %hu\n",
+ dev_err(&svc->dev, "UniPro error while getting DME attribute (%u %04x %u): %u\n",
intf_id, attr, selector, result);
return -EIO;
}
&request, sizeof(request),
&response, sizeof(response));
if (ret) {
- dev_err(&svc->dev, "failed to set DME attribute (%hhu %hx %hu %u): %d\n",
+ dev_err(&svc->dev, "failed to set DME attribute (%u %04x %u %u): %d\n",
intf_id, attr, selector, value, ret);
return ret;
}
result = le16_to_cpu(response.result_code);
if (result) {
- dev_err(&svc->dev, "UniPro error while setting DME attribute (%hhu %hx %hu %u): %hu\n",
+ dev_err(&svc->dev, "UniPro error while setting DME attribute (%u %04x %u %u): %u\n",
intf_id, attr, selector, value, result);
return -EIO;
}
ret = gb_operation_sync(connection, GB_SVC_TYPE_CONN_DESTROY,
&request, sizeof(request), NULL, 0);
if (ret) {
- dev_err(&svc->dev, "failed to destroy connection (%hhu:%hu %hhu:%hu): %d\n",
+ dev_err(&svc->dev, "failed to destroy connection (%u:%u %u:%u): %d\n",
intf1_id, cport1_id, intf2_id, cport2_id, ret);
}
}
ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_ROUTE_DESTROY,
&request, sizeof(request), NULL, 0);
if (ret) {
- dev_err(&svc->dev, "failed to destroy route (%hhu %hhu): %d\n",
+ dev_err(&svc->dev, "failed to destroy route (%u %u): %d\n",
intf1_id, intf2_id, ret);
}
}
request = op->request->payload;
if (request->major > GB_SVC_VERSION_MAJOR) {
- dev_warn(&svc->dev, "unsupported major version (%hhu > %hhu)\n",
+ dev_warn(&svc->dev, "unsupported major version (%u > %u)\n",
request->major, GB_SVC_VERSION_MAJOR);
return -ENOTSUPP;
}
* Remove the interface and add it again, and let user know
* about this with a print message.
*/
- dev_info(&svc->dev, "removing interface %hhu to add it again\n",
+ dev_info(&svc->dev, "removing interface %u to add it again\n",
intf_id);
gb_svc_intf_remove(svc, intf);
}
intf = gb_interface_create(hd, intf_id);
if (!intf) {
- dev_err(&svc->dev, "failed to create interface %hhu\n",
+ dev_err(&svc->dev, "failed to create interface %u\n",
intf_id);
return;
}
GB_DEVICE_ID_MODULES_START, 0, GFP_KERNEL);
if (device_id < 0) {
ret = device_id;
- dev_err(&svc->dev, "failed to allocate device id for interface %hhu: %d\n",
+ dev_err(&svc->dev, "failed to allocate device id for interface %u: %d\n",
intf_id, ret);
goto destroy_interface;
}
ret = gb_svc_intf_device_id(svc, intf_id, device_id);
if (ret) {
- dev_err(&svc->dev, "failed to set device id %hhu for interface %hhu: %d\n",
+ dev_err(&svc->dev, "failed to set device id %u for interface %u: %d\n",
device_id, intf_id, ret);
goto ida_put;
}
ret = gb_svc_route_create(svc, svc->ap_intf_id, GB_DEVICE_ID_AP,
intf_id, device_id);
if (ret) {
- dev_err(&svc->dev, "failed to create route to interface %hhu (device id %hhu): %d\n",
+ dev_err(&svc->dev, "failed to create route to interface %u (device id %u): %d\n",
intf_id, device_id, ret);
goto svc_id_free;
}
ret = gb_interface_init(intf, device_id);
if (ret) {
- dev_err(&svc->dev, "failed to initialize interface %hhu (device id %hhu): %d\n",
+ dev_err(&svc->dev, "failed to initialize interface %u (device id %u): %d\n",
intf_id, device_id, ret);
goto destroy_route;
}
intf = gb_interface_find(hd, intf_id);
if (!intf) {
- dev_warn(&svc->dev, "could not find hot-unplug interface %hhu\n",
+ dev_warn(&svc->dev, "could not find hot-unplug interface %u\n",
intf_id);
return;
}