* [PATCH] iwlwifi: Remove unnecessary code in iwl3945 and iwl4965 drivers
@ 2007-11-10 19:49 Miguel Botón
2007-11-12 1:08 ` Zhu Yi
2007-11-15 21:31 ` [PATCH] iwlwifi: remove redundant initialization of final_mode John W. Linville
0 siblings, 2 replies; 4+ messages in thread
From: Miguel Botón @ 2007-11-10 19:49 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: linux-wireless
Remove unnecesary code in iwl3945 and iwl4965 drivers.
"final_mode" variable is already initialized with the value of the "mod=
e" variable.
Signed-off-by: Miguel Boton <mboton@gmail.com>
Index: linux-2.6.24-rc2/drivers/net/wireless/iwlwifi/iwl3945-base.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- linux-2.6.24-rc2.orig/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ linux-2.6.24-rc2/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2377,9 +2377,6 @@
case IWL_POWER_AC:
final_mode =3D IWL_POWER_MODE_CAM;
break;
- default:
- final_mode =3D mode;
- break;
}
=20
iwl_update_power_cmd(priv, &cmd, final_mode);
Index: linux-2.6.24-rc2/drivers/net/wireless/iwlwifi/iwl4965-base.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- linux-2.6.24-rc2.orig/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ linux-2.6.24-rc2/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -2233,9 +2233,6 @@
case IWL_POWER_AC:
final_mode =3D IWL_POWER_MODE_CAM;
break;
- default:
- final_mode =3D mode;
- break;
}
=20
cmd.keep_alive_beacons =3D 0;
--=20
Miguel Bot=F3n
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iwlwifi: Remove unnecessary code in iwl3945 and iwl4965 drivers
2007-11-10 19:49 [PATCH] iwlwifi: Remove unnecessary code in iwl3945 and iwl4965 drivers Miguel Botón
@ 2007-11-12 1:08 ` Zhu Yi
2007-11-15 21:31 ` John W. Linville
2007-11-15 21:31 ` [PATCH] iwlwifi: remove redundant initialization of final_mode John W. Linville
1 sibling, 1 reply; 4+ messages in thread
From: Zhu Yi @ 2007-11-12 1:08 UTC (permalink / raw)
To: Miguel Botón, John W.Linville
Cc: Linux Kernel Mailing List, linux-wireless
On Sat, 2007-11-10 at 20:49 +0100, Miguel Bot=A8=AEn wrote:
> Remove unnecesary code in iwl3945 and iwl4965 drivers.
>=20
> "final_mode" variable is already initialized with the value of the
> "mode" variable.
>=20
> Signed-off-by: Miguel Boton <mboton@gmail.com>
ACK. Or you can do "u32 uninitialized_var(final_mode);". Both are OK
with me.
Thanks,
-yi
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iwlwifi: Remove unnecessary code in iwl3945 and iwl4965 drivers
2007-11-12 1:08 ` Zhu Yi
@ 2007-11-15 21:31 ` John W. Linville
0 siblings, 0 replies; 4+ messages in thread
From: John W. Linville @ 2007-11-15 21:31 UTC (permalink / raw)
To: Zhu Yi; +Cc: Miguel Botón, Linux Kernel Mailing List, linux-wireless
On Mon, Nov 12, 2007 at 09:08:10AM +0800, Zhu Yi wrote:
>=20
> On Sat, 2007-11-10 at 20:49 +0100, Miguel Bot=F3n wrote:
> > Remove unnecesary code in iwl3945 and iwl4965 drivers.
> >=20
> > "final_mode" variable is already initialized with the value of the
> > "mode" variable.
> >=20
> > Signed-off-by: Miguel Boton <mboton@gmail.com>
>=20
> ACK. Or you can do "u32 uninitialized_var(final_mode);". Both are OK
> with me.
I think I like this alternative better...
--=20
John W. Linville
linville@tuxdriver.com
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] iwlwifi: remove redundant initialization of final_mode
2007-11-10 19:49 [PATCH] iwlwifi: Remove unnecessary code in iwl3945 and iwl4965 drivers Miguel Botón
2007-11-12 1:08 ` Zhu Yi
@ 2007-11-15 21:31 ` John W. Linville
1 sibling, 0 replies; 4+ messages in thread
From: John W. Linville @ 2007-11-15 21:31 UTC (permalink / raw)
To: linux-wireless; +Cc: linux-kernel, John W. Linville, Miguel Botón, Zhu Yi
Problem identified by Miguel Bot=C3=B3n <mboton.lkml@gmail.com>, altern=
ate
solution suggested by Zhu Yi <yi.zhu@intel.com>, patch by me. :-)
Cc: Miguel Bot=C3=B3n <mboton.lkml@gmail.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +-
drivers/net/wireless/iwlwifi/iwl4965-base.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/=
wireless/iwlwifi/iwl3945-base.c
index e2cbd9e..15937c0 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2139,7 +2139,7 @@ static int iwl3945_update_power_cmd(struct iwl394=
5_priv *priv,
=20
static int iwl3945_send_power_mode(struct iwl3945_priv *priv, u32 mode=
)
{
- u32 final_mode =3D mode;
+ u32 uninitialized_var(final_mode);
int rc;
struct iwl3945_powertable_cmd cmd;
=20
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/=
wireless/iwlwifi/iwl4965-base.c
index ef17a98..30acd13 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -2218,7 +2218,7 @@ static int iwl4965_update_power_cmd(struct iwl496=
5_priv *priv,
=20
static int iwl4965_send_power_mode(struct iwl4965_priv *priv, u32 mode=
)
{
- u32 final_mode =3D mode;
+ u32 uninitialized_var(final_mode);
int rc;
struct iwl4965_powertable_cmd cmd;
=20
--=20
1.5.3.3
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-15 21:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-10 19:49 [PATCH] iwlwifi: Remove unnecessary code in iwl3945 and iwl4965 drivers Miguel Botón
2007-11-12 1:08 ` Zhu Yi
2007-11-15 21:31 ` John W. Linville
2007-11-15 21:31 ` [PATCH] iwlwifi: remove redundant initialization of final_mode John W. Linville
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).