All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Bhumika Goyal <bhumirks@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 3/3] Staging: rdma: Remove wrapper sdma_start_hw_clean_up
Date: Thu, 25 Feb 2016 13:49:19 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.10.1602251348380.2708@hadrien> (raw)
In-Reply-To: <a065f9a17e7716720dbf0505dfdbfeaed90b234f.1456390351.git.bhumirks@gmail.com>

On Thu, 25 Feb 2016, Bhumika Goyal wrote:

> The function sdma_start_hw_clean_up can be replaced with direct call to
> tasklet_hi_schedule. So drop the function definition and prototype of
> sdma_start_hw_clean_up and replace the calls with tasklet_hi_schedule.
> Done using coccinelle:
>
> @@
> expression e;
> @@
> - sdma_start_hw_clean_up(e);
> + tasklet_hi_schedule(&sde->sdma_hw_clean_up_task);

I think that the metavariable should be called sde, not e.  You want to
propagate the argument from one call to the other.

julia

>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/rdma/hfi1/sdma.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c
> index 9a15f1f..d833a00 100644
> --- a/drivers/staging/rdma/hfi1/sdma.c
> +++ b/drivers/staging/rdma/hfi1/sdma.c
> @@ -235,7 +235,6 @@ static void sdma_get(struct sdma_state *);
>  static void sdma_hw_clean_up_task(unsigned long);
>  static void sdma_put(struct sdma_state *);
>  static void sdma_set_state(struct sdma_engine *, enum sdma_states);
> -static void sdma_start_hw_clean_up(struct sdma_engine *);
>  static void sdma_sw_clean_up_task(unsigned long);
>  static void sdma_sendctrl(struct sdma_engine *, unsigned);
>  static void init_sdma_regs(struct sdma_engine *, u32, uint);
> @@ -670,11 +669,6 @@ static void sdma_sw_tear_down(struct sdma_engine *sde)
>  	wake_up_interruptible(&sde->dd->sdma_unfreeze_wq);
>  }
>
> -static void sdma_start_hw_clean_up(struct sdma_engine *sde)
> -{
> -	tasklet_hi_schedule(&sde->sdma_hw_clean_up_task);
> -}
> -
>  static void sdma_set_state(struct sdma_engine *sde,
>  	enum sdma_states next_state)
>  {
> @@ -2293,7 +2287,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
>  		case sdma_event_e15_hw_halt_done:
>  			sdma_set_state(sde,
>  				sdma_state_s15_hw_start_up_clean_wait);
> -			sdma_start_hw_clean_up(sde);
> +			tasklet_hi_schedule(&sde->sdma_hw_clean_up_task);
>  			break;
>  		case sdma_event_e25_hw_clean_up_done:
>  			break;
> @@ -2422,7 +2416,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
>  			break;
>  		case sdma_event_e40_sw_cleaned:
>  			sdma_set_state(sde, sdma_state_s40_hw_clean_up_wait);
> -			sdma_start_hw_clean_up(sde);
> +			tasklet_hi_schedule(&sde->sdma_hw_clean_up_task);
>  			break;
>  		case sdma_event_e50_hw_cleaned:
>  			break;
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/a065f9a17e7716720dbf0505dfdbfeaed90b234f.1456390351.git.bhumirks%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


  reply	other threads:[~2016-02-25 12:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 11:55 [PATCH 0/3] Staging: rdma: Remove wrapper functions Bhumika Goyal
2016-02-25 11:55 ` [PATCH 1/3] Staging: rdma: Remove wrapper function add_rcvctrl Bhumika Goyal
2016-02-25 11:55 ` [PATCH 2/3] Staging: rdma: Remove wrapper clear_rcvctrl Bhumika Goyal
2016-02-25 11:55 ` [PATCH 3/3] Staging: rdma: Remove wrapper sdma_start_hw_clean_up Bhumika Goyal
2016-02-25 12:49   ` Julia Lawall [this message]
2016-02-25 14:19 ` [Outreachy kernel] [PATCH 0/3] Staging: rdma: Remove wrapper functions Arnd Bergmann
2016-02-25 14:28   ` Bhumika Goyal

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=alpine.DEB.2.10.1602251348380.2708@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=bhumirks@gmail.com \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.