staging: sep: Fix blank lines issue reported by checkpatch
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f0949457ca
commit
bc0c9da55b
@ -492,7 +492,6 @@ int sep_free_dma_table_data_handler(struct sep_device *sep,
|
||||
* memory is not available to the o/s at all.
|
||||
*/
|
||||
if (!(*dma_ctx)->secure_dma && dma->out_map_array) {
|
||||
|
||||
for (count = 0; count < dma->out_num_pages; count++) {
|
||||
dma_unmap_page(&sep->pdev->dev,
|
||||
dma->out_map_array[count].dma_addr,
|
||||
@ -513,7 +512,6 @@ int sep_free_dma_table_data_handler(struct sep_device *sep,
|
||||
|
||||
/* Again, we do this only for non secure dma */
|
||||
if (!(*dma_ctx)->secure_dma && dma->out_page_array) {
|
||||
|
||||
for (count = 0; count < dma->out_num_pages; count++) {
|
||||
if (!PageReserved(dma->out_page_array[count]))
|
||||
|
||||
@ -633,7 +631,6 @@ static int sep_end_transaction_handler(struct sep_device *sep,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* sep_release - close a SEP device
|
||||
* @inode: inode of SEP device
|
||||
@ -766,7 +763,6 @@ static unsigned int sep_poll(struct file *filp, poll_table *wait)
|
||||
goto end_function;
|
||||
}
|
||||
|
||||
|
||||
/* Add the event to the polling wait table */
|
||||
dev_dbg(&sep->pdev->dev, "[PID%d] poll: calling wait sep_event\n",
|
||||
current->pid);
|
||||
@ -856,7 +852,6 @@ static unsigned long sep_set_time(struct sep_device *sep)
|
||||
struct timeval time;
|
||||
u32 *time_addr; /* Address of time as seen by the kernel */
|
||||
|
||||
|
||||
do_gettimeofday(&time);
|
||||
|
||||
/* Set value in the SYSTEM MEMORY offset */
|
||||
@ -905,7 +900,6 @@ int sep_send_command_handler(struct sep_device *sep)
|
||||
msg_pool += 1;
|
||||
if ((*msg_pool < 2) ||
|
||||
(*msg_pool > SEP_DRIVER_MAX_MESSAGE_SIZE_IN_BYTES)) {
|
||||
|
||||
dev_warn(&sep->pdev->dev, "invalid message size\n");
|
||||
error = -EPROTO;
|
||||
goto end_function;
|
||||
@ -1023,7 +1017,6 @@ static int sep_crypto_dma(
|
||||
|
||||
*dma_maps = sep_dma;
|
||||
return count_mapped;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1053,7 +1046,6 @@ static int sep_crypto_lli(
|
||||
u32 data_size,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
|
||||
int ct1;
|
||||
struct sep_lli_entry *sep_lli;
|
||||
struct sep_dma_map *sep_map;
|
||||
@ -1317,7 +1309,6 @@ static int sep_lock_user_pages(struct sep_device *sep,
|
||||
(unsigned long)lli_array[0].bus_address,
|
||||
lli_array[0].block_size);
|
||||
|
||||
|
||||
/* Check the size of the last page */
|
||||
if (num_pages > 1) {
|
||||
lli_array[num_pages - 1].block_size =
|
||||
@ -1662,7 +1653,6 @@ static void sep_build_lli_table(struct sep_device *sep,
|
||||
|
||||
/* Set the output parameter */
|
||||
*num_processed_entries_ptr += array_counter;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1746,7 +1736,6 @@ static void sep_debug_print_lli_tables(struct sep_device *sep,
|
||||
/* Print entries of the table (without info entry) */
|
||||
for (entries_count = 0; entries_count < num_table_entries;
|
||||
entries_count++, lli_table_ptr++) {
|
||||
|
||||
dev_dbg(&sep->pdev->dev,
|
||||
"[PID%d] lli_table_ptr address is %08lx\n",
|
||||
current->pid,
|
||||
@ -1772,7 +1761,6 @@ static void sep_debug_print_lli_tables(struct sep_device *sep,
|
||||
current->pid,
|
||||
(unsigned long)lli_table_ptr->bus_address);
|
||||
|
||||
|
||||
table_data_size = lli_table_ptr->block_size & 0xffffff;
|
||||
num_table_entries = (lli_table_ptr->block_size >> 24) & 0xff;
|
||||
|
||||
@ -1795,7 +1783,6 @@ static void sep_debug_print_lli_tables(struct sep_device *sep,
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* sep_prepare_empty_lli_table - create a blank LLI table
|
||||
* @sep: pointer to struct sep_device
|
||||
@ -1971,7 +1958,6 @@ static int sep_prepare_input_dma_table(struct sep_device *sep,
|
||||
|
||||
/* Loop till all the entries in in array are processed */
|
||||
while (current_entry < sep_lli_entries) {
|
||||
|
||||
/* Set the new input and output tables */
|
||||
in_lli_table_ptr =
|
||||
(struct sep_lli_entry *)lli_table_alloc_addr;
|
||||
@ -1987,10 +1973,8 @@ static int sep_prepare_input_dma_table(struct sep_device *sep,
|
||||
((void *)sep->shared_addr +
|
||||
SYNCHRONIC_DMA_TABLES_AREA_OFFSET_BYTES +
|
||||
SYNCHRONIC_DMA_TABLES_AREA_SIZE_BYTES)) {
|
||||
|
||||
error = -ENOMEM;
|
||||
goto end_function_error;
|
||||
|
||||
}
|
||||
|
||||
/* Update the number of created tables */
|
||||
@ -2021,7 +2005,6 @@ static int sep_prepare_input_dma_table(struct sep_device *sep,
|
||||
¤t_entry, &num_entries_in_table, table_data_size);
|
||||
|
||||
if (info_entry_ptr == NULL) {
|
||||
|
||||
/* Set the output parameters to physical addresses */
|
||||
*lli_table_ptr = sep_shared_area_virt_to_bus(sep,
|
||||
dma_in_lli_table_ptr);
|
||||
@ -2070,7 +2053,6 @@ static int sep_prepare_input_dma_table(struct sep_device *sep,
|
||||
|
||||
end_function:
|
||||
return error;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2192,7 +2174,6 @@ static int sep_construct_dma_tables_from_lli(
|
||||
((void *)sep->shared_addr +
|
||||
SYNCHRONIC_DMA_TABLES_AREA_OFFSET_BYTES +
|
||||
SYNCHRONIC_DMA_TABLES_AREA_SIZE_BYTES)) {
|
||||
|
||||
dev_warn(&sep->pdev->dev, "dma table limit overrun\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -2449,10 +2430,7 @@ static int sep_prepare_input_output_dma_table(struct sep_device *sep,
|
||||
|
||||
goto end_function_free_lli_in;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
} else {
|
||||
dev_dbg(&sep->pdev->dev, "[PID%d] Locking user input pages\n",
|
||||
current->pid);
|
||||
error = sep_lock_user_pages(sep, app_virt_in_addr,
|
||||
@ -2553,7 +2531,6 @@ static int sep_prepare_input_output_dma_table(struct sep_device *sep,
|
||||
dma_ctx->dma_res_arr[dma_ctx->nr_dcb_creat].out_page_array = NULL;
|
||||
kfree(lli_out_array);
|
||||
|
||||
|
||||
end_function_free_lli_in:
|
||||
kfree(dma_ctx->dma_res_arr[dma_ctx->nr_dcb_creat].in_map_array);
|
||||
dma_ctx->dma_res_arr[dma_ctx->nr_dcb_creat].in_map_array = NULL;
|
||||
@ -2562,9 +2539,7 @@ static int sep_prepare_input_output_dma_table(struct sep_device *sep,
|
||||
kfree(lli_in_array);
|
||||
|
||||
end_function:
|
||||
|
||||
return error;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2702,7 +2677,6 @@ int sep_prepare_input_output_dma_table_in_dcb(struct sep_device *sep,
|
||||
dcb_table_ptr->out_vr_tail_pt = 0;
|
||||
|
||||
if (isapplet) {
|
||||
|
||||
/* Check if there is enough data for DMA operation */
|
||||
if (data_in_size < SEP_DRIVER_MIN_DATA_SIZE_PER_TABLE) {
|
||||
if (is_kva) {
|
||||
@ -2828,10 +2802,8 @@ int sep_prepare_input_output_dma_table_in_dcb(struct sep_device *sep,
|
||||
|
||||
end_function:
|
||||
return error;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* sep_free_dma_tables_and_dcb - free DMA tables and DCBs
|
||||
* @sep: pointer to struct sep_device
|
||||
@ -2962,7 +2934,6 @@ static int sep_prepare_dcb_handler(struct sep_device *sep, unsigned long arg,
|
||||
|
||||
end_function:
|
||||
return error;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3166,7 +3137,6 @@ static irqreturn_t sep_inthandler(int irq, void *dev_id)
|
||||
dev_dbg(&sep->pdev->dev, "sep int: IRR REG val: %x\n", reg_val);
|
||||
|
||||
if (reg_val & (0x1 << 13)) {
|
||||
|
||||
/* Lock and update the counter of reply messages */
|
||||
spin_lock_irqsave(&sep->snd_rply_lck, lock_irq_flag);
|
||||
sep->reply_ct++;
|
||||
@ -3243,8 +3213,9 @@ static int sep_reconfig_shared_area(struct sep_device *sep)
|
||||
dev_warn(&sep->pdev->dev, "could not reconfig shared area\n");
|
||||
dev_warn(&sep->pdev->dev, "result was %x\n", ret_val);
|
||||
ret_val = -ENOMEM;
|
||||
} else
|
||||
} else {
|
||||
ret_val = 0;
|
||||
}
|
||||
|
||||
dev_dbg(&sep->pdev->dev, "reconfig shared area end\n");
|
||||
|
||||
@ -3431,7 +3402,6 @@ static ssize_t sep_create_dcb_dmatables_context(struct sep_device *sep,
|
||||
end_function:
|
||||
kfree(dcb_args);
|
||||
return error;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3510,7 +3480,6 @@ int sep_create_dcb_dmatables_context_kernel(struct sep_device *sep,
|
||||
|
||||
end_function:
|
||||
return error;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3589,7 +3558,6 @@ static ssize_t sep_create_msgarea_context(struct sep_device *sep,
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* sep_read - Returns results of an operation for fastcall interface
|
||||
* @filp: File pointer
|
||||
@ -3637,7 +3605,6 @@ static ssize_t sep_read(struct file *filp,
|
||||
goto end_function_error;
|
||||
}
|
||||
|
||||
|
||||
/* Wait for SEP to finish */
|
||||
wait_event(sep->event_interrupt,
|
||||
test_bit(SEP_WORKING_LOCK_BIT,
|
||||
@ -3710,7 +3677,6 @@ static inline ssize_t sep_fastcall_args_get(struct sep_device *sep,
|
||||
goto end_function;
|
||||
}
|
||||
|
||||
|
||||
if (copy_from_user(args, buf_user, sizeof(struct sep_fastcall_hdr))) {
|
||||
error = -EFAULT;
|
||||
goto end_function;
|
||||
@ -3812,7 +3778,6 @@ static ssize_t sep_write(struct file *filp,
|
||||
goto end_function_error;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Prepare contents of the shared area regions for
|
||||
* the operation into temporary buffers
|
||||
@ -3922,6 +3887,7 @@ static ssize_t sep_write(struct file *filp,
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
/**
|
||||
* sep_seek - Handler for seek system call
|
||||
* @filp: File pointer
|
||||
@ -3936,8 +3902,6 @@ static loff_t sep_seek(struct file *filp, loff_t offset, int origin)
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* sep_file_operations - file operation on sep device
|
||||
* @sep_ioctl: ioctl handler from user space call
|
||||
@ -3990,7 +3954,6 @@ sep_sysfs_read(struct file *filp, struct kobject *kobj,
|
||||
if (queue_num > SEP_DOUBLEBUF_USERS_LIMIT)
|
||||
queue_num = SEP_DOUBLEBUF_USERS_LIMIT;
|
||||
|
||||
|
||||
if (count < sizeof(queue_num)
|
||||
+ (queue_num * sizeof(struct sep_queue_data))) {
|
||||
spin_unlock_irqrestore(&sep->sep_queue_lock, lck_flags);
|
||||
@ -4060,7 +4023,6 @@ static int sep_register_driver_with_fs(struct sep_device *sep)
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*sep_probe - probe a matching PCI device
|
||||
*@pdev: pci_device
|
||||
@ -4351,7 +4313,6 @@ static int sep_pci_suspend(struct device *dev)
|
||||
*/
|
||||
static int sep_pm_runtime_resume(struct device *dev)
|
||||
{
|
||||
|
||||
u32 retval2;
|
||||
u32 delay_count;
|
||||
struct sep_device *sep = sep_dev;
|
||||
|
Loading…
Reference in New Issue
Block a user