[Bug 205999] usr/src/sys/arm/at91/at91_machdep.c:261: possible int / long mixup ?

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jan 7 10:10:54 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205999

            Bug ID: 205999
           Summary: usr/src/sys/arm/at91/at91_machdep.c:261: possible int
                    / long mixup ?
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: freebsd-arm at FreeBSD.org
          Reporter: dcb314 at hotmail.com

[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));

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-arm mailing list