Commit 5a2c3ebe authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman

staging: gasket: remove redundant pointer bar_data

Pointer bar_data is being assigned but is never used hence it is redundant
and can be removed.

Cleans up clang warning:
warning: variable 'bar_data' set but not used [-Wunused-but-set-variable]
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c8332236
...@@ -1610,7 +1610,6 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma) ...@@ -1610,7 +1610,6 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma)
bool is_coherent_region; bool is_coherent_region;
const struct gasket_driver_desc *driver_desc; const struct gasket_driver_desc *driver_desc;
struct gasket_dev *gasket_dev = (struct gasket_dev *)filp->private_data; struct gasket_dev *gasket_dev = (struct gasket_dev *)filp->private_data;
struct gasket_bar_data *bar_data;
const struct gasket_bar_desc *bar_desc; const struct gasket_bar_desc *bar_desc;
struct gasket_mappable_region *map_regions = NULL; struct gasket_mappable_region *map_regions = NULL;
int num_map_regions = 0; int num_map_regions = 0;
...@@ -1673,8 +1672,6 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma) ...@@ -1673,8 +1672,6 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma)
* Subtract the base of the bar from the raw offset to get the * Subtract the base of the bar from the raw offset to get the
* memory location within the bar to map. * memory location within the bar to map.
*/ */
bar_data = &gasket_dev->bar_data[bar_index];
bar_desc = &driver_desc->bar_descriptions[bar_index]; bar_desc = &driver_desc->bar_descriptions[bar_index];
permissions = bar_desc->permissions; permissions = bar_desc->permissions;
if (!gasket_mmap_has_permissions(gasket_dev, vma, permissions)) { if (!gasket_mmap_has_permissions(gasket_dev, vma, permissions)) {
......
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