Uh oh!
There was an error while loading. Please reload this page.
Init component's back pointer to its driver early - #2408
Conversation
There was a problem hiding this comment.
This comment is confusing here. Since cdev->drv is already set, I think it is better to remove this assignment.
dbaluta
commented
Feb 19, 2020
@mmaka1 PR looks good to me. See one comment inline. It's a pity that we need to change the API but I don't see other solution. |
c78cf8f to
2c7627bCompareMissed drv pointer as the first parameter Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Missed drv pointer as the first parameter Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Back pointer must be initialized before any instance level logging is performed by the new() operation since the instance identification requires access to the uuid that will be implemented on the component driver level. Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2c7627b to
8c35b95Comparepaulstelian97
commented
Feb 19, 2020
I don't like the terminology "back pointer", at least for me it is more confusing than revealing. Just say "pointer to driver" or something similar. Other than that, LGTM. |
mmaka1
commented
Feb 20, 2020
Why confusing? Just look at the back pointer definition plus assume that the aggregation (and its direction) exists in the model even if not explicitly reflected in the source code, then this term should be obvious. |
paulstelian97
commented
Feb 20, 2020
Yeah, I guess. Still I won't use such terminology myself because it's way too far from being intuitive for me to easily understand it. |
@paulstelian97@mmaka1 please have this discussion over a beer or something. :) |
plbossart
commented
Feb 20, 2020
code is like jokes, if you need explanations it's not funny. |
Back pointer must be initialized before any instance
level logging is performed by the new() operation since
the instance identification requires access to the uuid
that will be implemented on the component driver level.