davidker / unisys

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

Add default case for all switch statements #99

Closed ghost closed 7 years ago

ghost commented 7 years ago
 >      }
 > 
 >      memcpy(pmsg_hdr, msg_hdr,
 >             sizeof(struct controlvm_message_header));
 >      bus_info->pending_msg_hdr = pmsg_hdr;
 >  }
 > 
 >  if (response == CONTROLVM_RESP_SUCCESS) {
 >      switch (cmd) {
 >      case CONTROLVM_BUS_CREATE:
 >          chipset_bus_create(bus_info);
 >          break;
 >      case CONTROLVM_BUS_DESTROY:
 >          chipset_bus_destroy(bus_info);
 >          break;

default?

ghost commented 7 years ago
visorbus/visorchipset.c:384:    switch (which_string) {                // existing default
visorbus/visorchipset.c:729:        switch (cmd) {                     // bus_epilog()
visorbus/visorchipset.c:780:        switch (cmd) {                     // device_epilog()
visorbus/visorchipset.c:1699:   switch (offset) {                      // existing default
visorbus/visorchipset.c:1752:   switch (cmd) {                         // existing default
visorbus/visorchipset.c:1931:   switch (inmsg.hdr.id) {                // existing default
visorhba/visorhba_main.c:739:       switch (pendingdel->cmdtype) {     // existing default
visorinput/visorinput.c:395:    switch (devtype) {                     // **added**
visorinput/visorinput.c:511:    switch (keycode) {                     // existing default
visorinput/visorinput.c:554:    switch (x) {                           // existing default
visorinput/visorinput.c:590:        switch (r.activity.action) {       // *added*
visornic/visornic_main.c:1044:  switch (copy.numrcvbufs) {             // existing default
visornic/visornic_main.c:1573:      switch (cmdrsp->net.type) {        // existing default
ghost commented 7 years ago

Branch: githubissue-99-staging-next-TurningWrenches Commit(s): cc99fdd9a296d6c626c44297705f6e060166d039 checkpatch-cleared: Yes. T710-1 verified: Yes.

davidker commented 7 years ago

David, I'm going to hold off on submitting this one until I submit the patches to remove the epilog functions. My reasoning is that he complained about the ones in epilog, if we fix visorinput and he remembers he might come back and say why aren't you fixing the ones I complained about. When in reality I am getting rid of it.

ghost commented 7 years ago

Sounds great. Thanks!

davidker commented 7 years ago

Committed to staging-next at a4e93a694877b68b88eb6e06442ad904809eef51