Commit bc0c9da5 authored by LABBE Corentin's avatar LABBE Corentin Committed by Greg Kroah-Hartman

staging: sep: Fix blank lines issue reported by checkpatch

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