Project

General

Profile

Feature #11179

usba parsing code should take const data pointers

Added by Robert Mustacchi about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

The USBA framework has a large amount of code that deals with parsing descriptors that is anchored in the function usb_parse_data(9F). This currently doesn't take a const data pointer; however, it could and should. Enabling this to be const allows us to enforce constness further throughout the stack.

Fortunately, anything that was being passed as a char * can be taken as a const char * so we shouldn't have to worry about API or ABI compatability.

History

#1

Updated by Electric Monk about 1 month ago

  • Status changed from New to Closed

git commit 0d2006e4703eda0f88de2e571bf9fb317552faa2

commit  0d2006e4703eda0f88de2e571bf9fb317552faa2
Author: Robert Mustacchi <rm@joyent.com>
Date:   2019-06-14T22:23:14.000Z

    11177 usba should read the device binary object store
    11178 USB topology could know about supported, minimum speeds
    11179 usba parsing code should take const data pointers
    11176 usba kernel module should be CERRWARN and smatch clean
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Rob Johnston <rob.johnston@joyent.com>
    Approved by: Gordon Ross <gordon.ross@nexenta.com>

Also available in: Atom PDF