Re: [PATCH 1/5] ti: Convert wl1271_ logging macros to dev_ or pr_

2016-04-26 Thread Kalle Valo
Joe Perches  writes:

> Use the more common logging mechanism passing wl->dev where
> appropriate.  Remove the macros.  Add argument struct wl1271 *wl to
> some functions to make these logging mechanisms work.
>
> Miscellanea:
>
> o Coalesce formats, add required trailing \n to formats
>   Some formats already had previously incorrect \n uses
> o Realign arguments
> o Correct a couple typos and grammar defects
> o Split a multiple line error message to multiple calls of dev_err
> o Add #define pr_fmt when pr_ is used
> o Remove unnecessary/duplicate pr_fmt use from wl1271_debug macro
>
> Signed-off-by: Joe Perches 

Doesn't apply anymore:

Applying: ti: Convert wl1271_ logging macros to dev_ or pr_
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/wireless/ti/wlcore/wlcore_i.h
Auto-merging drivers/net/wireless/ti/wlcore/tx.c
Auto-merging drivers/net/wireless/ti/wlcore/scan.c
Auto-merging drivers/net/wireless/ti/wlcore/rx.c
Auto-merging drivers/net/wireless/ti/wlcore/ps.c
Auto-merging drivers/net/wireless/ti/wlcore/main.c
Auto-merging drivers/net/wireless/ti/wlcore/cmd.c
CONFLICT (content): Merge conflict in drivers/net/wireless/ti/wlcore/cmd.c
Auto-merging drivers/net/wireless/ti/wl18xx/tx.c
Auto-merging drivers/net/wireless/ti/wl18xx/scan.c
Auto-merging drivers/net/wireless/ti/wl18xx/main.c
Auto-merging drivers/net/wireless/ti/wl18xx/event.c
Auto-merging drivers/net/wireless/ti/wl18xx/debugfs.c
Auto-merging drivers/net/wireless/ti/wl18xx/cmd.c
Auto-merging drivers/net/wireless/ti/wl12xx/scan.c
Auto-merging drivers/net/wireless/ti/wl12xx/main.c
Failed to merge in the changes.

-- 
Kalle Valo


[PATCH 1/5] ti: Convert wl1271_ logging macros to dev_ or pr_

2016-03-07 Thread Joe Perches
Use the more common logging mechanism passing wl->dev where
appropriate.  Remove the macros.  Add argument struct wl1271 *wl to
some functions to make these logging mechanisms work.

Miscellanea:

o Coalesce formats, add required trailing \n to formats
  Some formats already had previously incorrect \n uses
o Realign arguments
o Correct a couple typos and grammar defects
o Split a multiple line error message to multiple calls of dev_err
o Add #define pr_fmt when pr_ is used
o Remove unnecessary/duplicate pr_fmt use from wl1271_debug macro

Signed-off-by: Joe Perches 
---
 drivers/net/wireless/ti/wl12xx/acx.c  |   2 +-
 drivers/net/wireless/ti/wl12xx/cmd.c  |  20 +--
 drivers/net/wireless/ti/wl12xx/main.c |  34 ++--
 drivers/net/wireless/ti/wl12xx/scan.c |  24 +--
 drivers/net/wireless/ti/wl18xx/acx.c  |  25 +--
 drivers/net/wireless/ti/wl18xx/cmd.c  |  20 +--
 drivers/net/wireless/ti/wl18xx/debugfs.c  |   2 +-
 drivers/net/wireless/ti/wl18xx/event.c|   8 +-
 drivers/net/wireless/ti/wl18xx/main.c |  50 +++---
 drivers/net/wireless/ti/wl18xx/scan.c |  16 +-
 drivers/net/wireless/ti/wl18xx/tx.c   |   8 +-
 drivers/net/wireless/ti/wlcore/acx.c  | 132 
 drivers/net/wireless/ti/wlcore/boot.c |  45 +++---
 drivers/net/wireless/ti/wlcore/cmd.c  | 103 +++--
 drivers/net/wireless/ti/wlcore/debug.h|  14 +-
 drivers/net/wireless/ti/wlcore/debugfs.c  |  54 +++
 drivers/net/wireless/ti/wlcore/event.c|  14 +-
 drivers/net/wireless/ti/wlcore/main.c | 248 --
 drivers/net/wireless/ti/wlcore/ps.c   |  15 +-
 drivers/net/wireless/ti/wlcore/rx.c   |  26 ++--
 drivers/net/wireless/ti/wlcore/scan.c |   4 +-
 drivers/net/wireless/ti/wlcore/sysfs.c|   8 +-
 drivers/net/wireless/ti/wlcore/testmode.c |  14 +-
 drivers/net/wireless/ti/wlcore/tx.c   |  14 +-
 drivers/net/wireless/ti/wlcore/wlcore_i.h |   3 -
 25 files changed, 464 insertions(+), 439 deletions(-)

