lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 7 Jul 2017 04:14:48 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Gaurav Pathak <gauravpathak129@...il.com>
Cc:     kbuild-all@...org, joe@...ches.com, linux-kernel@...r.kernel.org,
        gregkh@...uxfoundation.org,
        Gaurav Pathak <gauravpathak129@...il.com>
Subject: Re: [PATCH] staging: rts5208: Replace embedded function names with
 "%s: ", __func__

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

Download attachment ".config.gz" of type "application/gzip" (58907 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