NetBSD Problem Report #51384
From www@NetBSD.org Mon Aug 1 15:37:08 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 0E42A7A26E
for <gnats-bugs@gnats.NetBSD.org>; Mon, 1 Aug 2016 15:37:08 +0000 (UTC)
Message-Id: <20160801153707.3767B7A2AB@mollari.NetBSD.org>
Date: Mon, 1 Aug 2016 15:37:07 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/arch/mips/rmi/rmixl_intr.c:981: 32/64 bit mixup ?
X-Send-Pr-Version: www-1.0
>Number: 51384
>Category: port-mips
>Synopsis: src/sys/arch/mips/rmi/rmixl_intr.c:981: 32/64 bit mixup ?
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-mips-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 01 15:40:00 +0000 2016
>Closed-Date: Mon Aug 01 18:10:45 +0000 2016
>Last-Modified: Mon Aug 01 18:15:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160801
>Organization:
>Environment:
>Description:
src/sys/arch/mips/rmi/rmixl_intr.c:981]: (style) int result is assigned to long variable.
Source code is
const uint64_t ipi_mask = 1 << (uintptr_t)arg;
Maybe better code
const uint64_t ipi_mask = 1ULL << (uintptr_t)arg;
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-mips/51384: src/sys/arch/mips/rmi/rmixl_intr.c:981: 32/64
bit mixup ?
Date: Mon, 1 Aug 2016 18:08:31 +0000
On Mon, Aug 01, 2016 at 03:40:00PM +0000, dcb314@hotmail.com wrote:
> Source code is
>
> const uint64_t ipi_mask = 1 << (uintptr_t)arg;
>
> Maybe better code
>
> const uint64_t ipi_mask = 1ULL << (uintptr_t)arg;
I suspect what they meant was (uintptr_t)1 << arg...
--
David A. Holland
dholland@netbsd.org
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51384 CVS commit: src/sys/arch/mips/rmi
Date: Mon, 1 Aug 2016 18:09:50 +0000
Module Name: src
Committed By: dholland
Date: Mon Aug 1 18:09:50 UTC 2016
Modified Files:
src/sys/arch/mips/rmi: rmixl_intr.c
Log Message:
PR 51384 David Binderman: don't shift into the void
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/rmi/rmixl_intr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 01 Aug 2016 18:10:45 +0000
State-Changed-Why:
fixed, thanks
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-mips/51384: src/sys/arch/mips/rmi/rmixl_intr.c:981: 32/64
bit mixup ?
Date: Mon, 1 Aug 2016 18:10:30 +0000
On Mon, Aug 01, 2016 at 06:10:01PM +0000, David Holland wrote:
> On Mon, Aug 01, 2016 at 03:40:00PM +0000, dcb314@hotmail.com wrote:
> > Source code is
> >
> > const uint64_t ipi_mask = 1 << (uintptr_t)arg;
> >
> > Maybe better code
> >
> > const uint64_t ipi_mask = 1ULL << (uintptr_t)arg;
>
> I suspect what they meant was (uintptr_t)1 << arg...
hrm, guess not since arg is a void *. shrug... anyway, fixed
--
David A. Holland
dholland@netbsd.org
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.