[wsa:i2c/for-next 1/3] drivers/i2c/busses/i2c-ocores.c:498:2: note: in expansion of macro 'if'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
head:   e1ed82f0d145e789ec4cb33aa6442bba2de7df68
commit: f1c525a0ad161617d66dd03dcb4fec7a1e305010 [1/3] i2c: don't print error when adding adapter fails
config: x86_64-randconfig-x010-201634 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        git checkout f1c525a0ad161617d66dd03dcb4fec7a1e305010
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/i2c/busses/i2c-ocores.c: In function 'ocores_i2c_probe':
   drivers/i2c/busses/i2c-ocores.c:485:3: error: label 'err_clk' used but not defined
      goto err_clk;
      ^~~~
   drivers/i2c/busses/i2c-ocores.c:418:6: warning: unused variable 'i' [-Wunused-variable]
     int i;
         ^
   In file included from include/linux/err.h:4:0,
                    from include/linux/clk.h:15,
                    from drivers/i2c/busses/i2c-ocores.c:15:
   drivers/i2c/busses/i2c-ocores.c: At top level:
   include/linux/compiler.h:149:2: error: expected identifier or '(' before 'if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
     ^
   include/linux/compiler.h:147:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
>> drivers/i2c/busses/i2c-ocores.c:498:2: note: in expansion of macro 'if'
     if (ret)
     ^~
   include/linux/compiler.h:163:3: error: expected identifier or '(' before ')' token
     }))
      ^
   include/linux/compiler.h:147:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
>> drivers/i2c/busses/i2c-ocores.c:498:2: note: in expansion of macro 'if'
     if (ret)
     ^~
   include/linux/compiler.h:149:2: error: expected identifier or '(' before 'if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
     ^
   include/linux/compiler.h:147:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   drivers/i2c/busses/i2c-ocores.c:502:2: note: in expansion of macro 'if'
     if (pdata) {
     ^~
   include/linux/compiler.h:163:3: error: expected identifier or '(' before ')' token
     }))
      ^
   include/linux/compiler.h:147:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   drivers/i2c/busses/i2c-ocores.c:502:2: note: in expansion of macro 'if'
     if (pdata) {
     ^~
   drivers/i2c/busses/i2c-ocores.c:507:2: error: expected identifier or '(' before 'return'
     return 0;
     ^~~~~~
   drivers/i2c/busses/i2c-ocores.c:509:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    err_clk:
           ^
   drivers/i2c/busses/i2c-ocores.c:511:2: error: expected identifier or '(' before 'return'
     return ret;
     ^~~~~~
   drivers/i2c/busses/i2c-ocores.c:512:1: error: expected identifier or '(' before '}' token
    }
    ^
   drivers/i2c/busses/i2c-ocores.c: In function 'ocores_i2c_probe':
   drivers/i2c/busses/i2c-ocores.c:497:2: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^

vim +/if +498 drivers/i2c/busses/i2c-ocores.c

   482				       pdev->name, i2c);
   483		if (ret) {
   484			dev_err(&pdev->dev, "Cannot claim IRQ\n");
   485			goto err_clk;
   486		}
   487	
   488		/* hook up driver to tree */
   489		platform_set_drvdata(pdev, i2c);
   490		i2c->adap = ocores_adapter;
   491		i2c_set_adapdata(&i2c->adap, i2c);
   492		i2c->adap.dev.parent = &pdev->dev;
   493		i2c->adap.dev.of_node = pdev->dev.of_node;
   494	
   495		/* add i2c adapter to i2c tree */
   496		ret = i2c_add_adapter(&i2c->adap);
   497		}
 > 498		if (ret)
   499			goto err_clk;
   500	
   501		/* add in known devices to the bus */
   502		if (pdata) {
   503			for (i = 0; i < pdata->num_devices; i++)
   504				i2c_new_device(&i2c->adap, pdata->devices + i);
   505		}
   506	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux