Skip to contentSkip to conversation

Build warning regression (104daa71b396 ("PCI: Determine actual VPD size on first access"))

DISCUSSION Bjorn Helgaas 3 participants 4 messages May 9, 2016 – May 10, 2016 PCI

lore
Share & tools
lore
#0 lore raw

Hi Hannes,

Geert's list of build regressions and improvements
(http://lkml.kernel.org/r/[email protected])
shows these new warnings:

drivers/pci/access.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]: => 318:8 drivers/pci/access.c: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'unsigned int' [-Wformat=]: => 340:6

which I think are due to 104daa71b396 ("PCI: Determine actual VPD size on first access").

Would you mind fixing those up and sending me a patch? These were in the v4.6-rc1 regressions email, and I should have noticed then, but I didn't.

Bjorn

#1 lore raw
Quoted 9 lines · Bjorn Helgaas

Hi Hannes,

Geert's list of build regressions and improvements
(http://lkml.kernel.org/r/[email protected])
shows these new warnings:

drivers/pci/access.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]: => 318:8 drivers/pci/access.c: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'unsigned int' [-Wformat=]: => 340:6

Quoted 7 lines

which I think are due to 104daa71b396 ("PCI: Determine actual VPD size on first access").

Would you mind fixing those up and sending me a patch? These were in the v4.6-rc1 regressions email, and I should have noticed then, but I didn't.

This is curious.
The code has this:

size_t off = 0;

...

dev_warn(&dev->dev,

	"invalid large VPD tag %02x size at offset %zu",
	tag, off + 1);

Which, as per my reading, suggests that the last argument to dev_warn() is of type size_t.

Which tree has generated the above warning?

Cheers,

Hannes

Signature · 5 lines
Dr. Hannes Reinecke		   Teamlead Storage & Networking
[email protected]			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
#2 lore raw

[+cc Geert]

Quoted 24 lines · Hannes Reinecke
Quoted 9 lines · Bjorn Helgaas

Hi Hannes,

Geert's list of build regressions and improvements
(http://lkml.kernel.org/r/[email protected])
shows these new warnings:

drivers/pci/access.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]: => 318:8 drivers/pci/access.c: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'unsigned int' [-Wformat=]: => 340:6

Quoted 7 lines

which I think are due to 104daa71b396 ("PCI: Determine actual VPD size on first access").

Would you mind fixing those up and sending me a patch? These were in the v4.6-rc1 regressions email, and I should have noticed then, but I didn't.

This is curious.
The code has this:

size_t off = 0;

...

Quoted 8 lines

dev_warn(&dev->dev,

	"invalid large VPD tag %02x size at offset %zu",
	tag, off + 1);

Which, as per my reading, suggests that the last argument to dev_warn() is of type size_t.

Which tree has generated the above warning?

Yeah, it wasn't obvious to me how this would happen either. From Geert's original email, I think the tree is v4.6-rc7, i.e., 44549e8f5eea4e0a41b487b63e616cb089922b99.

Geert, can you tell which config generated this warning?

#3 lore raw

Hi Bjorn,

Quoted 32 lines · Bjorn Helgaas
Quoted 31 lines · Hannes Reinecke
Quoted 9 lines · Bjorn Helgaas

Hi Hannes,

Geert's list of build regressions and improvements
(http://lkml.kernel.org/r/[email protected])
shows these new warnings:

drivers/pci/access.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]: => 318:8 drivers/pci/access.c: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'unsigned int' [-Wformat=]: => 340:6

Quoted 7 lines

which I think are due to 104daa71b396 ("PCI: Determine actual VPD size on first access").

Would you mind fixing those up and sending me a patch? These were in the v4.6-rc1 regressions email, and I should have noticed then, but I didn't.

This is curious.
The code has this:

size_t off = 0;

...

dev_warn(&dev->dev,
"invalid large VPD tag %02x size at offset %zu", tag, off + 1);

Which, as per my reading, suggests that the last argument to dev_warn() is of type size_t.

Quoted 7 lines
Quoted 1 line

Which tree has generated the above warning?

Yeah, it wasn't obvious to me how this would happen either. From Geert's original email, I think the tree is v4.6-rc7, i.e., 44549e8f5eea4e0a41b487b63e616cb089922b99.

Geert, can you tell which config generated this warning?

It was seen with v4.6-rc7/microblaze/nommu_defconfig only.

As I agree the type of the last parameter is correct, it's probably a compiler issue.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds