@@ -879,7 +879,7 @@ static int hifn_enable_crypto(struct hifn_device *dev)
879
879
880
880
static void hifn_init_dma (struct hifn_device * dev )
881
881
{
882
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
882
+ struct hifn_dma * dma = dev -> desc_virt ;
883
883
u32 dptr = dev -> desc_dma ;
884
884
int i ;
885
885
@@ -1072,7 +1072,7 @@ static int hifn_setup_crypto_command(struct hifn_device *dev,
1072
1072
u8 * buf , unsigned dlen , unsigned slen ,
1073
1073
u8 * key , int keylen , u8 * iv , int ivsize , u16 mode )
1074
1074
{
1075
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1075
+ struct hifn_dma * dma = dev -> desc_virt ;
1076
1076
struct hifn_crypt_command * cry_cmd ;
1077
1077
u8 * buf_pos = buf ;
1078
1078
u16 cmd_len ;
@@ -1113,7 +1113,7 @@ static int hifn_setup_cmd_desc(struct hifn_device *dev,
1113
1113
struct hifn_context * ctx , struct hifn_request_context * rctx ,
1114
1114
void * priv , unsigned int nbytes )
1115
1115
{
1116
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1116
+ struct hifn_dma * dma = dev -> desc_virt ;
1117
1117
int cmd_len , sa_idx ;
1118
1118
u8 * buf , * buf_pos ;
1119
1119
u16 mask ;
@@ -1231,7 +1231,7 @@ static int hifn_setup_cmd_desc(struct hifn_device *dev,
1231
1231
static int hifn_setup_src_desc (struct hifn_device * dev , struct page * page ,
1232
1232
unsigned int offset , unsigned int size , int last )
1233
1233
{
1234
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1234
+ struct hifn_dma * dma = dev -> desc_virt ;
1235
1235
int idx ;
1236
1236
dma_addr_t addr ;
1237
1237
@@ -1264,7 +1264,7 @@ static int hifn_setup_src_desc(struct hifn_device *dev, struct page *page,
1264
1264
1265
1265
static void hifn_setup_res_desc (struct hifn_device * dev )
1266
1266
{
1267
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1267
+ struct hifn_dma * dma = dev -> desc_virt ;
1268
1268
1269
1269
dma -> resr [dma -> resi ].l = __cpu_to_le32 (HIFN_USED_RESULT |
1270
1270
HIFN_D_VALID | HIFN_D_LAST );
@@ -1290,7 +1290,7 @@ static void hifn_setup_res_desc(struct hifn_device *dev)
1290
1290
static void hifn_setup_dst_desc (struct hifn_device * dev , struct page * page ,
1291
1291
unsigned offset , unsigned size , int last )
1292
1292
{
1293
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1293
+ struct hifn_dma * dma = dev -> desc_virt ;
1294
1294
int idx ;
1295
1295
dma_addr_t addr ;
1296
1296
@@ -1710,7 +1710,7 @@ static void hifn_process_ready(struct skcipher_request *req, int error)
1710
1710
1711
1711
static void hifn_clear_rings (struct hifn_device * dev , int error )
1712
1712
{
1713
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1713
+ struct hifn_dma * dma = dev -> desc_virt ;
1714
1714
int i , u ;
1715
1715
1716
1716
dev_dbg (& dev -> pdev -> dev , "ring cleanup 1: i: %d.%d.%d.%d, u: %d.%d.%d.%d, "
@@ -1784,7 +1784,7 @@ static void hifn_work(struct work_struct *work)
1784
1784
1785
1785
spin_lock_irqsave (& dev -> lock , flags );
1786
1786
if (dev -> active == 0 ) {
1787
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1787
+ struct hifn_dma * dma = dev -> desc_virt ;
1788
1788
1789
1789
if (dma -> cmdu == 0 && (dev -> flags & HIFN_FLAG_CMD_BUSY )) {
1790
1790
dev -> flags &= ~HIFN_FLAG_CMD_BUSY ;
@@ -1815,7 +1815,7 @@ static void hifn_work(struct work_struct *work)
1815
1815
if (reset ) {
1816
1816
if (++ dev -> reset >= 5 ) {
1817
1817
int i ;
1818
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1818
+ struct hifn_dma * dma = dev -> desc_virt ;
1819
1819
1820
1820
dev_info (& dev -> pdev -> dev ,
1821
1821
"r: %08x, active: %d, started: %d, "
@@ -1848,8 +1848,8 @@ static void hifn_work(struct work_struct *work)
1848
1848
1849
1849
static irqreturn_t hifn_interrupt (int irq , void * data )
1850
1850
{
1851
- struct hifn_device * dev = ( struct hifn_device * ) data ;
1852
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1851
+ struct hifn_device * dev = data ;
1852
+ struct hifn_dma * dma = dev -> desc_virt ;
1853
1853
u32 dmacsr , restart ;
1854
1854
1855
1855
dmacsr = hifn_read_1 (dev , HIFN_1_DMA_CSR );
@@ -1914,7 +1914,7 @@ static void hifn_flush(struct hifn_device *dev)
1914
1914
unsigned long flags ;
1915
1915
struct crypto_async_request * async_req ;
1916
1916
struct skcipher_request * req ;
1917
- struct hifn_dma * dma = ( struct hifn_dma * ) dev -> desc_virt ;
1917
+ struct hifn_dma * dma = dev -> desc_virt ;
1918
1918
int i ;
1919
1919
1920
1920
for (i = 0 ; i < HIFN_D_RES_RSIZE ; ++ i ) {
0 commit comments