davidker / unisys

Master repository for new changes to drivers/staging/unisys and drivers/visorbus
Other
2 stars 1 forks source link

Change function names to be consistent with driver namespace #128

Open wadgaonkarsam opened 7 years ago

wadgaonkarsam commented 7 years ago

Kanboard:29383

void
bus_create_response(struct visor_device *bus_info, int response)
{
    if (response >= 0)
        bus_info->state.created = 1;

And that's a horrid global function name, please use your own namespace.

}

void
bus_destroy_response(struct visor_device *bus_info, int response)

same here, use your own namespace.

{
    bus_responder(CONTROLVM_BUS_DESTROY, bus_info->pending_msg_hdr,
              response);

    kfree(bus_info->pending_msg_hdr);
    bus_info->pending_msg_hdr = NULL;
}

void
device_create_response(struct visor_device *dev_info, int response)

same namespace issue.

}

void
device_destroy_response(struct visor_device *dev_info, int response)

namespace...

{
    device_responder(CONTROLVM_DEVICE_DESTROY, dev_info->pending_msg_hdr,
             response);

    kfree(dev_info->pending_msg_hdr);
    dev_info->pending_msg_hdr = NULL;
}

void
device_pause_response(struct visor_device *dev_info,
              int response)

namespace...

{
    device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
                     dev_info, response,
                     segment_state_standby);

    kfree(dev_info->pending_msg_hdr);
    dev_info->pending_msg_hdr = NULL;
}

void
device_resume_response(struct visor_device *dev_info, int response)

namespace, errors, etc...

wadgaonkarsam commented 7 years ago

Branch: githubissue-128 Commit(s): 1775f2106706dfbbba2a3fb63c8ebf3e4870a3c6 ed9a2d7e264748dd7886a383da14a6d6fff53996 4cbf9173f535092caf1cea20fe7b4288a6bf84b9 9c059e713a2c54d3b4f0fe9e7bde6c843272e9e7 0a4899e3a88854b963626420d6e0782f8c19807a 7eb1b3a4a96cba49b16d119a7cf7af3a1b4cd876 7606b2cece740a6e5a73be0ba54e4266840ffa5b checkpatch-cleared: Yes T710-W1-AutoTest verified: Yes

davidker commented 7 years ago

Sameer, I'm going through channel.h and I see a lot of places where describing with namespace can improve it. I'm wondering if we should look at this file as well.

davidker commented 7 years ago

Patch: staging: unisys: visorbus: vbuschannel.h: renamed #defines and structures to match driver namespace

Can you split it up into #defines and structures?

davidker commented 7 years ago

Same with the controlvmchannel.h one as well.

davidker commented 7 years ago

And for channel.h (even though it makes one patch extremely small)

davidker commented 7 years ago

I noticed a couple of things with the current githubissue-128 branch. We missed the Documentation directory and I think we should drop protocol from the channel names.