diff --git a/drivers/net/wireless/ti/wl12xx/acx.c 
b/drivers/net/wireless/ti/wl12xx/acx.c
index bea06b2..4a11158 100644
--- a/drivers/net/wireless/ti/wl12xx/acx.c
+++ b/drivers/net/wireless/ti/wl12xx/acx.c
@@ -42,7 +42,7 @@ int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 
host_cfg_bitmap)
ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP,
   bitmap_conf, sizeof(*bitmap_conf));
if (ret < 0) {
-   wl1271_warning("wl1271 bitmap config opt failed: %d", ret);
+   dev_warn(wl->dev, "wl1271 bitmap config opt failed: %d\n", ret);
goto out;
}
 
diff --git a/drivers/net/wireless/ti/wl12xx/cmd.c 
b/drivers/net/wireless/ti/wl12xx/cmd.c
index 7485dba..8f358d3 100644
--- a/drivers/net/wireless/ti/wl12xx/cmd.c
+++ b/drivers/net/wireless/ti/wl12xx/cmd.c
@@ -54,7 +54,7 @@ int wl1271_cmd_ext_radio_parms(struct wl1271 *wl)
 
ret = wl1271_cmd_test(wl, ext_radio_parms, sizeof(*ext_radio_parms), 0);
if (ret < 0)
-   wl1271_warning("TEST_CMD_INI_FILE_RF_EXTENDED_PARAM failed");
+   dev_warn(wl->dev, "TEST_CMD_INI_FILE_RF_EXTENDED_PARAM 
failed\n");
 
kfree(ext_radio_parms);
return ret;
@@ -73,7 +73,7 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
return -ENODEV;
 
if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
-   wl1271_warning("FEM index from INI out of bounds");
+   dev_warn(wl->dev, "FEM index from INI out of bounds\n");
return -EINVAL;
}
 
@@ -97,7 +97,7 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
 
ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer);
if (ret < 0) {
-   wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed");
+   dev_warn(wl->dev, "CMD_INI_FILE_GENERAL_PARAM failed\n");
goto out;
}
 
@@ -105,7 +105,7 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
gen_parms->general_params.tx_bip_fem_manufacturer;
 
if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
-   wl1271_warning("FEM index from FW out of bounds");
+   dev_warn(wl->dev, "FEM index from FW out of bounds\n");
ret = -EINVAL;
goto out;
}
@@ -140,7 +140,7 @@ int wl128x_cmd_general_parms(struct wl1271 *wl)
return -ENODEV;
 
if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
-   wl1271_warning("FEM index from ini out of bounds");
+   dev_warn(wl->dev, "FEM index from ini out of bounds\n");
return -EINVAL;
}
 
@@ -165,7 +165,7 @@ int wl128x_cmd_general_parms(struct wl1271 *wl)
 
ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer);
if (ret < 0) {
-   wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed");
+   dev_warn(wl-