Bug 205999 - usr/src/sys/arm/at91/at91_machdep.c:261: possible int / long mixup ?
Summary: usr/src/sys/arm/at91/at91_machdep.c:261: possible int / long mixup ?
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-07 10:10 UTC by David Binderman
Modified: 2019-01-07 05:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2016-01-07 10:10:54 UTC
[usr/src/sys/arm/at91/at91_machdep.c:261]: (style) int result is returned as long value. If the return value is long to avoid loss of information, then you have loss of information.

Source code is

    return (1 << (cols + rows + banks + bw));

I don't know if this kind of machine is likely to be installed with
> 2Gb RAM, but maybe better code would be

    return (1L << (cols + rows + banks + bw));
Comment 1 Warner Losh freebsd_committer freebsd_triage 2016-01-07 20:52:34 UTC
These machines can have 512MB max due to address space limitations, and thats for a member of the family we don't support (otherwise 256MB is the max).
This isn't a bug with any effect.
Comment 2 Warner Losh freebsd_committer freebsd_triage 2019-01-07 05:34:01 UTC
AT91 removed in 12. and not really a bug.