static void
chipset_init(struct controlvm_message *inmsg)
{
static int chipset_inited;
enum ultra_chipset_feature features = 0;
int rc = CONTROLVM_RESP_SUCCESS;
What's with the use of this odd return value in lots of places?
It should just be 0 or a -error number. Don't mess with odd
non-standard values. You do that a lot in this file.
if (chipset_inited) {
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
See, odd errors :(
*/
pmsg_hdr = msg_hdr;
goto out_respond;
}
if (dev_info->pending_msg_hdr) {
/* only non-NULL if dev is still waiting on a response */
response = -CONTROLVM_RESP_ERROR_MESSAGE_ID_INVALID_FOR_CLIENT;
pmsg_hdr = dev_info->pending_msg_hdr;
goto out_respond;
}
if (need_response) {
pmsg_hdr = kzalloc(sizeof(*pmsg_hdr), GFP_KERNEL);
if (!pmsg_hdr) {
response = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
-ENOMEM.
See, saved you a bunch of characters. You're welcome.
And again with the funky errors, just delete them all, this is the
kernel, use the ones we have, don't make driver/subsystem-specific ones.
if (!payload)
return -CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
Again with the funky error codes, I'll just stop saying them now, please
delete all of them and use the standard kernel errors in all of the
visorbus codebase.
And 0, really. You should have noticed that the whole kernel does this,
you aren't special. Well, you are, we all are special and unique, just
like everyone else...
What's with the use of this odd return value in lots of places?
It should just be 0 or a -error number. Don't mess with odd non-standard values. You do that a lot in this file.
See, odd errors :(
-ENOMEM.
See, saved you a bunch of characters. You're welcome.
And again with the funky errors, just delete them all, this is the kernel, use the ones we have, don't make driver/subsystem-specific ones.
Again with the funky error codes, I'll just stop saying them now, please delete all of them and use the standard kernel errors in all of the visorbus codebase.
0 {sniff}
And 0, really. You should have noticed that the whole kernel does this, you aren't special. Well, you are, we all are special and unique, just like everyone else...