Replaced Function name in debug print with %s..., __func__
PATCH 1/1 Replaced Function name in debug print with %s..., __func__
--- drivers/staging/rts5208/ms.c | 5 +++-- drivers/staging/rts5208/rtsx.c | 4 ++-- drivers/staging/rts5208/rtsx_chip.c | 4 ++-- drivers/staging/rts5208/sd.c | 27 +++++++++++++++------------ drivers/staging/rts5208/spi.c | 7 ++++--- drivers/staging/rts5208/xd.c | 15 ++++++++------- 6 files changed, 34 insertions(+), 28 deletions(-)
drivers/staging/rts5208/ms.c +3 -2
@@ -3064,7 +3064,8 @@ static int mspro_rw_multi_sector(struct scsi_cmnd *srb,if (detect_card_cd (chip,MS_CARD ) !=STATUS_SUCCESS ) { chip->rw_need_retry =0 ; -dev_dbg (rtsx_dev (chip),"No card exist, exit mspro_rw_multi_sector\n" ); +dev_dbg (rtsx_dev (chip),"No card exist, %s\n" , + __func__);rtsx_trace (chip);return STATUS_FAIL ; }
@@ -3101,7 +3102,7 @@ static int mspro_read_format_progress(struct rtsx_chip *chip,u8 cnt, tmp;u8 data[8 ]; -dev_dbg (rtsx_dev (chip),"mspro_read_format_progress, short_data_len = %d\n" , +dev_dbg (rtsx_dev (chip),"%s, short_data_len = %d\n" , __func__, short_data_len); retval =ms_switch_clock (chip);
drivers/staging/rts5208/rtsx.c +2 -2
@@ -999,7 +999,7 @@ static int rtsx_probe(struct pci_dev *pci,/* We come here if there are any problems */ errout: -dev_err (&pci->dev,"rtsx_probe() failed\n" ); +dev_err (&pci->dev,"%s failed\n" , __func__);release_everything (dev);return err;
@@ -1009,7 +1009,7 @@ static void rtsx_remove(struct pci_dev *pci) {struct rtsx_dev *dev =pci_get_drvdata (pci); -dev_info (&pci->dev,"rtsx_remove() called\n" ); +dev_info (&pci->dev,"%s called\n" , __func__);quiesce_and_remove_host (dev);release_everything (dev);
drivers/staging/rts5208/rtsx_chip.c +2 -2
@@ -616,8 +616,8 @@ int rtsx_reset_chip(struct rtsx_chip *chip) else retval =rtsx_pre_handle_sdio_new (chip); -dev_dbg (rtsx_dev (chip),"chip->need_reset = 0x%x (rtsx_reset_chip)\n" , - (unsigned int )(chip->need_reset)); +dev_dbg (rtsx_dev (chip),"chip->need_reset = 0x%x (%s)\n" , + (unsigned int )(chip->need_reset), __func__);#else /* HW_AUTO_SWITCH_SD_BUS */ retval =rtsx_pre_handle_sdio_old (chip);#endif /* HW_AUTO_SWITCH_SD_BUS */
drivers/staging/rts5208/sd.c +15 -12
@@ -910,8 +910,8 @@ static int sd_change_phase(struct rtsx_chip *chip, u8 sample_point, u8 tune_dir)int retval;bool ddr_rx = false; -dev_dbg (rtsx_dev (chip),"sd_change_phase (sample_point = %d, tune_dir = %d)\n" , - sample_point, tune_dir); +dev_dbg (rtsx_dev (chip),"%s (sample_point = %d, tune_dir = %d)\n" , + __func__, sample_point, tune_dir);if (tune_dir ==TUNE_RX ) {SD_VP_CTL =SD_VPRX_CTL ;
@@ -1225,8 +1225,9 @@ static int sd_check_switch_mode(struct rtsx_chip *chip, u8 mode, u8 func_group,int retval;u8 cmd[5 ], buf[64 ]; -dev_dbg (rtsx_dev (chip),"sd_check_switch_mode (mode = %d, func_group = %d, func_to_switch = %d)\n" , - mode, func_group, func_to_switch); +dev_dbg (rtsx_dev (chip),"%s (mode = %d, func_group = %d, + func_to_switch = %d)\n", __func__, mode, func_group, + func_to_switch); cmd[0 ] =0x40 |SWITCH ; cmd[1 ] = mode;
@@ -3575,7 +3576,7 @@ static int reset_mmc_only(struct rtsx_chip *chip)return STATUS_FAIL ; } -dev_dbg (rtsx_dev (chip),"In reset_mmc_only, sd_card->sd_type = 0x%x\n" , +dev_dbg (rtsx_dev (chip),"In %s, sd_card->sd_type = 0x%x\n" , __func__, sd_card->sd_type);return STATUS_SUCCESS ;
@@ -3699,11 +3700,11 @@ int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector,int retval;if (srb->sc_data_direction ==DMA_FROM_DEVICE ) { -dev_dbg (rtsx_dev (chip),"sd_rw: Read %d %s from 0x%x\n" , +dev_dbg (rtsx_dev (chip),"%s: Read %d %s from 0x%x\n" , __func__, sector_cnt, (sector_cnt >1 ) ?"sectors" :"sector" , start_sector); }else { -dev_dbg (rtsx_dev (chip),"sd_rw: Write %d %s to 0x%x\n" , +dev_dbg (rtsx_dev (chip),"%s: Write %d %s to 0x%x\n" , __func__, sector_cnt, (sector_cnt >1 ) ?"sectors" :"sector" , start_sector); }
@@ -3921,7 +3922,8 @@ int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector,rtsx_clear_sd_error (chip);if (detect_card_cd (chip,SD_CARD ) !=STATUS_SUCCESS ) { chip->rw_need_retry =0 ; -dev_dbg (rtsx_dev (chip),"No card exist, exit sd_rw\n" ); +dev_dbg (rtsx_dev (chip),"No card exist, exit %s\n" , + __func__);rtsx_trace (chip);return STATUS_FAIL ; }
@@ -3964,7 +3966,7 @@ int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector,if (detect_card_cd (chip,SD_CARD ) !=STATUS_SUCCESS ) { chip->rw_need_retry =0 ; -dev_dbg (rtsx_dev (chip),"No card exist, exit sd_rw\n" ); +dev_dbg (rtsx_dev (chip),"No card exist, exit %s\n" , __func__);rtsx_trace (chip);return STATUS_FAIL ; }
@@ -5036,14 +5038,15 @@ int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip) sd_card->sd_lock_status |=SD_PWD_EXIST ; } -dev_dbg (rtsx_dev (chip),"sd_lock_state = 0x%x, sd_card->sd_lock_status = 0x%x\n" , + dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x, + sd_card->sd_lock_status = 0x%x\n", sd_lock_state, sd_card->sd_lock_status);if (sd_lock_state ^ (sd_card->sd_lock_status &SD_LOCKED )) { sd_card->sd_lock_notify =1 ;if (sd_lock_state) {if (sd_card->sd_lock_status &SD_LOCK_1BIT_MODE ) { - sd_card->sd_lock_status |= ( -SD_UNLOCK_POW_ON |SD_SDR_RST ); + sd_card->sd_lock_status |= + (SD_UNLOCK_POW_ON |SD_SDR_RST );if (CHK_SD (sd_card)) { retval =reset_sd (chip);if (retval !=STATUS_SUCCESS ) {
drivers/staging/rts5208/spi.c +4 -3
@@ -520,7 +520,7 @@ int spi_get_status(struct scsi_cmnd *srb, struct rtsx_chip *chip) {struct spi_info *spi = &chip->spi; -dev_dbg (rtsx_dev (chip),"spi_get_status: err_code = 0x%x\n" , +dev_dbg (rtsx_dev (chip),"%s: err_code = 0x%x\n" , __func__, spi->err_code);rtsx_stor_set_xfer_buf (&spi->err_code,min_t (int,scsi_bufflen (srb),1 ), srb);
@@ -543,8 +543,9 @@ int spi_set_parameter(struct scsi_cmnd *srb, struct rtsx_chip *chip) spi->clk_div = ((u16)(srb->cmnd[4 ]) <<8 ) | srb->cmnd[5 ]; spi->write_en = srb->cmnd[6 ]; -dev_dbg (rtsx_dev (chip),"spi_set_parameter: spi_clock = %d, clk_div = %d, write_en = %d\n" , - spi->spi_clock, spi->clk_div, spi->write_en); +dev_dbg (rtsx_dev (chip),"%s: spi_clock = %d, clk_div = %d, + write_en = %d\n", __func__, spi->spi_clock, + spi->clk_div, spi->write_en);return STATUS_SUCCESS ; }
drivers/staging/rts5208/xd.c +8 -7
@@ -885,7 +885,7 @@ static int xd_init_l2p_tbl(struct rtsx_chip *chip)struct xd_info *xd_card = &chip->xd_card;int size, i; -dev_dbg (rtsx_dev (chip),"xd_init_l2p_tbl: zone_cnt = %d\n" , +dev_dbg (rtsx_dev (chip),"%s: zone_cnt = %d\n" , __func__, xd_card->zone_cnt);if (xd_card->zone_cnt <1 ) {
@@ -1026,7 +1026,8 @@ static u32 xd_get_l2p_tbl(struct rtsx_chip *chip, int zone_no, u16 log_off)#ifdef XD_DELAY_WRITE retval =xd_delay_write (chip);if (retval !=STATUS_SUCCESS ) { -dev_dbg (rtsx_dev (chip),"In xd_get_l2p_tbl, delay write fail!\n" ); +dev_dbg (rtsx_dev (chip),"In %s, delay write fail!\n" , + __func__);return BLK_NOT_FOUND ; }#endif
@@ -1434,7 +1435,7 @@ static int xd_build_l2p_tbl(struct rtsx_chip *chip, int zone_no)u16 cur_lst_page_logoff, ent_lst_page_logoff;u8 redunt[11 ]; -dev_dbg (rtsx_dev (chip),"xd_build_l2p_tbl: %d\n" , zone_no); +dev_dbg (rtsx_dev (chip),"%s: %d\n" , __func__, zone_no);if (!xd_card->zone) { retval =xd_init_l2p_tbl (chip);
@@ -1774,8 +1775,8 @@ static int xd_finish_write(struct rtsx_chip *chip,int retval, zone_no;u16 log_off; -dev_dbg (rtsx_dev (chip),"xd_finish_write, old_blk = 0x%x, new_blk = 0x%x, log_blk = 0x%x\n" , - old_blk, new_blk, log_blk); + dev_dbg(rtsx_dev(chip), "%s, old_blk = 0x%x, new_blk = 0x%x, + log_blk = 0x%x\n", __func__, old_blk, new_blk, log_blk); if (page_off > xd_card->page_off) { rtsx_trace(chip);
@@ -1960,7 +1961,7 @@ int xd_delay_write(struct rtsx_chip *chip)int retval;if (delay_write->delay_write_flag) { -dev_dbg (rtsx_dev (chip),"xd_delay_write\n" ); +dev_dbg (rtsx_dev (chip),"%s\n" , __func__); retval =xd_switch_clock (chip);if (retval !=STATUS_SUCCESS ) {rtsx_trace (chip);
@@ -2002,7 +2003,7 @@ int xd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, xd_card->cleanup_counter =0 ; -dev_dbg (rtsx_dev (chip),"xd_rw: scsi_sg_count = %d\n" , +dev_dbg (rtsx_dev (chip),"%s: scsi_sg_count = %d\n" , __func__,scsi_sg_count (srb)); ptr = (u8 *)scsi_sglist (srb);
Signature · 1 line
2.7.4
Quoted 1 line · Gaurav Pathak
Signed-off-by Gaurav Pathak <[email protected]>
Need a different subject like:
[PATCH] staging: rts5208: Replace embedded function names with "%s: ", __func__
and you also require some change log like
Avoid possible defects when refactoring.
drivers/staging/rts5208/ms.c
Quoted 1 line
drivers/staging/rts5208/ms.c +0
-0
[]
drivers/staging/rts5208/ms.c static int mspro_rw_multi_sector(struct scsi_cmnd *srb, · line 3068
Quoted 7 lines
drivers/staging/rts5208/ms.c +2
-1@@ -3064,7 +3064,8 @@ static int mspro_rw_multi_sector(struct scsi_cmnd *srb,if (detect_card_cd (chip,MS_CARD ) !=STATUS_SUCCESS ) { chip->rw_need_retry =0 ; -dev_dbg (rtsx_dev (chip),"No card exist, exit mspro_rw_multi_sector\n" ); +dev_dbg (rtsx_dev (chip),"No card exist, %s\n" , + __func__);
try not to change output too.
You could also drop what appear to be function tracing style logging where the message is the equivalent of:
void func(args...)
{
dev_dbg("%s: entered\n", __func__)
...
}as the generic function tracing mechanism works well.
kbuild test robot
build boturl: https://github.com/0day-ci/linux/commits/Gaurav-Pathak/Replaced-Function-name-in-debug-print-with-s-__func__/20170705-023853 config: x86_64-randconfig-x017-201727 (attached as .config)…
Hi Gaurav,
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.12 next-20170704]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Gaurav-Pathak/Replaced-Function-name-in-debug-print-with-s-__func__/20170705-023853
config: x86_64-randconfig-x017-201727 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 All error/warnings (new ones prefixed by >>):
drivers/staging/rts5208/sd.c: In function 'sd_check_switch_mode':
>> drivers/staging/rts5208/sd.c:1228:26: warning: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
In file included from include/linux/genhd.h:64:0,
from include/linux/blkdev.h:10,
from drivers/staging/rts5208/sd.c:23:
>> drivers/staging/rts5208/sd.c:1228:26: error: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
>> drivers/staging/rts5208/sd.c:1229:20: error: expected expression before '%' token
func_to_switch = %d)\n", __func__, mode, func_group,
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
drivers/staging/rts5208/sd.c:1229:23: error: stray '\' in program
func_to_switch = %d)\n", __func__, mode, func_group,
^
>> drivers/staging/rts5208/sd.c:1229:24: error: expected ';' before 'n'
func_to_switch = %d)\n", __func__, mode, func_group,
^
drivers/staging/rts5208/sd.c:1229:25: warning: missing terminating " character
func_to_switch = %d)\n", __func__, mode, func_group,
^
drivers/staging/rts5208/sd.c:1229:25: error: missing terminating " character
func_to_switch = %d)\n", __func__, mode, func_group,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/rts5208/sd.c:1230:18: error: expected statement before ')' token
func_to_switch);
^
drivers/staging/rts5208/sd.c: In function 'sd_execute_write_data':
drivers/staging/rts5208/sd.c:5041:27: warning: missing terminating " character
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
drivers/staging/rts5208/sd.c:5042:37: warning: missing terminating " character
sd_card->sd_lock_status = 0x%x\n",
^
In file included from include/linux/genhd.h:64:0,
from include/linux/blkdev.h:10,
from drivers/staging/rts5208/sd.c:23:
drivers/staging/rts5208/sd.c:5041:27: error: missing terminating " character
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
>> drivers/staging/rts5208/sd.c:5042:31: error: invalid suffix "x" on integer constant
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
drivers/staging/rts5208/sd.c:5042:35: error: stray '\' in program
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
>> drivers/staging/rts5208/sd.c:5042:34: error: 'x' undeclared (first use in this function)
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
drivers/staging/rts5208/sd.c:5042:34: note: each undeclared identifier is reported only once for each function it appears in
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
>> drivers/staging/rts5208/sd.c:5042:36: error: expected ')' before 'n'
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
drivers/staging/rts5208/sd.c:5042:37: error: missing terminating " character
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
--
drivers/staging/rts5208/xd.c: In function 'xd_finish_write':
>> drivers/staging/rts5208/xd.c:1778:26: warning: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s, old_blk = 0x%x, new_blk = 0x%x,
^
drivers/staging/rts5208/xd.c:1779:20: warning: missing terminating " character
log_blk = 0x%x\n", __func__, old_blk, new_blk, log_blk);
^
>> drivers/staging/rts5208/xd.c:2346:0: error: unterminated argument list invoking macro "dev_dbg"
}>> drivers/staging/rts5208/xd.c:1778:2: error: 'dev_dbg' undeclared (first use in this function)
dev_dbg(rtsx_dev(chip), "%s, old_blk = 0x%x, new_blk = 0x%x,
^~~~~~~
drivers/staging/rts5208/xd.c:1778:2: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/staging/rts5208/xd.c:1778:2: error: expected ';' at end of input
>> drivers/staging/rts5208/xd.c:1778:2: error: expected declaration or statement at end of input
drivers/staging/rts5208/xd.c:1776:6: warning: unused variable 'log_off' [-Wunused-variable]
u16 log_off;
^~~~~~~
drivers/staging/rts5208/xd.c:1775:14: warning: unused variable 'zone_no' [-Wunused-variable]
int retval, zone_no;
^~~~~~~
drivers/staging/rts5208/xd.c:1775:6: warning: unused variable 'retval' [-Wunused-variable]
int retval, zone_no;
^~~~~~
drivers/staging/rts5208/xd.c:1774:18: warning: unused variable 'xd_card' [-Wunused-variable]
struct xd_info *xd_card = &chip->xd_card;
^~~~~~~
>> drivers/staging/rts5208/xd.c:1778:2: warning: no return statement in function returning non-void [-Wreturn-type]
dev_dbg(rtsx_dev(chip), "%s, old_blk = 0x%x, new_blk = 0x%x,
^~~~~~~ At top level:
drivers/staging/rts5208/xd.c:1771:12: warning: 'xd_finish_write' defined but not used [-Wunused-function]
static int xd_finish_write(struct rtsx_chip *chip,
^~~~~~~~~~~~~~~
drivers/staging/rts5208/xd.c:1639:12: warning: 'xd_read_multiple_pages' defined but not used [-Wunused-function]
static int xd_read_multiple_pages(struct rtsx_chip *chip, u32 phy_blk,
^~~~~~~~~~~~~~~~~~~~~~
drivers/staging/rts5208/xd.c:1618:12: warning: 'xd_send_cmd' defined but not used [-Wunused-function]
static int xd_send_cmd(struct rtsx_chip *chip, u8 cmd)
^~~~~~~~~~~
drivers/staging/rts5208/xd.c:1015:12: warning: 'xd_get_l2p_tbl' defined but not used [-Wunused-function]
static u32 xd_get_l2p_tbl(struct rtsx_chip *chip, int zone_no, u16 log_off)
^~~~~~~~~~~~~~
drivers/staging/rts5208/xd.c:416:12: warning: 'xd_pull_ctl_disable' defined but not used [-Wunused-function]
static int xd_pull_ctl_disable(struct rtsx_chip *chip)
^~~~~~~~~~~~~~~~~~~
drivers/staging/rts5208/xd.c:71:12: warning: 'xd_switch_clock' defined but not used [-Wunused-function]
static int xd_switch_clock(struct rtsx_chip *chip)
^~~~~~~~~~~~~~~
--
drivers/staging/rts5208/spi.c: In function 'spi_set_parameter':
>> drivers/staging/rts5208/spi.c:546:26: warning: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:19: warning: missing terminating " character
write_en = %d\n", __func__, spi->spi_clock,
^
In file included from include/linux/genhd.h:64:0,
from include/linux/blkdev.h:10,
from drivers/staging/rts5208/spi.c:23:
>> drivers/staging/rts5208/spi.c:546:26: error: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
>> drivers/staging/rts5208/spi.c:547:4: error: 'write_en' undeclared (first use in this function)
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
drivers/staging/rts5208/spi.c:547:4: note: each undeclared identifier is reported only once for each function it appears in
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
>> drivers/staging/rts5208/spi.c:547:15: error: expected expression before '%' token
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
drivers/staging/rts5208/spi.c:547:17: error: stray '\' in program
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~
drivers/staging/rts5208/spi.c:547:19: error: missing terminating " character
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/device.h:1331:31: note: in definition of macro 'dev_dbg'
dev_printk(KERN_DEBUG, dev, format, ##arg); \
^~~~~~vim +1228 drivers/staging/rts5208/sd.c
1222 u8 func_to_switch, u8 bus_width)
1223 {
1224 struct sd_info *sd_card = &chip->sd_card;
1225 int retval;
1226 u8 cmd[5], buf[64];
1227
> 1228 dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d, > 1229 func_to_switch = %d)\n", __func__, mode, func_group, > 1230 func_to_switch);
1231
1232 cmd[0] = 0x40 | SWITCH;
1233 cmd[1] = mode;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build boturl: https://github.com/0day-ci/linux/commits/Gaurav-Pathak/Replaced-Function-name-in-debug-print-with-s-__func__/20170705-023853 config: xtensa-allyesconfig (attached as .config) compiler…
Hi Gaurav,
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.12 next-20170704]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Gaurav-Pathak/Replaced-Function-name-in-debug-print-with-s-__func__/20170705-023853
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa
All error/warnings (new ones prefixed by >>):
drivers/staging/rts5208/sd.c: In function 'sd_check_switch_mode':
drivers/staging/rts5208/sd.c:1228:26: warning: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13,
from include/asm-generic/bug.h:15,
from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from arch/xtensa/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/blkdev.h:4,
from drivers/staging/rts5208/sd.c:23:
>> include/linux/dynamic_debug.h:74:16: error: missing terminating " character
static struct _ddebug __aligned(8) \
^
include/linux/dynamic_debug.h:110:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, 0, 0)
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/sd.c:1228:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
drivers/staging/rts5208/sd.c:1229:20: error: expected expression before '%' token
func_to_switch = %d)\n", __func__, mode, func_group,
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/sd.c:1228:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
drivers/staging/rts5208/sd.c:1229:20: error: missing terminating " character
func_to_switch = %d)\n", __func__, mode, func_group,
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/sd.c:1228:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
drivers/staging/rts5208/sd.c:1229:20: error: expected expression before '%' token
func_to_switch = %d)\n", __func__, mode, func_group,
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
>> drivers/staging/rts5208/sd.c:1228:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
drivers/staging/rts5208/sd.c:1229:20: error: stray '\' in program
func_to_switch = %d)\n", __func__, mode, func_group,
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
>> drivers/staging/rts5208/sd.c:1228:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
drivers/staging/rts5208/sd.c:1229:24: error: expected ';' before 'n'
func_to_switch = %d)\n", __func__, mode, func_group,
^
drivers/staging/rts5208/sd.c:1229:25: warning: missing terminating " character
func_to_switch = %d)\n", __func__, mode, func_group,
^
drivers/staging/rts5208/sd.c:1229:24: error: missing terminating " character
func_to_switch = %d)\n", __func__, mode, func_group,
^
drivers/staging/rts5208/sd.c: In function 'sd_execute_write_data':
drivers/staging/rts5208/sd.c:5041:27: warning: missing terminating " character
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
drivers/staging/rts5208/sd.c:5042:37: warning: missing terminating " character
sd_card->sd_lock_status = 0x%x\n",
^
In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13,
from include/asm-generic/bug.h:15,
from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from arch/xtensa/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/blkdev.h:4,
from drivers/staging/rts5208/sd.c:23:
>> include/linux/dynamic_debug.h:74:16: error: missing terminating " character
static struct _ddebug __aligned(8) \
^
include/linux/dynamic_debug.h:110:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, 0, 0)
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
drivers/staging/rts5208/sd.c:5041:3: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
drivers/staging/rts5208/sd.c:5042:31: error: invalid suffix "x" on integer constant
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
drivers/staging/rts5208/sd.c:5041:3: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
include/linux/dynamic_debug.h:74:16: error: stray '\' in program
static struct _ddebug __aligned(8) \
^
include/linux/dynamic_debug.h:110:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, 0, 0)
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
drivers/staging/rts5208/sd.c:5041:3: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
drivers/staging/rts5208/sd.c:5042:34: error: 'x' undeclared (first use in this function)
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
drivers/staging/rts5208/sd.c:5041:3: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
drivers/staging/rts5208/sd.c:5042:34: note: each undeclared identifier is reported only once for each function it appears in
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
drivers/staging/rts5208/sd.c:5041:3: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
drivers/staging/rts5208/sd.c:5042:36: error: expected ')' before 'n'
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
drivers/staging/rts5208/sd.c:5041:3: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
drivers/staging/rts5208/sd.c:5042:36: error: missing terminating " character
sd_card->sd_lock_status = 0x%x\n",
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
--
drivers/staging/rts5208/spi.c: In function 'spi_set_parameter':
drivers/staging/rts5208/spi.c:546:26: warning: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:19: warning: missing terminating " character
write_en = %d\n", __func__, spi->spi_clock,
^
In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13,
from include/asm-generic/bug.h:15,
from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from arch/xtensa/include/asm/current.h:16,
from include/linux/sched.h:11,
from include/linux/blkdev.h:4,
from drivers/staging/rts5208/spi.c:23:
>> include/linux/dynamic_debug.h:74:16: error: missing terminating " character
static struct _ddebug __aligned(8) \
^
include/linux/dynamic_debug.h:110:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, 0, 0)
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:4: error: 'write_en' undeclared (first use in this function)
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:4: note: each undeclared identifier is reported only once for each function it appears in
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:15: error: expected expression before '%' token
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:15: error: stray '\' in program
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:15: error: missing terminating " character
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:15: error: missing terminating " character
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/dynamic_debug.h:79:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
.format = (fmt), \
^
include/linux/dynamic_debug.h:132:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/device.h:1322:2: note: in expansion of macro 'dynamic_dev_dbg'
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:15: error: expected expression before '%' token
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:15: error: stray '\' in program
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^
drivers/staging/rts5208/spi.c:547:15: error: missing terminating " character
write_en = %d\n", __func__, spi->spi_clock,
^
include/linux/dynamic_debug.h:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
>> drivers/staging/rts5208/spi.c:546:2: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "%s: spi_clock = %d, clk_div = %d,
^..
vim +/dev_dbg +1228 drivers/staging/rts5208/sd.c
1212 if ((buf[DATA_STRUCTURE_VER_OFFSET] == 0x01) &&
1213 ((buf[check_busy_offset] & switch_busy) == switch_busy)) {
1214 rtsx_trace(chip);
1215 return STATUS_FAIL;
1216 }
1217
1218 return STATUS_SUCCESS;
1219 }
1220
1221 static int sd_check_switch_mode(struct rtsx_chip *chip, u8 mode, u8 func_group,
1222 u8 func_to_switch, u8 bus_width)
1223 {
1224 struct sd_info *sd_card = &chip->sd_card;
1225 int retval;
1226 u8 cmd[5], buf[64];
1227
> 1228 dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
1229 func_to_switch = %d)\n", __func__, mode, func_group,
1230 func_to_switch);
1231
1232 cmd[0] = 0x40 | SWITCH;
1233 cmd[1] = mode;
1234
1235 if (func_group == SD_FUNC_GROUP_1) {
1236 cmd[2] = 0xFF;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation