drivers/crypto/ccp/ccp-crypto-aes.c:344:1-7: Replace memcpy with struct assignment
drivers/crypto/ccp/ccp-crypto-sha.c:398:1-7: Replace memcpy with struct assignment
drivers/crypto/ccp/ccp-dev.c:578:2-3: Unneeded semicolon
/c/kernel-tests/src/cocci/drivers/crypto/ccp/ccp-dev.c:565:2-3: Unneeded semicolon
Generated by: coccinelle/misc/memcpy-assign.cocci
CC: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
/* Copy the defaults and override as necessary */
alg = &ccp_alg->alg;
- memcpy(alg, def->alg_defaults, sizeof(*alg));
+ *alg = *def->alg_defaults;
snprintf(alg->cra_name, CRYPTO_MAX_ALG_NAME, "%s", def->name);
snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s",
def->driver_name);
return -ENOMEM;
/* Copy the base algorithm and only change what's necessary */
- memcpy(ccp_alg, base_alg, sizeof(*ccp_alg));
+ *ccp_alg = *base_alg;
INIT_LIST_HEAD(&ccp_alg->entry);
strncpy(ccp_alg->child_alg, def->name, CRYPTO_MAX_ALG_NAME);
return -ENODEV;
return ccp_pci_init();
break;
- };
+ }
return -ENODEV;
}
case 22:
ccp_pci_exit();
break;
- };
+ }
}
module_init(ccp_mod_init);