* [PATCH 1/1] iwlwifi: fix printk newlines
@ 2008-08-11 21:49 Jiri Slaby
2008-08-12 0:55 ` Marcel Holtmann
2008-08-12 1:20 ` Zhu Yi
0 siblings, 2 replies; 7+ messages in thread
From: Jiri Slaby @ 2008-08-11 21:49 UTC (permalink / raw)
To: linville
Cc: linux-wireless, ipw3945-devel, linux-kernel, Jiri Slaby, Zhu Yi,
Reinette Chatre
Add newlines at printk outputs to not break dmesg.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-eeprom.c | 6 +++---
drivers/net/wireless/iwlwifi/iwl-sta.c | 4 ++--
drivers/net/wireless/iwlwifi/iwl-tx.c | 4 ++--
drivers/net/wireless/iwlwifi/iwl3945-base.c | 6 +++---
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 22bb269..4a0cc78 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -967,7 +967,7 @@ static int iwl4965_interpolate_chan(struct iwl_priv *priv, u32 channel,
s = iwl4965_get_sub_band(priv, channel);
if (s >= EEPROM_TX_POWER_BANDS) {
- IWL_ERROR("Tx Power can not find channel %d ", channel);
+ IWL_ERROR("Tx Power can not find channel %d\n", channel);
return -1;
}
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
index bce5383..19985bf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
@@ -146,7 +146,7 @@ int iwlcore_eeprom_verify_signature(struct iwl_priv *priv)
{
u32 gp = iwl_read32(priv, CSR_EEPROM_GP);
if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) {
- IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp);
+ IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);
return -ENOENT;
}
return 0;
@@ -227,7 +227,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
ret = priv->cfg->ops->lib->eeprom_ops.verify_signature(priv);
if (ret < 0) {
- IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp);
+ IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);
ret = -ENOENT;
goto err;
}
@@ -254,7 +254,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
}
if (!(r & CSR_EEPROM_REG_READ_VALID_MSK)) {
- IWL_ERROR("Time out reading EEPROM[%d]", addr);
+ IWL_ERROR("Time out reading EEPROM[%d]\n", addr);
ret = -ETIMEDOUT;
goto done;
}
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 60a6e01..6283a3a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -207,7 +207,7 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index,
case WLAN_HT_CAP_MIMO_PS_DISABLED:
break;
default:
- IWL_WARNING("Invalid MIMO PS mode %d", mimo_ps_mode);
+ IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode);
break;
}
@@ -969,7 +969,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
return priv->hw_params.bcast_sta_id;
default:
- IWL_WARNING("Unknown mode of operation: %d", priv->iw_mode);
+ IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode);
return priv->hw_params.bcast_sta_id;
}
}
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 4108c7c..d82823b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -493,7 +493,7 @@ int iwl_txq_ctx_reset(struct iwl_priv *priv)
/* Alloc keep-warm buffer */
ret = iwl_kw_alloc(priv);
if (ret) {
- IWL_ERROR("Keep Warm allocation failed");
+ IWL_ERROR("Keep Warm allocation failed\n");
goto error_kw;
}
spin_lock_irqsave(&priv->lock, flags);
@@ -1463,7 +1463,7 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn);
if (scd_flow >= priv->hw_params.max_txq_num) {
- IWL_ERROR("BUG_ON scd_flow is bigger than number of queues");
+ IWL_ERROR("BUG_ON scd_flow is bigger than number of queues\n");
return;
}
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 444847a..348048a 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1558,7 +1558,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv)
BUILD_BUG_ON(sizeof(priv->eeprom) != IWL_EEPROM_IMAGE_SIZE);
if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) {
- IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp);
+ IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);
return -ENOENT;
}
@@ -1583,7 +1583,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv)
}
if (!(r & CSR_EEPROM_REG_READ_VALID_MSK)) {
- IWL_ERROR("Time out reading EEPROM[%d]", addr);
+ IWL_ERROR("Time out reading EEPROM[%d]\n", addr);
return -ETIMEDOUT;
}
e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16));
@@ -2507,7 +2507,7 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h
return priv->hw_setting.bcast_sta_id;
default:
- IWL_WARNING("Unknown mode of operation: %d", priv->iw_mode);
+ IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode);
return priv->hw_setting.bcast_sta_id;
}
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/1] iwlwifi: fix printk newlines
2008-08-11 21:49 [PATCH 1/1] iwlwifi: fix printk newlines Jiri Slaby
@ 2008-08-12 0:55 ` Marcel Holtmann
2008-08-12 1:22 ` [ipw3945-devel] " Zhu Yi
2008-08-12 1:20 ` Zhu Yi
1 sibling, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2008-08-12 0:55 UTC (permalink / raw)
To: Jiri Slaby
Cc: linville, linux-wireless, ipw3945-devel, linux-kernel, Zhu Yi,
Reinette Chatre
Hi Jiri,
> Add newlines at printk outputs to not break dmesg.
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
> Cc: Zhu Yi <yi.zhu@intel.com>
> Cc: Reinette Chatre <reinette.chatre@intel.com>
> Cc: John W. Linville <linville@tuxdriver.com>
> ---
> drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
> drivers/net/wireless/iwlwifi/iwl-eeprom.c | 6 +++---
> drivers/net/wireless/iwlwifi/iwl-sta.c | 4 ++--
> drivers/net/wireless/iwlwifi/iwl-tx.c | 4 ++--
> drivers/net/wireless/iwlwifi/iwl3945-base.c | 6 +++---
> 5 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
> index 22bb269..4a0cc78 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-4965.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
> @@ -967,7 +967,7 @@ static int iwl4965_interpolate_chan(struct iwl_priv *priv, u32 channel,
>
> s = iwl4965_get_sub_band(priv, channel);
> if (s >= EEPROM_TX_POWER_BANDS) {
> - IWL_ERROR("Tx Power can not find channel %d ", channel);
> + IWL_ERROR("Tx Power can not find channel %d\n", channel);
> return -1;
> }
can we not just fix IWL_ERROR to always append the newline?
Regards
Marcel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [ipw3945-devel] [PATCH 1/1] iwlwifi: fix printk newlines
2008-08-12 0:55 ` Marcel Holtmann
@ 2008-08-12 1:22 ` Zhu Yi
2008-08-12 3:59 ` Marcel Holtmann
0 siblings, 1 reply; 7+ messages in thread
From: Zhu Yi @ 2008-08-12 1:22 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Jiri Slaby, ipw3945-devel, linux-wireless, linux-kernel,
Reinette Chatre
On Tue, 2008-08-12 at 02:55 +0200, Marcel Holtmann wrote:
> > s = iwl4965_get_sub_band(priv, channel);
> > if (s >= EEPROM_TX_POWER_BANDS) {
> > - IWL_ERROR("Tx Power can not find channel %d ",
> channel);
> > + IWL_ERROR("Tx Power can not find channel %d\n",
> channel);
> > return -1;
> > }
>
> can we not just fix IWL_ERROR to always append the newline?
We should give the users more control to the style I think.
Thanks,
-yi
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [ipw3945-devel] [PATCH 1/1] iwlwifi: fix printk newlines
2008-08-12 1:22 ` [ipw3945-devel] " Zhu Yi
@ 2008-08-12 3:59 ` Marcel Holtmann
2008-08-12 5:38 ` Zhu Yi
0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2008-08-12 3:59 UTC (permalink / raw)
To: Zhu Yi
Cc: Jiri Slaby, ipw3945-devel, linux-wireless, linux-kernel,
Reinette Chatre
Hi Yi,
> > > s = iwl4965_get_sub_band(priv, channel);
> > > if (s >= EEPROM_TX_POWER_BANDS) {
> > > - IWL_ERROR("Tx Power can not find channel %d ",
> > channel);
> > > + IWL_ERROR("Tx Power can not find channel %d\n",
> > channel);
> > > return -1;
> > > }
> >
> > can we not just fix IWL_ERROR to always append the newline?
>
> We should give the users more control to the style I think.
what kind of control do you expect? If you need two lines of debug or
error output, call IWL_ERROR twice. This will also result in the
KERN_ERR is set and not forgotten since that has to follow the newline.
Regards
Marcel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [ipw3945-devel] [PATCH 1/1] iwlwifi: fix printk newlines
2008-08-12 3:59 ` Marcel Holtmann
@ 2008-08-12 5:38 ` Zhu Yi
2008-08-12 6:11 ` Marcel Holtmann
0 siblings, 1 reply; 7+ messages in thread
From: Zhu Yi @ 2008-08-12 5:38 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Jiri Slaby, ipw3945-devel, linux-wireless, linux-kernel,
Reinette Chatre
On Tue, 2008-08-12 at 05:59 +0200, Marcel Holtmann wrote:
> > We should give the users more control to the style I think.
>
> what kind of control do you expect? If you need two lines of debug or
> error output, call IWL_ERROR twice. This will also result in the
> KERN_ERR is set and not forgotten since that has to follow the
> newline.
I thought sometimes we might not need a new line between two IWL_ERRORs.
But your KERN_ERR garbaging the output in this case is correct. I think
when we wrote the macro, we just follow the style of dev_info() ...
dev_emerg() macros. Do you know why there is not a new line for them by
default?
Thanks,
-yi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ipw3945-devel] [PATCH 1/1] iwlwifi: fix printk newlines
2008-08-12 5:38 ` Zhu Yi
@ 2008-08-12 6:11 ` Marcel Holtmann
0 siblings, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2008-08-12 6:11 UTC (permalink / raw)
To: Zhu Yi
Cc: Jiri Slaby, ipw3945-devel, linux-wireless, linux-kernel,
Reinette Chatre
Hi Yi,
> > > We should give the users more control to the style I think.
> >
> > what kind of control do you expect? If you need two lines of debug or
> > error output, call IWL_ERROR twice. This will also result in the
> > KERN_ERR is set and not forgotten since that has to follow the
> > newline.
>
> I thought sometimes we might not need a new line between two IWL_ERRORs.
> But your KERN_ERR garbaging the output in this case is correct. I think
> when we wrote the macro, we just follow the style of dev_info() ...
> dev_emerg() macros. Do you know why there is not a new line for them by
> default?
I have no idea. Maybe because they are close to printk. I always put the
newline into my macros.
Regards
Marcel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] iwlwifi: fix printk newlines
2008-08-11 21:49 [PATCH 1/1] iwlwifi: fix printk newlines Jiri Slaby
2008-08-12 0:55 ` Marcel Holtmann
@ 2008-08-12 1:20 ` Zhu Yi
1 sibling, 0 replies; 7+ messages in thread
From: Zhu Yi @ 2008-08-12 1:20 UTC (permalink / raw)
To: Jiri Slaby
Cc: linville, linux-wireless, ipw3945-devel, linux-kernel,
Reinette Chatre
On Mon, 2008-08-11 at 23:49 +0200, Jiri Slaby wrote:
> Add newlines at printk outputs to not break dmesg.
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
> Cc: Zhu Yi <yi.zhu@intel.com>
> Cc: Reinette Chatre <reinette.chatre@intel.com>
> Cc: John W. Linville <linville@tuxdriver.com>
Ack.
Thanks,
-yi
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-08-12 6:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-11 21:49 [PATCH 1/1] iwlwifi: fix printk newlines Jiri Slaby
2008-08-12 0:55 ` Marcel Holtmann
2008-08-12 1:22 ` [ipw3945-devel] " Zhu Yi
2008-08-12 3:59 ` Marcel Holtmann
2008-08-12 5:38 ` Zhu Yi
2008-08-12 6:11 ` Marcel Holtmann
2008-08-12 1:20 ` Zhu Yi
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).