linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Todd Poynor <toddpoynor@gmail.com>
Cc: Rob Springer <rspringer@google.com>,
	John Joseph <jnjoseph@google.com>,
	Ben Chan <benchan@chromium.org>,
	devel@driverdev.osuosl.org, Zhongze Hu <frankhu@chromium.org>,
	linux-kernel@vger.kernel.org, Simon Que <sque@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Todd Poynor <toddpoynor@google.com>,
	Dmitry Torokhov <dtor@chromium.org>
Subject: Re: [PATCH 02/20] staging: gasket: gasket_enable_dev remove unnecessary variable
Date: Sat, 21 Jul 2018 08:48:17 +0200	[thread overview]
Message-ID: <20180721064817.GA4771@kroah.com> (raw)
In-Reply-To: <20180720034920.77320-3-toddpoynor@gmail.com>

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

  reply	other threads:[~2018-07-21  6:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20  3:49 [PATCH 00/20 v4] staging: gasket: sundry fixes and fixups Todd Poynor
2018-07-20  3:49 ` [PATCH 01/20] staging: gasket: allow compile for ARM64 in Kconfig Todd Poynor
2018-07-20  3:49 ` [PATCH 02/20] staging: gasket: gasket_enable_dev remove unnecessary variable Todd Poynor
2018-07-21  6:48   ` Greg Kroah-Hartman [this message]
2018-07-20  3:49 ` [PATCH 03/20] staging: gasket: remove code for no physical device Todd Poynor
2018-07-20  3:49 ` [PATCH 04/20] staging: gasket: fix class create bug handling Todd Poynor
2018-07-20  3:49 ` [PATCH 05/20] staging: gasket: remove unnecessary code in coherent allocator Todd Poynor
2018-07-20  3:49 ` [PATCH 06/20] staging: gasket: don't treat no device reset callback as an error Todd Poynor
2018-07-20  3:49 ` [PATCH 07/20] staging: gasket: gasket_mmap return error instead of valid BAR index Todd Poynor
2018-07-20  3:49 ` [PATCH 08/20] staging: gasket: apex_clock_gating simplify logic, reduce indentation Todd Poynor
2018-07-20  3:49 ` [PATCH 09/20] staging: gasket: gasket page table functions use bool return type Todd Poynor
2018-07-20  3:49 ` [PATCH 10/20] staging: gasket: remove else clause after return in if clause Todd Poynor
2018-07-20  3:49 ` [PATCH 11/20] staging: gasket: fix comment syntax in apex.h Todd Poynor
2018-07-20  3:49 ` [PATCH 12/20] staging: gasket: remove unnecessary parens in page table code Todd Poynor
2018-07-20  3:49 ` [PATCH 13/20] staging: gasket: gasket_mmap use PAGE_MASK Todd Poynor
2018-07-20  3:49 ` [PATCH 14/20] staging: gasket: remove extra parens in gasket_write_mappable_regions Todd Poynor
2018-07-20  3:49 ` [PATCH 15/20] staging: gasket: fix multi-line comment syntax in gasket_core.h Todd Poynor
2018-07-20  3:49 ` [PATCH 16/20] staging: gasket: always allow root open for write Todd Poynor
2018-07-20  3:49 ` [PATCH 17/20] staging: gasket: top ioctl handler add __user annotations Todd Poynor
2018-07-20  3:49 ` [PATCH 18/20] staging: gasket: apex ioctl " Todd Poynor
2018-07-20  3:49 ` [PATCH 19/20] staging: gasket: common ioctl dispatcher " Todd Poynor
2018-07-20  3:49 ` [PATCH 20/20] staging: gasket: common ioctls " Todd Poynor
2018-07-21  6:51 ` [PATCH 00/20 v4] staging: gasket: sundry fixes and fixups Greg Kroah-Hartman
2018-07-21 12:56 [PATCH 00/14] staging: gasket: assorted cleanups Todd Poynor
2018-07-21 12:56 ` [PATCH 02/20] staging: gasket: gasket_enable_dev remove unnecessary variable Todd Poynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180721064817.GA4771@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=benchan@chromium.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=dtor@chromium.org \
    --cc=frankhu@chromium.org \
    --cc=groeck@chromium.org \
    --cc=jnjoseph@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rspringer@google.com \
    --cc=sque@chromium.org \
    --cc=toddpoynor@gmail.com \
    --cc=toddpoynor@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).