All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH] ath10k: use config_enabled() for CONFIG_PM_SLEEP
Date: Tue, 23 Apr 2013 10:25:39 +0300	[thread overview]
Message-ID: <87li89g13g.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1366633644-23023-1-git-send-email-bartosz.markowski@tieto.com> (Bartosz Markowski's message of "Mon, 22 Apr 2013 14:27:24 +0200")

Bartosz Markowski <bartosz.markowski@tieto.com> writes:

> Make use of config_enabled() check insted of raw #ifdef's
> within function bodies when checking CONFIG_PM_SLEEP option.
>
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>

[...]

> @@ -72,10 +72,10 @@ static void ath10k_send_suspend_complete(struct ath10k *ar)
>  {
>  	ath10k_dbg(ATH10K_DBG_CORE, "%s\n", __func__);
>  
> -#if defined(CONFIG_PM_SLEEP)
> -	ar->is_target_paused = true;
> -	wake_up(&ar->event_queue);
> -#endif
> +	if(config_enabled(CONFIG_PM_SLEEP)) {
> +		ar->is_target_paused = true;
> +		wake_up(&ar->event_queue);
> +	}

[...]

> @@ -468,9 +468,9 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev,
>  	INIT_WORK(&ar->offchan_tx_work, ath10k_offchan_tx_work);
>  	skb_queue_head_init(&ar->offchan_tx_queue);
>  
> -#if defined(CONFIG_PM_SLEEP)
> -	init_waitqueue_head(&ar->event_queue);
> -#endif
> +	if (config_enabled(CONFIG_PM_SLEEP))
> +		init_waitqueue_head(&ar->event_queue);
> +

Do we really need config_enabled() here? To keep things simple what if
we just remove the ifdefs and let that code run even if CONFIG_PM_SLEEP
is disabled?

The overhead from init_waitqueue_head() is meaningless and I doubt the
wake_up() call makes any pratical difference either.

Thoughts?

-- 
Kalle Valo

  reply	other threads:[~2013-04-23  7:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 12:27 [ath9k-devel] [PATCH] ath10k: use config_enabled() for CONFIG_PM_SLEEP Bartosz Markowski
2013-04-23  7:25 ` Kalle Valo [this message]
2013-04-23  7:28   ` Markowski Bartosz

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=87li89g13g.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath9k-devel@lists.ath9k.org \
    /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.