Subject: Today's linux-next build fail on powerpc

From: Abdul Haleem <[email-masked]>
Date: Thu, 06 Jul 2017 11:30:23 +0530

Hi Luis,

next-20170705 fails to build on powerpc with below errors.

Machine Type: Power 8 Power VM Lpar
Kernel : 4.12.0-next-20170705
gcc : version 5.2.1
config: attached Tul-vm-config

drivers/i2c/busses/i2c-designware-platdrv.c: In function
‘dw_i2c_plat_probe’:
drivers/i2c/busses/i2c-designware-platdrv.c:331:6: error: implicit
declaration of function
‘i2c_detect_slave_mode’ [-Werror=implicit-function-declaration]
  if (i2c_detect_slave_mode(&pdev->dev))
      ^
cc1: some warnings being treated as errors
make[3]: *** [drivers/i2c/busses/i2c-designware-platdrv.o] Error 1

In file drivers/i2c/busses/i2c-designware-platdrv.c 

    ret = i2c_dw_probe_lock_support(dev);
    if (ret)
        goto exit_reset;

>>> if (i2c_detect_slave_mode(&pdev->dev))
        i2c_dw_configure_slave(dev);
    else
        i2c_dw_configure_master(dev);

    dev->clk = devm_clk_get(&pdev->dev, NULL);

The line was first introduced with commit:

commit 5b6d721b266acaef411520e28066e4624c6619e7
Author: Luis Oliveira <[email-masked]>
Date:   Thu Jun 22 11:17:33 2017 +0100

    i2c: designware: enable SLAVE in platform module
    
    - Slave mode selected in platform module if the support is detected
in
      the DT.
    
    Signed-off-by: Luis Oliveira <[email-masked]>
    Reviewed-by: Andy Shevchenko <[email-masked]>
    Acked-by: Jarkko Nikula <[email-masked]>
    Signed-off-by: Wolfram Sang <[email-masked]>

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c
b/drivers/i2c/busses/i2c-designware-platdrv.c
index 1f38c80..2ea6d0d 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c

-- 
Regard's

Abdul Haleem
IBM Linux Technology Centre