mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-6.15-rc2/drivers/xen/balloon.c:346: Possible int/long mixup
@ 2025-04-14 17:57 David Binderman
  2025-04-15  6:55 ` Jürgen Groß
  0 siblings, 1 reply; 2+ messages in thread
From: David Binderman @ 2025-04-14 17:57 UTC (permalink / raw)
  To: jgross, sstabellini, oleksandr_tyshchenko, xen-devel,
	Linux Kernel Mailing List

Hello there,

Static analyser cppcheck says:

linux-6.15-rc2/drivers/xen/balloon.c:346:24: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment]

Source code is

    unsigned long i, size = (1 << order);

Maybe better code:

    unsigned long i, size = (1UL << order);

Regards

David Binderman


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

end of thread, other threads:[~2025-04-15  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-14 17:57 linux-6.15-rc2/drivers/xen/balloon.c:346: Possible int/long mixup David Binderman
2025-04-15  6:55 ` Jürgen Groß

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®