Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: qat - remove unnecessary return codes

Remove unnecessary return code variables and change function types
accordingly.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Tadeusz Struk and committed by
Herbert Xu
341b2a35 3e3dc25f

+8 -15
+8 -15
drivers/crypto/qat/qat_common/qat_uclo.c
··· 1088 1088 *uword = fill; 1089 1089 } 1090 1090 1091 - static int qat_uclo_wr_uimage_raw_page(struct icp_qat_fw_loader_handle *handle, 1092 - struct icp_qat_uclo_encap_page 1093 - *encap_page, unsigned int ae) 1091 + static void qat_uclo_wr_uimage_raw_page(struct icp_qat_fw_loader_handle *handle, 1092 + struct icp_qat_uclo_encap_page 1093 + *encap_page, unsigned int ae) 1094 1094 { 1095 1095 unsigned int uw_physical_addr, uw_relative_addr, i, words_num, cpylen; 1096 1096 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; 1097 1097 uint64_t fill_pat; 1098 - int status = 0; 1099 1098 1100 1099 /* load the page starting at appropriate ustore address */ 1101 1100 /* get fill-pattern from an image -- they are all the same */ ··· 1125 1126 uw_relative_addr += cpylen; 1126 1127 words_num -= cpylen; 1127 1128 } 1128 - return status; 1129 1129 } 1130 1130 1131 - static int 1132 - qat_uclo_wr_uimage_pages(struct icp_qat_fw_loader_handle *handle, 1133 - struct icp_qat_uof_image *image) 1131 + static void qat_uclo_wr_uimage_pages(struct icp_qat_fw_loader_handle *handle, 1132 + struct icp_qat_uof_image *image) 1134 1133 { 1135 1134 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; 1136 1135 unsigned int ctx_mask, s; 1137 1136 struct icp_qat_uclo_page *page; 1138 1137 unsigned char ae; 1139 - int retval = 0; 1140 1138 int ctx; 1141 1139 1142 1140 if (ICP_QAT_CTX_MODE(image->ae_mode) == ICP_QAT_UCLO_MAX_CTX) ··· 1156 1160 page = obj_handle->ae_data[ae].ae_slices[s].page; 1157 1161 if (!page->encap_page->def_page) 1158 1162 continue; 1159 - if (qat_uclo_wr_uimage_raw_page(handle, page->encap_page, ae)) 1160 - return -EINVAL; 1163 + qat_uclo_wr_uimage_raw_page(handle, page->encap_page, ae); 1161 1164 1162 1165 page = obj_handle->ae_data[ae].ae_slices[s].page; 1163 1166 for (ctx = 0; ctx < ICP_QAT_UCLO_MAX_CTX; ctx++) ··· 1167 1172 qat_hal_set_pc(handle, (unsigned char)ae, image->ctx_assigned, 1168 1173 image->entry_address); 1169 1174 } 1170 - return retval; 1171 1175 } 1172 1176 1173 1177 int qat_uclo_wr_all_uimage(struct icp_qat_fw_loader_handle *handle) ··· 1181 1187 return -EINVAL; 1182 1188 if (qat_uclo_init_ustore(handle, &(obj_handle->ae_uimage[i]))) 1183 1189 return -EINVAL; 1184 - if (qat_uclo_wr_uimage_pages(handle, 1185 - obj_handle->ae_uimage[i].img_ptr)) 1186 - return -EINVAL; 1190 + qat_uclo_wr_uimage_pages(handle, 1191 + obj_handle->ae_uimage[i].img_ptr); 1187 1192 } 1188 1193 return 0; 1189 1194 }