lkml.org 
[lkml]   [2018]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/20] staging: gasket: gasket_enable_dev remove unnecessary variable
On Thu, Jul 19, 2018 at 08:49:02PM -0700, Todd Poynor wrote:
> From: Todd Poynor <toddpoynor@google.com>
>
> Remove unnecessary variable, pass constant param instead.
>
> Reported-by: Dmitry Torokhov <dtor@chromium.org>
> Signed-off-by: Zhongze Hu <frankhu@chromium.org>
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> ---
> drivers/staging/gasket/gasket_core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
> index 0d5ba7359af73..f327c9d7f90a3 100644
> --- a/drivers/staging/gasket/gasket_core.c
> +++ b/drivers/staging/gasket/gasket_core.c
> @@ -898,7 +898,6 @@ static int gasket_enable_dev(
> {
> int tbl_idx;
> int ret;
> - bool has_dma_ops;
> struct device *ddev;
> const struct gasket_driver_desc *driver_desc =
> internal_desc->driver_desc;
> @@ -917,8 +916,6 @@ static int gasket_enable_dev(
> return ret;
> }
>
> - has_dma_ops = true;
> -
> for (tbl_idx = 0; tbl_idx < driver_desc->num_page_tables; tbl_idx++) {
> gasket_log_debug(
> gasket_dev, "Initializing page table %d.", tbl_idx);
> @@ -936,7 +933,7 @@ static int gasket_enable_dev(
> &gasket_dev->bar_data[
> driver_desc->page_table_bar_index],
> &driver_desc->page_table_configs[tbl_idx],
> - ddev, gasket_dev->pci_dev, has_dma_ops);
> + ddev, gasket_dev->pci_dev, true);

As the only call for this function now hard-codes this last parameter,
perhaps that parameter should just be removed now?

Something for a later patch.

thanks,

greg k-h

\
 
 \ /
  Last update: 2018-07-21 08:49    [W:0.134 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site