Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
* "unsigned expression < 0" always false warning
@ 2013-04-15 17:17 Bjorn Helgaas
  2013-04-19 20:43 ` Gary Hade
  2013-04-19 21:17 ` Steven Rostedt
  0 siblings, 2 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2013-04-15 17:17 UTC (permalink / raw)
  To: Steven Rostedt, Frederic Weisbecker, Ingo Molnar; +Cc: linux-pci, Lance Ortiz

Can somebody help me resolve the following warning, please?

$ make W=1 drivers/pci/pcie/aer/aerdrv_errprint.o
...
  CC      drivers/pci/pcie/aer/aerdrv_errprint.o
In file included from include/trace/ftrace.h:356:0,
                 from include/trace/define_trace.h:86,
                 from include/trace/events/ras.h:77,
                 from drivers/pci/pcie/aer/aerdrv_errprint.c:27:
include/trace/events/ras.h: In function ‘ftrace_define_fields_aer_event’:
include/trace/events/ras.h:72:1: warning: comparison of unsigned
expression < 0 is always false [-Wtype-limits]

I think it's related to "status" being a u32 below (this is from
include/trace/events/ras.h), but I don't know whether that's incorrect
or how to fix it:

TRACE_EVENT(aer_event,
        TP_PROTO(const char *dev_name,
                 const u32 status,
                 const u8 severity),

        TP_ARGS(dev_name, status, severity),

        TP_STRUCT__entry(
                __string(       dev_name,       dev_name        )
                __field(        u32,            status          )
                __field(        u8,             severity        )
        ),
        ...

Thanks,
  Bjorn

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-15 17:17 "unsigned expression < 0" always false warning Bjorn Helgaas
2013-04-19 20:43 ` Gary Hade
2013-04-19 21:05   ` Steven Rostedt
2013-04-19 21:17 ` Steven Rostedt
2013-04-19 22:30   ` Bjorn Helgaas
2013-04-19 22:45     ` Gary Hade

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git