staging: rts5208: Replace embedded function names with "%s: ", __func__
PATCH 1/1 staging: rts5208: Replace embedded function names with "%s: ", __func__
staging: rts5208: Avoid possible defects when refactoring.
--- 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, exit %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
kbuild test robot
build boturl: https://github.com/0day-ci/linux/commits/Gaurav-Pathak/staging-rts5208-Replace-embedded-function-names-with-s-__func__/20170706-131957 config: i386-randconfig-c0-07070124 (attached as .config)…
Hi Gaurav,
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.12 next-20170706]
[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/staging-rts5208-Replace-embedded-function-names-with-s-__func__/20170706-131957
config: i386-randconfig-c0-07070124 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce:
# save the attached .config to linux build tree
make ARCH=i386 All errors (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 arch/x86/include/asm/percpu.h:44,
from arch/x86/include/asm/current.h:5,
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:98:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \
^
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:1320: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:1320: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,
^
In file included from include/linux/dynamic_debug.h:5:0,
from include/linux/printk.h:329,
from include/linux/kernel.h:13,
from arch/x86/include/asm/percpu.h:44,
from arch/x86/include/asm/current.h:5,
from include/linux/sched.h:11,
from include/linux/blkdev.h:4,
from drivers/staging/rts5208/sd.c:23:
>> include/linux/jump_label.h:391:59: error: missing terminating " character
else if (__builtin_types_compatible_p(typeof(*x), struct static_key_false)) \
^
include/linux/dynamic_debug.h:102:2: note: in expansion of macro 'static_branch_unlikely'
static_branch_unlikely(&descriptor.key.dd_key_false)
^
include/linux/dynamic_debug.h:133:6: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
^
include/linux/device.h:1320: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,
^
In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13,
from arch/x86/include/asm/percpu.h:44,
from arch/x86/include/asm/current.h:5,
from include/linux/sched.h:11,
from include/linux/blkdev.h:4,
from drivers/staging/rts5208/sd.c:23:
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 arch/x86/include/asm/percpu.h:44,
from arch/x86/include/asm/current.h:5,
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:98:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \
^
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:1320: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:1320: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:98:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \
^
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:1320: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:1320: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:1320: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:1320: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:1320: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,
^
In file included from include/linux/dynamic_debug.h:5:0,
from include/linux/printk.h:329,
from include/linux/kernel.h:13,
from arch/x86/include/asm/percpu.h:44,
from arch/x86/include/asm/current.h:5,
from include/linux/sched.h:11,
from include/linux/blkdev.h:4,
from drivers/staging/rts5208/sd.c:23:
>> include/linux/jump_label.h:391:59: error: missing terminating " character
else if (__builtin_types_compatible_p(typeof(*x), struct static_key_false)) \
^
include/linux/dynamic_debug.h:102:2: note: in expansion of macro 'static_branch_unlikely'
static_branch_unlikely(&descriptor.key.dd_key_false)
^
include/linux/dynamic_debug.h:133:6: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
^
include/linux/device.h:1320: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,
^
In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13,
from arch/x86/include/asm/percpu.h:44,
from arch/x86/include/asm/current.h:5,
from include/linux/sched.h:11,
from include/linux/blkdev.h:4,
from drivers/staging/rts5208/sd.c:23:
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:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/staging/rts5208/sd.c:5041:3: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^
In file included from include/linux/dynamic_debug.h:5:0,
from include/linux/printk.h:329,
from include/linux/kernel.h:13,
from arch/x86/include/asm/percpu.h:44,
from arch/x86/include/asm/current.h:5,
from include/linux/sched.h:11,
from include/linux/blkdev.h:4,
from drivers/staging/rts5208/sd.c:23:
include/linux/jump_label.h:391:59: error: stray '\' in program
else if (__builtin_types_compatible_p(typeof(*x), struct static_key_false)) \
^
include/linux/dynamic_debug.h:102:2: note: in expansion of macro 'static_branch_unlikely'
static_branch_unlikely(&descriptor.key.dd_key_false)
^
include/linux/dynamic_debug.h:133:6: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
if (DYNAMIC_DEBUG_BRANCH(descriptor)) \
^
include/linux/device.h:1320: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,
^
In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:13,
from arch/x86/include/asm/percpu.h:44,
from arch/x86/include/asm/current.h:5,
from include/linux/sched.h:11,
from include/linux/blkdev.h:4,
from drivers/staging/rts5208/sd.c:23:
drivers/staging/rts5208/sd.c:5042:36: error: expected ')' before 'n'
sd_card->sd_lock_status = 0x%x\n",
^
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: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:134:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^
drivers/staging/rts5208/sd.c:5041:3: note: in expansion of macro 'dev_dbg'
dev_dbg(rtsx_dev(chip), "sd_lock_state = 0x%x,
^..
vim +391 include/linux/jump_label.h
11276d53 Peter Zijlstra 2015-07-24 375 ({ \
11276d53 Peter Zijlstra 2015-07-24 376 bool branch; \
11276d53 Peter Zijlstra 2015-07-24 377 if (__builtin_types_compatible_p(typeof(*x), struct static_key_true)) \
11276d53 Peter Zijlstra 2015-07-24 378 branch = !arch_static_branch(&(x)->key, true); \
11276d53 Peter Zijlstra 2015-07-24 379 else if (__builtin_types_compatible_p(typeof(*x), struct static_key_false)) \
11276d53 Peter Zijlstra 2015-07-24 380 branch = !arch_static_branch_jump(&(x)->key, true); \
11276d53 Peter Zijlstra 2015-07-24 381 else \
11276d53 Peter Zijlstra 2015-07-24 382 branch = ____wrong_branch_error(); \
11276d53 Peter Zijlstra 2015-07-24 383 branch; \
11276d53 Peter Zijlstra 2015-07-24 384 })
11276d53 Peter Zijlstra 2015-07-24 385
11276d53 Peter Zijlstra 2015-07-24 386 #define static_branch_unlikely(x) \
11276d53 Peter Zijlstra 2015-07-24 387 ({ \
11276d53 Peter Zijlstra 2015-07-24 388 bool branch; \
11276d53 Peter Zijlstra 2015-07-24 389 if (__builtin_types_compatible_p(typeof(*x), struct static_key_true)) \
11276d53 Peter Zijlstra 2015-07-24 390 branch = arch_static_branch_jump(&(x)->key, false); \
11276d53 Peter Zijlstra 2015-07-24 @391 else if (__builtin_types_compatible_p(typeof(*x), struct static_key_false)) \
11276d53 Peter Zijlstra 2015-07-24 392 branch = arch_static_branch(&(x)->key, false); \
11276d53 Peter Zijlstra 2015-07-24 393 else \
11276d53 Peter Zijlstra 2015-07-24 394 branch = ____wrong_branch_error(); \
11276d53 Peter Zijlstra 2015-07-24 395 branch; \
11276d53 Peter Zijlstra 2015-07-24 396 })
11276d53 Peter Zijlstra 2015-07-24 397
11276d53 Peter Zijlstra 2015-07-24 398 #else /* !HAVE_JUMP_LABEL */
11276d53 Peter Zijlstra 2015-07-24 399 :::::: The code at line 391 was first introduced by commit
:::::: 11276d5306b8e5b438a36bbff855fe792d7eaa61 locking/static_keys: Add a new static_key interface
:::::: TO: Peter Zijlstra <[email protected]>
:::::: CC: Ingo Molnar <[email protected]>
---
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/staging-rts5208-Replace-embedded-function-names-with-s-__func__/20170706-131957 config: i386-allyesconfig (attached as .config) compiler…
Hi Gaurav,
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.12 next-20170706]
[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/staging-rts5208-Replace-embedded-function-names-with-s-__func__/20170706-131957
config: i386-allyesconfig (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=i386 All errors (new ones prefixed by >>):
drivers/staging//rts5208/sd.c:1228:26: warning: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
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: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",
^
drivers/staging//rts5208/sd.c: In function 'sd_check_switch_mode':
drivers/staging//rts5208/sd.c:1228:51: warning: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^
drivers/staging//rts5208/sd.c:1228:51: error: missing terminating " character
dev_dbg(rtsx_dev(chip), "%s (mode = %d, func_group = %d,
^~~~~~~
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: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:1229:24: error: 'n' undeclared (first use in this function)
func_to_switch = %d)\n", __func__, mode, func_group,
^
drivers/staging//rts5208/sd.c:1229:24: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/staging//rts5208/sd.c:1230:4: error: expected ')' before 'func_to_switch'
func_to_switch);
^~~~~~~~~~~~~~
>> drivers/staging//rts5208/sd.c:1319:1: error: expected ')' before 'static'
static u8 downgrade_switch_mode(u8 func_group, u8 func_to_switch)
^~~~~~
>> drivers/staging//rts5208/sd.c:5286:1: error: expected declaration or statement at end of input
}
^ At top level:
drivers/staging//rts5208/sd.c:1221:12: warning: 'sd_check_switch_mode' defined but not used [-Wunused-function]
static int sd_check_switch_mode(struct rtsx_chip *chip, u8 mode, u8 func_group,
^~~~~~~~~~~~~~~~~~~~
drivers/staging//rts5208/sd.c:1065:12: warning: 'sd_check_spec' defined but not used [-Wunused-function]
static int sd_check_spec(struct rtsx_chip *chip, u8 bus_width)
^~~~~~~~~~~~~
drivers/staging//rts5208/sd.c:905:12: warning: 'sd_change_phase' defined but not used [-Wunused-function]
static int sd_change_phase(struct rtsx_chip *chip, u8 sample_point, u8 tune_dir)
^~~~~~~~~~~~~~~
drivers/staging//rts5208/sd.c:790:12: warning: 'sd_voltage_switch' defined but not used [-Wunused-function]
static int sd_voltage_switch(struct rtsx_chip *chip)
^~~~~~~~~~~~~~~~~
drivers/staging//rts5208/sd.c:718:12: warning: 'sd_wait_state_data_ready' defined but not used [-Wunused-function]
static int sd_wait_state_data_ready(struct rtsx_chip *chip, u8 state,
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging//rts5208/sd.c:688:12: warning: 'sd_update_lock_status' defined but not used [-Wunused-function]
static int sd_update_lock_status(struct rtsx_chip *chip)
^~~~~~~~~~~~~~~~~~~~~
drivers/staging//rts5208/sd.c:639:12: warning: 'sd_set_init_para' defined but not used [-Wunused-function]
static int sd_set_init_para(struct rtsx_chip *chip)
^~~~~~~~~~~~~~~~
drivers/staging//rts5208/sd.c:617:12: warning: 'sd_set_clock_divider' defined but not used [-Wunused-function]
static int sd_set_clock_divider(struct rtsx_chip *chip, u8 clk_div)
^~~~~~~~~~~~~~~~~~~~
drivers/staging//rts5208/sd.c:426:12: warning: 'sd_check_csd' defined but not used [-Wunused-function]
static int sd_check_csd(struct rtsx_chip *chip, char check_wp)
^~~~~~~~~~~~
drivers/staging//rts5208/sd.c:356:12: warning: 'sd_write_data' defined but not used [-Wunused-function]
static int sd_write_data(struct rtsx_chip *chip, u8 trans_mode,
^~~~~~~~~~~~~
drivers/staging//rts5208/sd.c:78:13: warning: 'sd_init_reg_addr' defined but not used [-Wunused-function]
static void sd_init_reg_addr(struct rtsx_chip *chip)
^~~~~~~~~~~~~~~~
vim +1230 drivers/staging//rts5208/sd.c
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;
1237 cmd[3] = 0xFF;
1238 cmd[4] = 0xF0 + func_to_switch;
1239 } else if (func_group == SD_FUNC_GROUP_3) {
1240 cmd[2] = 0xFF;
1241 cmd[3] = 0xF0 + func_to_switch;
1242 cmd[4] = 0xFF;
1243 } else if (func_group == SD_FUNC_GROUP_4) {
1244 cmd[2] = 0xFF;
1245 cmd[3] = 0x0F + (func_to_switch << 4);
1246 cmd[4] = 0xFF;
1247 } else {
1248 cmd[1] = SD_CHECK_MODE;
1249 cmd[2] = 0xFF;
1250 cmd[3] = 0xFF;
1251 cmd[4] = 0xFF;
1252 }
1253
1254 retval = sd_read_data(chip, SD_TM_NORMAL_READ, cmd, 5, 64, 1, bus_width,
1255 buf, 64, 250);
1256 if (retval != STATUS_SUCCESS) {
1257 rtsx_clear_sd_error(chip);
1258 rtsx_trace(chip);
1259 return STATUS_FAIL;
1260 }
1261
1262 dev_dbg(rtsx_dev(chip), "%*ph\n", 64, buf);
1263
1264 if (func_group == NO_ARGUMENT) {
1265 sd_card->func_group1_mask = buf[0x0D];
1266 sd_card->func_group2_mask = buf[0x0B];
1267 sd_card->func_group3_mask = buf[0x09];
1268 sd_card->func_group4_mask = buf[0x07];
1269
1270 dev_dbg(rtsx_dev(chip), "func_group1_mask = 0x%02x\n",
1271 buf[0x0D]);
1272 dev_dbg(rtsx_dev(chip), "func_group2_mask = 0x%02x\n",
1273 buf[0x0B]);
1274 dev_dbg(rtsx_dev(chip), "func_group3_mask = 0x%02x\n",
1275 buf[0x09]);
1276 dev_dbg(rtsx_dev(chip), "func_group4_mask = 0x%02x\n",
1277 buf[0x07]);
1278 } else {
1279 /* Maximum current consumption, check whether current is
1280 * acceptable; bit[511:496] = 0x0000 means some error happened.
1281 */
1282 u16 cc = ((u16)buf[0] << 8) | buf[1];
1283
1284 dev_dbg(rtsx_dev(chip), "Maximum current consumption: %dmA\n",
1285 cc);
1286 if ((cc == 0) || (cc > 800)) {
1287 rtsx_trace(chip);
1288 return STATUS_FAIL;
1289 }
1290
1291 retval = sd_query_switch_result(chip, func_group,
1292 func_to_switch, buf, 64);
1293 if (retval != STATUS_SUCCESS) {
1294 rtsx_trace(chip);
1295 return STATUS_FAIL;
1296 }
1297
1298 if ((cc > 400) || (func_to_switch > CURRENT_LIMIT_400)) {
1299 retval = rtsx_write_register(chip, OCPPARA2,
1300 SD_OCP_THD_MASK,
1301 chip->sd_800mA_ocp_thd);
1302 if (retval) {
1303 rtsx_trace(chip);
1304 return retval;
1305 }
1306 retval = rtsx_write_register(chip, CARD_PWR_CTL,
1307 PMOS_STRG_MASK,
1308 PMOS_STRG_800mA);
1309 if (retval) {
1310 rtsx_trace(chip);
1311 return retval;
1312 }
1313 }
1314 }
1315
1316 return STATUS_SUCCESS;
1317 }
1318
> 1319 static u8 downgrade_switch_mode(u8 func_group, u8 func_to_switch) 1320 {
1321 if (func_group == SD_FUNC_GROUP_1) {
1322 if (func_to_switch > HS_SUPPORT)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
PATCH 1/1 staging: rts5208: Replace embedded function names with "%s: ", __func__
staging: rts5208: Avoid possible defects when refactoring.
--- drivers/staging/rts5208/ms.c | 5 +++-- drivers/staging/rts5208/rtsx.c | 4 ++-- drivers/staging/rts5208/rtsx_chip.c | 4 ++-- drivers/staging/rts5208/sd.c | 28 +++++++++++++++------------- drivers/staging/rts5208/spi.c | 8 +++++--- drivers/staging/rts5208/xd.c | 17 ++++++++++------- 6 files changed, 37 insertions(+), 29 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, exit %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 -13
@@ -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 " , __func__); +dev_dbg (rtsx_dev (chip),"mode = %d, func_group = %d," , mode, func_group); +dev_dbg (rtsx_dev (chip),"func_to_switch = %d)\n" , 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,14 @@ 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" , - sd_lock_state, sd_card->sd_lock_status); +dev_dbg (rtsx_dev (chip),"sd_lock_state = 0x%x," , sd_lock_state); +dev_dbg (rtsx_dev (chip),"sd_card->sd_lock_status = 0x%x\n" , 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 +5 -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,10 @@ 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: " , __func__); +dev_dbg (rtsx_dev (chip),"spi_clock = %d, " , spi->spi_clock); +dev_dbg (rtsx_dev (chip),"clk_div = %d, " , spi->clk_div); +dev_dbg (rtsx_dev (chip),"write_en = %d\n" , spi->write_en);return STATUS_SUCCESS ; }
drivers/staging/rts5208/xd.c +10 -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,10 @@ 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 " , __func__); +dev_dbg (rtsx_dev (chip),"old_blk = 0x%x, " , old_blk); +dev_dbg (rtsx_dev (chip),"new_blk = 0x%x, " , new_blk); +dev_dbg (rtsx_dev (chip),"log_blk = 0x%x\n" , log_blk);if (page_off > xd_card->page_off) {rtsx_trace (chip);
@@ -1960,7 +1963,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 +2005,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
Greg KH
maintainerQuoted 11 lines · Gaurav Pathak
staging: rts5208: Avoid possible defects when refactoring.
Signed-off-by Gaurav Pathak <[email protected]>--- drivers/staging/rts5208/ms.c | 5 +++-- drivers/staging/rts5208/rtsx.c | 4 ++-- drivers/staging/rts5208/rtsx_chip.c | 4 ++-- drivers/staging/rts5208/sd.c | 28 +++++++++++++++------------- drivers/staging/rts5208/spi.c | 8 +++++--- drivers/staging/rts5208/xd.c | 17 ++++++++++------- 6 files changed, 37 insertions(+), 29 deletions(-)
You sent two patches with the same subject, yet they are different. Which one am I supposed to pick? I'll drop both, please always properly version your patches when you resend them.
thanks,
greg k-h
PATCH 1/1 staging: rts5208: Change fixed function names with "%s: ", __func__
staging: rts5208: Fixed compiler errors for dev_dbg()
--- drivers/staging/rts5208/ms.c | 5 +++-- drivers/staging/rts5208/rtsx.c | 4 ++-- drivers/staging/rts5208/rtsx_chip.c | 4 ++-- drivers/staging/rts5208/sd.c | 28 +++++++++++++++------------- drivers/staging/rts5208/spi.c | 8 +++++--- drivers/staging/rts5208/xd.c | 17 ++++++++++------- 6 files changed, 37 insertions(+), 29 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, exit %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 -13
@@ -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 " , __func__); +dev_dbg (rtsx_dev (chip),"mode = %d, func_group = %d," , mode, func_group); +dev_dbg (rtsx_dev (chip),"func_to_switch = %d)\n" , 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,14 @@ 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" , - sd_lock_state, sd_card->sd_lock_status); +dev_dbg (rtsx_dev (chip),"sd_lock_state = 0x%x," , sd_lock_state); +dev_dbg (rtsx_dev (chip),"sd_card->sd_lock_status = 0x%x\n" , 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 +5 -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,10 @@ 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: " , __func__); +dev_dbg (rtsx_dev (chip),"spi_clock = %d, " , spi->spi_clock); +dev_dbg (rtsx_dev (chip),"clk_div = %d, " , spi->clk_div); +dev_dbg (rtsx_dev (chip),"write_en = %d\n" , spi->write_en);return STATUS_SUCCESS ; }
drivers/staging/rts5208/xd.c +10 -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,10 @@ 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 " , __func__); +dev_dbg (rtsx_dev (chip),"old_blk = 0x%x, " , old_blk); +dev_dbg (rtsx_dev (chip),"new_blk = 0x%x, " , new_blk); +dev_dbg (rtsx_dev (chip),"log_blk = 0x%x\n" , log_blk);if (page_off > xd_card->page_off) {rtsx_trace (chip);
@@ -1960,7 +1963,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 +2005,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
Greg KH
maintainerRe: [PATCH v1] staging: rts5208: Change fixed function names with "%s: ", __func__
Quoted 1 line · Gaurav Pathak
staging: rts5208: Fixed compiler errors for
dev_dbg()
That's not what this patch does :(
Please also use the correct mailing list, scripts/get_maintainer.pl is your friend...
thanks,
greg k-h
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH v1] staging: rts5208: Change fixed function names with "%s: ", __func__
Adding public mailing list address and Joe.
Hi Gerg,
I am trying my best to avoid such silly mistakes, but this is first time I am sending patch to a maintainer. Please disregard my mistakes.
I will send it to the correct mailing list, but when I ran get_maintainer.pl on my patch your Name and email was displayed on top.
Quoted 32 lines · Greg KH
Quoted 6 lines · Gaurav Pathak
Hi Gerg,
I am trying my best to avoid such silly mistakes, but this is first time I am sending patch to a maintainer. Please disregard my mistakes.
I will send it to the correct mailing list, but when I ran get_maintainer.pl on my patch your Name and email was displayed on top.
<snip>
For some reason you sent this only to me, which is a bit rude to everyone else on the mailing list. I'll be glad to respond if you resend it to everyone.
thanks,
greg k-h
Great question, care to ask this on the XXXXXXXX mailing list and CC me? That way I can answer it in public to enable everyone else to know the answer, and let the search engines pick it up.
Also, please read the following two links on why it is not good to directly email people:
http://www.arm.linux.org.uk/news/?newsitem=11 http://www.eyrie.org/~eagle/faqs/questions.htmlthanks,
greg k-h
Greg KH
maintainerRe: [PATCH v1] staging: rts5208: Change fixed function names with "%s: ", __func__
Quoted 11 lines · Gaurav Pathak
Adding public mailing list address and Joe.
Hi Gerg,
I am trying my best to avoid such silly mistakes, but this is first time I am sending patch to a maintainer. Please disregard my mistakes.
I will send it to the correct mailing list, but when I ran get_maintainer.pl on my patch your Name and email was displayed on top.
That's fine, but there was also another mailing list on that it showed as well, right? Please use that for patches for staging drivers.
thanks,
greg k-h
PATCH 1/1 staging: rts5208: Change fixed function names with "%s: ", __func__
staging: rts5208: Refactored code to avoid few defects.
---
Hi, Gaurav hope this text appaers in the email, and i put it at the right place in patch.
drivers/staging/rts5208/ms.c | 5 +++-- drivers/staging/rts5208/rtsx.c | 4 ++-- drivers/staging/rts5208/rtsx_chip.c | 4 ++-- drivers/staging/rts5208/sd.c | 28 +++++++++++++++------------- drivers/staging/rts5208/spi.c | 8 +++++--- drivers/staging/rts5208/xd.c | 17 ++++++++++------- 6 files changed, 37 insertions(+), 29 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, exit %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 -13
@@ -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 " , __func__); +dev_dbg (rtsx_dev (chip),"mode = %d, func_group = %d," , mode, func_group); +dev_dbg (rtsx_dev (chip),"func_to_switch = %d)\n" , 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,14 @@ 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" , - sd_lock_state, sd_card->sd_lock_status); +dev_dbg (rtsx_dev (chip),"sd_lock_state = 0x%x," , sd_lock_state); +dev_dbg (rtsx_dev (chip),"sd_card->sd_lock_status = 0x%x\n" , 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 +5 -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,10 @@ 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: " , __func__); +dev_dbg (rtsx_dev (chip),"spi_clock = %d, " , spi->spi_clock); +dev_dbg (rtsx_dev (chip),"clk_div = %d, " , spi->clk_div); +dev_dbg (rtsx_dev (chip),"write_en = %d\n" , spi->write_en);return STATUS_SUCCESS ; }
drivers/staging/rts5208/xd.c +10 -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,10 @@ 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 " , __func__); +dev_dbg (rtsx_dev (chip),"old_blk = 0x%x, " , old_blk); +dev_dbg (rtsx_dev (chip),"new_blk = 0x%x, " , new_blk); +dev_dbg (rtsx_dev (chip),"log_blk = 0x%x\n" , log_blk);if (page_off > xd_card->page_off) {rtsx_trace (chip);
@@ -1960,7 +1963,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 +2005,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
Greg KH
maintainerRe: [PATCH v1] staging: rts5208: Change fixed function names with "%s: ", __func__
Quoted 1 line · Gaurav Pathak
staging: rts5208: Refactored code to avoid few defects.
That's the subject line, why repeat it here?
Please put a "real" description of the patch here.
Quoted 4 lines
Signed-off-by Gaurav Pathak <[email protected]>---
Hi, Gaurav hope this text appaers in the email, and i put it at the right place in patch.
You did, but why are you writing to yourself?
thanks,
greg k-h
PATCH 1/1 staging: rts5208: Change fixed function names with "%s: ", __func__
staging: rts5208: Fix coding style issue caught by checkpatch.pl related to function name in debug print and shorten few lines over 80 char
--- drivers/staging/rts5208/ms.c | 5 +++-- drivers/staging/rts5208/rtsx.c | 4 ++-- drivers/staging/rts5208/rtsx_chip.c | 4 ++-- drivers/staging/rts5208/sd.c | 28 +++++++++++++++------------- drivers/staging/rts5208/spi.c | 8 +++++--- drivers/staging/rts5208/xd.c | 17 ++++++++++------- 6 files changed, 37 insertions(+), 29 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, exit %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 -13
@@ -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 " , __func__); +dev_dbg (rtsx_dev (chip),"mode = %d, func_group = %d," , mode, func_group); +dev_dbg (rtsx_dev (chip),"func_to_switch = %d)\n" , 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,14 @@ 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" , - sd_lock_state, sd_card->sd_lock_status); +dev_dbg (rtsx_dev (chip),"sd_lock_state = 0x%x," , sd_lock_state); +dev_dbg (rtsx_dev (chip),"sd_card->sd_lock_status = 0x%x\n" , 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 +5 -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,10 @@ 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: " , __func__); +dev_dbg (rtsx_dev (chip),"spi_clock = %d, " , spi->spi_clock); +dev_dbg (rtsx_dev (chip),"clk_div = %d, " , spi->clk_div); +dev_dbg (rtsx_dev (chip),"write_en = %d\n" , spi->write_en);return STATUS_SUCCESS ; }
drivers/staging/rts5208/xd.c +10 -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,10 @@ 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 " , __func__); +dev_dbg (rtsx_dev (chip),"old_blk = 0x%x, " , old_blk); +dev_dbg (rtsx_dev (chip),"new_blk = 0x%x, " , new_blk); +dev_dbg (rtsx_dev (chip),"log_blk = 0x%x\n" , log_blk);if (page_off > xd_card->page_off) {rtsx_trace (chip);
@@ -1960,7 +1963,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 +2005,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
Greg KH
maintainerRe: [PATCH v1] staging: rts5208: Change fixed function names with "%s: ", __func__
Quoted 2 lines · Gaurav Pathak
staging: rts5208: Fix coding style issue caught by checkpatch.pl related to function name in debug print and shorten few lines over 80 char
No, only do one-type-of-thing per patch. It would make sense to maybe fix an 80 char line issue for a line you are fixing up for the function name, but not for any other random line.
Please break this up into individual patches.
thanks,
greg k-h
PATCH 1/1 staging: rts5208: Change fixed function names with "%s: ", __func__
staging: rts5208: Fix coding style issue caught by checkpatch.pl related to function name in debug print
--- drivers/staging/rts5208/ms.c | 5 +++-- drivers/staging/rts5208/rtsx.c | 4 ++-- drivers/staging/rts5208/rtsx_chip.c | 4 ++-- drivers/staging/rts5208/sd.c | 21 +++++++++++---------- drivers/staging/rts5208/spi.c | 8 +++++--- drivers/staging/rts5208/xd.c | 17 ++++++++++------- 6 files changed, 33 insertions(+), 26 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, exit %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 +11 -10
@@ -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,8 @@ 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,8 +3575,8 @@ 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" , - sd_card->sd_type); +dev_dbg (rtsx_dev (chip),"In %s, sd_card->sd_type = 0x%x\n" , + __func__, sd_card->sd_type);return STATUS_SUCCESS ; }
@@ -3699,11 +3699,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 +3921,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 +3965,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 ; }
drivers/staging/rts5208/spi.c +5 -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,10 @@ 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: " , __func__); +dev_dbg (rtsx_dev (chip),"spi_clock = %d, " , spi->spi_clock); +dev_dbg (rtsx_dev (chip),"clk_div = %d, " , spi->clk_div); +dev_dbg (rtsx_dev (chip),"write_en = %d\n" , spi->write_en);return STATUS_SUCCESS ; }
drivers/staging/rts5208/xd.c +10 -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,10 @@ 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 " , __func__); +dev_dbg (rtsx_dev (chip),"old_blk = 0x%x, " , old_blk); +dev_dbg (rtsx_dev (chip),"new_blk = 0x%x, " , new_blk); +dev_dbg (rtsx_dev (chip),"log_blk = 0x%x\n" , log_blk);if (page_off > xd_card->page_off) {rtsx_trace (chip);
@@ -1960,7 +1963,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 +2005,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