public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 13/13] iwlagn: fix compile warning in iwl5000_gain_computation
Date: Fri,  2 Oct 2009 13:44:07 -0700	[thread overview]
Message-ID: <1254516247-4085-14-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1254516247-4085-1-git-send-email-reinette.chatre@intel.com>

From: Reinette Chatre <reinette.chatre@intel.com>

The return type of abs() was recently changed from int to long. With
min()'s type checking we thus need to make sure that values of the same
type are compared.

This fixes:

    CC [M]  drivers/net/wireless/iwlwifi/iwl-5000.o
drivers/net/wireless/iwlwifi/iwl-5000.c: In function ‘iwl5000_gain_computation’:
drivers/net/wireless/iwlwifi/iwl-5000.c:320: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reported-by: Marcel Holtmann <marcel@holtmann.org>
---
 drivers/net/wireless/iwlwifi/iwl-5000.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 98baf8a..8cc3d50 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -283,7 +283,7 @@ static void iwl5000_gain_computation(struct iwl_priv *priv,
 			(s32)average_noise[i])) / 1500;
 		/* bound gain by 2 bits value max, 3rd bit is sign */
 		data->delta_gain_code[i] =
-			min(abs(delta_g), CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
+			min(abs(delta_g), (long) CHAIN_NOISE_MAX_DELTA_GAIN_CODE);
 
 		if (delta_g < 0)
 			/* set negative sign */
-- 
1.5.6.3


      parent reply	other threads:[~2009-10-02 20:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02 20:43 [PATCH 0/13] iwlwifi driver updates 10/2/2009 Reinette Chatre
2009-10-02 20:43 ` [PATCH 01/13 v2.6.31, v2.6.32 and w-t] iwlwifi: incorrect method used for finding valid OTP blocks Reinette Chatre
2009-10-02 20:43 ` [PATCH 02/13] iwlwifi: fix EEPROM enhance tx power offset Reinette Chatre
2009-10-02 20:59   ` reinette chatre
2009-10-02 20:43 ` [PATCH 03/13] iwlwifi: fix compile warning Reinette Chatre
2009-10-02 20:43 ` [PATCH 04/13] iwlwifi: reliable entering of critical temperature state Reinette Chatre
2009-10-02 20:43 ` [PATCH 05/13] iwlwifi: change valid EEPROM version for 1000 series Reinette Chatre
2009-10-02 20:44 ` [PATCH 06/13] iwlwifi: clear the translate table area Reinette Chatre
2009-10-02 20:44 ` [PATCH 07/13] iwlwifi: set default aggregation frame count limit to 31 Reinette Chatre
2009-10-02 20:44 ` [PATCH 08/13] iwlwifi: device tracing Reinette Chatre
2009-10-06 14:48   ` Stanislaw Gruszka
2009-10-06 14:59     ` Johannes Berg
2009-10-02 20:44 ` [PATCH 09/13] iwlwifi: LED cleanup Reinette Chatre
2009-10-02 20:44 ` [PATCH 10/13] iwlwifi/iwl3945 : unify apm stop operation Reinette Chatre
2009-10-02 20:44 ` [PATCH 11/13] iwlwifi: replace iwl_poll_direct_bit with iwl_poll_bit for CSR access Reinette Chatre
2009-10-02 20:44 ` [PATCH 12/13] iwlwifi: validate the signature for EEPROM and OTP Reinette Chatre
2009-10-02 20:44 ` Reinette Chatre [this message]

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=1254516247-4085-14-git-send-email-reinette.chatre@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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