* drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer'
@ 2024-10-02 0:03 kernel test robot
2024-10-02 9:31 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2024-10-02 0:03 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: oe-kbuild-all, linux-kernel, Linus Walleij,
Javier Martinez Canillas
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e32cde8d2bd7d251a8f9b434143977ddf13dcec6
commit: 25162a4f64f8ba0065f300977589fe1f6af332f0 Input: cyttsp4 - remove driver
date: 8 weeks ago
config: x86_64-randconfig-001-20231120 (https://download.01.org/0day-ci/archive/20241002/202410020735.aBI61ZYn-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410020735.aBI61ZYn-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410020735.aBI61ZYn-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/sched.h:38,
from include/linux/percpu.h:13,
from arch/x86/include/asm/msr.h:15,
from arch/x86/include/asm/tsc.h:10,
from arch/x86/include/asm/timex.h:6,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/input/touchscreen/cyttsp_core.h:22,
from drivers/input/touchscreen/cyttsp_i2c.c:16:
include/linux/mm_types_task.h:19:45: warning: "CONFIG_SPLIT_PTLOCK_CPUS" is not defined, evaluates to 0 [-Wundef]
19 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm.h:2928:5: note: in expansion of macro 'USE_SPLIT_PTE_PTLOCKS'
2928 | #if USE_SPLIT_PTE_PTLOCKS
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types_task.h:19:45: warning: "CONFIG_SPLIT_PTLOCK_CPUS" is not defined, evaluates to 0 [-Wundef]
19 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types_task.h:20:34: note: in expansion of macro 'USE_SPLIT_PTE_PTLOCKS'
20 | #define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/mm.h:3050:5: note: in expansion of macro 'USE_SPLIT_PMD_PTLOCKS'
3050 | #if USE_SPLIT_PMD_PTLOCKS
| ^~~~~~~~~~~~~~~~~~~~~
drivers/input/touchscreen/cyttsp_i2c.c: In function 'cyttsp_i2c_read_block_data':
>> drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer' [-Werror=implicit-function-declaration]
47 | retval = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
| ^~~~~~~~~~~~
drivers/input/touchscreen/cyttsp_i2c.c: In function 'cyttsp_i2c_probe':
drivers/input/touchscreen/cyttsp_i2c.c:90:14: error: implicit declaration of function 'i2c_check_functionality' [-Werror=implicit-function-declaration]
90 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/input/touchscreen/cyttsp_i2c.c: At top level:
drivers/input/touchscreen/cyttsp_i2c.c:128:1: warning: data definition has no type or storage class
128 | module_i2c_driver(cyttsp_i2c_driver);
| ^~~~~~~~~~~~~~~~~
drivers/input/touchscreen/cyttsp_i2c.c:128:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]
drivers/input/touchscreen/cyttsp_i2c.c:128:1: warning: parameter names (without types) in function declaration
drivers/input/touchscreen/cyttsp_i2c.c:118:26: warning: 'cyttsp_i2c_driver' defined but not used [-Wunused-variable]
118 | static struct i2c_driver cyttsp_i2c_driver = {
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/i2c_transfer +47 drivers/input/touchscreen/cyttsp_i2c.c
24
25 static int cyttsp_i2c_read_block_data(struct device *dev, u8 *xfer_buf,
26 u16 addr, u8 length, void *values)
27 {
28 struct i2c_client *client = to_i2c_client(dev);
29 u8 client_addr = client->addr | ((addr >> 8) & 0x1);
30 u8 addr_lo = addr & 0xFF;
31 struct i2c_msg msgs[] = {
32 {
33 .addr = client_addr,
34 .flags = 0,
35 .len = 1,
36 .buf = &addr_lo,
37 },
38 {
39 .addr = client_addr,
40 .flags = I2C_M_RD,
41 .len = length,
42 .buf = values,
43 },
44 };
45 int retval;
46
> 47 retval = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
48 if (retval < 0)
49 return retval;
50
51 return retval != ARRAY_SIZE(msgs) ? -EIO : 0;
52 }
53
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer'
2024-10-02 0:03 drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer' kernel test robot
@ 2024-10-02 9:31 ` Dmitry Torokhov
2024-10-02 13:37 ` Linus Walleij
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2024-10-02 9:31 UTC (permalink / raw)
To: kernel test robot
Cc: oe-kbuild-all, linux-kernel, Linus Walleij,
Javier Martinez Canillas
On Wed, Oct 02, 2024 at 08:03:35AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: e32cde8d2bd7d251a8f9b434143977ddf13dcec6
> commit: 25162a4f64f8ba0065f300977589fe1f6af332f0 Input: cyttsp4 - remove driver
> date: 8 weeks ago
> config: x86_64-randconfig-001-20231120 (https://download.01.org/0day-ci/archive/20241002/202410020735.aBI61ZYn-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410020735.aBI61ZYn-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202410020735.aBI61ZYn-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from include/linux/sched.h:38,
> from include/linux/percpu.h:13,
> from arch/x86/include/asm/msr.h:15,
> from arch/x86/include/asm/tsc.h:10,
> from arch/x86/include/asm/timex.h:6,
> from include/linux/timex.h:67,
> from include/linux/time32.h:13,
> from include/linux/time.h:60,
> from include/linux/stat.h:19,
> from include/linux/module.h:13,
> from drivers/input/touchscreen/cyttsp_core.h:22,
> from drivers/input/touchscreen/cyttsp_i2c.c:16:
> include/linux/mm_types_task.h:19:45: warning: "CONFIG_SPLIT_PTLOCK_CPUS" is not defined, evaluates to 0 [-Wundef]
> 19 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mm.h:2928:5: note: in expansion of macro 'USE_SPLIT_PTE_PTLOCKS'
> 2928 | #if USE_SPLIT_PTE_PTLOCKS
> | ^~~~~~~~~~~~~~~~~~~~~
> include/linux/mm_types_task.h:19:45: warning: "CONFIG_SPLIT_PTLOCK_CPUS" is not defined, evaluates to 0 [-Wundef]
> 19 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mm_types_task.h:20:34: note: in expansion of macro 'USE_SPLIT_PTE_PTLOCKS'
> 20 | #define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \
> | ^~~~~~~~~~~~~~~~~~~~~
> include/linux/mm.h:3050:5: note: in expansion of macro 'USE_SPLIT_PMD_PTLOCKS'
> 3050 | #if USE_SPLIT_PMD_PTLOCKS
> | ^~~~~~~~~~~~~~~~~~~~~
> drivers/input/touchscreen/cyttsp_i2c.c: In function 'cyttsp_i2c_read_block_data':
> >> drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer' [-Werror=implicit-function-declaration]
> 47 | retval = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
> | ^~~~~~~~~~~~
> drivers/input/touchscreen/cyttsp_i2c.c: In function 'cyttsp_i2c_probe':
> drivers/input/touchscreen/cyttsp_i2c.c:90:14: error: implicit declaration of function 'i2c_check_functionality' [-Werror=implicit-function-declaration]
> 90 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
> | ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/input/touchscreen/cyttsp_i2c.c: At top level:
> drivers/input/touchscreen/cyttsp_i2c.c:128:1: warning: data definition has no type or storage class
> 128 | module_i2c_driver(cyttsp_i2c_driver);
> | ^~~~~~~~~~~~~~~~~
> drivers/input/touchscreen/cyttsp_i2c.c:128:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]
> drivers/input/touchscreen/cyttsp_i2c.c:128:1: warning: parameter names (without types) in function declaration
> drivers/input/touchscreen/cyttsp_i2c.c:118:26: warning: 'cyttsp_i2c_driver' defined but not used [-Wunused-variable]
> 118 | static struct i2c_driver cyttsp_i2c_driver = {
> | ^~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
This is really weird: cyttsp_i2c.h includes linux/i2c.h, it has
dependency in Kconfig on I2C and CONFIG_I2C is present in the .config
referenced above, so all the declarations should be there.
I tried reproducing with the exact commit and config as in this report
and I did not get such errors. This is with gcc version 13.2.0 (Debian
13.2.0-13).
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer'
2024-10-02 9:31 ` Dmitry Torokhov
@ 2024-10-02 13:37 ` Linus Walleij
2024-10-03 11:49 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2024-10-02 13:37 UTC (permalink / raw)
To: Dmitry Torokhov, Arnd Bergmann
Cc: kernel test robot, oe-kbuild-all, linux-kernel,
Javier Martinez Canillas
On Wed, Oct 2, 2024 at 11:31 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> > drivers/input/touchscreen/cyttsp_i2c.c:118:26: warning: 'cyttsp_i2c_driver' defined but not used [-Wunused-variable]
> > 118 | static struct i2c_driver cyttsp_i2c_driver = {
> > | ^~~~~~~~~~~~~~~~~
> > cc1: some warnings being treated as errors
> >
>
> This is really weird: cyttsp_i2c.h includes linux/i2c.h, it has
> dependency in Kconfig on I2C and CONFIG_I2C is present in the .config
> referenced above, so all the declarations should be there.
I usually ask Arnd about all kind of Kconfig business when
things get weird.
But could it be one of these awful things:
config TOUCHSCREEN_CYTTSP_I2C
tristate "support I2C bus connection"
- depends on TOUCHSCREEN_CYTTSP_CORE && I2C
+ depends on TOUCHSCREEN_CYTTSP_CORE && (I2C=y ||
I2C=TOUCHSCREEN_CYTTSP_CORE)
Since I2C is tristate it could be a module and then this touchscreen
has to be a module too.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer'
2024-10-02 13:37 ` Linus Walleij
@ 2024-10-03 11:49 ` Dmitry Torokhov
2024-10-03 14:20 ` Linus Walleij
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2024-10-03 11:49 UTC (permalink / raw)
To: Linus Walleij
Cc: Arnd Bergmann, kernel test robot, oe-kbuild-all, linux-kernel,
Javier Martinez Canillas
On Wed, Oct 02, 2024 at 03:37:56PM +0200, Linus Walleij wrote:
> On Wed, Oct 2, 2024 at 11:31 AM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
>
> > > drivers/input/touchscreen/cyttsp_i2c.c:118:26: warning: 'cyttsp_i2c_driver' defined but not used [-Wunused-variable]
> > > 118 | static struct i2c_driver cyttsp_i2c_driver = {
> > > | ^~~~~~~~~~~~~~~~~
> > > cc1: some warnings being treated as errors
> > >
> >
> > This is really weird: cyttsp_i2c.h includes linux/i2c.h, it has
> > dependency in Kconfig on I2C and CONFIG_I2C is present in the .config
> > referenced above, so all the declarations should be there.
>
> I usually ask Arnd about all kind of Kconfig business when
> things get weird.
>
> But could it be one of these awful things:
>
> config TOUCHSCREEN_CYTTSP_I2C
> tristate "support I2C bus connection"
> - depends on TOUCHSCREEN_CYTTSP_CORE && I2C
> + depends on TOUCHSCREEN_CYTTSP_CORE && (I2C=y ||
> I2C=TOUCHSCREEN_CYTTSP_CORE)
>
> Since I2C is tristate it could be a module and then this touchscreen
> has to be a module too.
"depends" should handle this and force touchscreen be a module if I2C is
a module. Also in the provided config I2C is built-in...
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer'
2024-10-03 11:49 ` Dmitry Torokhov
@ 2024-10-03 14:20 ` Linus Walleij
0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2024-10-03 14:20 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Arnd Bergmann, kernel test robot, oe-kbuild-all, linux-kernel,
Javier Martinez Canillas
On Thu, Oct 3, 2024 at 1:49 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Wed, Oct 02, 2024 at 03:37:56PM +0200, Linus Walleij wrote:
> > On Wed, Oct 2, 2024 at 11:31 AM Dmitry Torokhov
> > <dmitry.torokhov@gmail.com> wrote:
> >
> > > > drivers/input/touchscreen/cyttsp_i2c.c:118:26: warning: 'cyttsp_i2c_driver' defined but not used [-Wunused-variable]
> > > > 118 | static struct i2c_driver cyttsp_i2c_driver = {
> > > > | ^~~~~~~~~~~~~~~~~
> > > > cc1: some warnings being treated as errors
> > > >
> > >
> > > This is really weird: cyttsp_i2c.h includes linux/i2c.h, it has
> > > dependency in Kconfig on I2C and CONFIG_I2C is present in the .config
> > > referenced above, so all the declarations should be there.
> >
> > I usually ask Arnd about all kind of Kconfig business when
> > things get weird.
> >
> > But could it be one of these awful things:
> >
> > config TOUCHSCREEN_CYTTSP_I2C
> > tristate "support I2C bus connection"
> > - depends on TOUCHSCREEN_CYTTSP_CORE && I2C
> > + depends on TOUCHSCREEN_CYTTSP_CORE && (I2C=y ||
> > I2C=TOUCHSCREEN_CYTTSP_CORE)
> >
> > Since I2C is tristate it could be a module and then this touchscreen
> > has to be a module too.
>
> "depends" should handle this and force touchscreen be a module if I2C is
> a module. Also in the provided config I2C is built-in...
Hm yeah I'm lost too :/
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-03 14:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 0:03 drivers/input/touchscreen/cyttsp_i2c.c:47:18: error: implicit declaration of function 'i2c_transfer' kernel test robot
2024-10-02 9:31 ` Dmitry Torokhov
2024-10-02 13:37 ` Linus Walleij
2024-10-03 11:49 ` Dmitry Torokhov
2024-10-03 14:20 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox