davidker / unisys

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

allow visorchipset_init() + initialize_controlvm_payload() path to return errors #93

Open selltc opened 7 years ago

selltc commented 7 years ago

KanBoard-25158

This is a response to GregKH's comments from 8/21. Here is the path in-question:

 > }
 >
 > static void
 > initialize_controlvm_payload(void)
 > {
 >      u64 phys_addr = visorchannel_get_physaddr(controlvm_channel);
 >      u64 payload_offset = 0;
 >      u32 payload_bytes = 0;
 >
 >      if (visorchannel_read(controlvm_channel,
 >                            offsetof(struct spar_controlvm_channel_protocol,
 >                                     request_payload_offset),
 >                            &payload_offset, sizeof(payload_offset)) < 0) {
 >              POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC,
 >                               POSTCODE_SEVERITY_ERR);
 >              return;

 No errors :(

 >
 >      /* send init chipset msg */
 >      msg.hdr.id = CONTROLVM_CHIPSET_INIT;
 >      msg.cmd.init_chipset.bus_count = 23;
 >      msg.cmd.init_chipset.switch_count = 0;
 >
 >      chipset_init(&msg);
 >
 >      /* get saved message count */
 >      if (visorchannel_read(controlvm_channel,
 >                            offsetof(struct spar_controlvm_channel_protocol,
 >                                     saved_crash_message_count),
 >                            &local_crash_msg_count, sizeof(u16)) < 0) {
 >              POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
 >                               POSTCODE_SEVERITY_ERR);
 >              return;

 No error handling.

 >              initialize_controlvm_payload();

 No error checking?
davidker commented 7 years ago

da308d2b5847c9c73f38ff70dfe2d7f2af84c63a6