Skip to contentSkip to conversation

linux-next: build warning after merge of the i2c tree

DISCUSSION Stephen Rothwell 2 participants 4 messages Aug 18, 2021 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the i2c tree, today's linux-next build (powerpc allyesconfig) produced this warning:

drivers/i2c/busses/i2c-virtio.c: In function 'virtio_i2c_probe':
drivers/i2c/busses/i2c-virtio.c:208:17: warning: unused variable 'pdev' [-Wunused-variable]
208 | struct device *pdev = vdev->dev.parent;
| ^~~~

Introduced by commit

8fb12751ac78 ("i2c: virtio: add a virtio i2c frontend driver")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the i2c tree, today's linux-next build (powerpc allyesconfig) produced this warning:

Quoted 8 lines

drivers/i2c/busses/i2c-virtio.c: In function 'virtio_i2c_probe':
drivers/i2c/busses/i2c-virtio.c:208:17: warning: unused variable 'pdev' [-Wunused-variable]
208 | struct device *pdev = vdev->dev.parent;
| ^~~~

Introduced by commit

8fb12751ac78 ("i2c: virtio: add a virtio i2c frontend driver")

Why we have this warning ? In commit 8fb12751ac78, the variable 'pdev' was used in line 237.

https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git/commit/?h=i2c/for-next&id=8fb12751ac78d0a4ba3c604496ffc8dcd1bd6c31

#2 lore raw

Hi Jie,

Quoted 12 lines · On Wed, 18 Aug 2021 14:54:12 +0800 Jie Deng <[email protected]> wrote:
Quoted 10 lines · Stephen Rothwell

Hi all,

After merging the i2c tree, today's linux-next build (powerpc allyesconfig) produced this warning:

drivers/i2c/busses/i2c-virtio.c: In function 'virtio_i2c_probe':
drivers/i2c/busses/i2c-virtio.c:208:17: warning: unused variable 'pdev' [-Wunused-variable]
208 | struct device *pdev = vdev->dev.parent;
| ^~~~

Quoted 8 lines
Quoted 3 lines

Introduced by commit

8fb12751ac78 ("i2c: virtio: add a virtio i2c frontend driver")

Why we have this warning ? In commit 8fb12751ac78, the variable 'pdev' was used in line 237.

https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git/commit/?h=i2c/for-next&id=8fb12751ac78d0a4ba3c604496ffc8dcd1bd6c31

When CONFIG_ACPI is not set, ACPI_COMPANION{,_SET} do not use their arguments.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
Quoted 14 lines · Stephen Rothwell

Hi Jie,

Quoted 11 lines · On Wed, 18 Aug 2021 14:54:12 +0800 Jie Deng <[email protected]> wrote:
Quoted 10 lines · Stephen Rothwell

Hi all,

After merging the i2c tree, today's linux-next build (powerpc allyesconfig) produced this warning:

drivers/i2c/busses/i2c-virtio.c: In function 'virtio_i2c_probe':
drivers/i2c/busses/i2c-virtio.c:208:17: warning: unused variable 'pdev' [-Wunused-variable]

    208 |  struct device *pdev = vdev->dev.parent;
        |                 ^~~~
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

Introduced by commit

    8fb12751ac78 ("i2c: virtio: add a virtio i2c frontend driver")

Why we have this warning ? In commit 8fb12751ac78, the variable 'pdev' was used in line 237.

https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git/commit/?h=i2c/for-next&id=8fb12751ac78d0a4ba3c604496ffc8dcd1bd6c31

When CONFIG_ACPI is not set, ACPI_COMPANION{,_SET} do not use their arguments.

Thanks Stephen. I will send an additional patch to fix it.