From owner-svn-src-head@freebsd.org Tue Nov 10 07:42:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 399C8A2A03F; Tue, 10 Nov 2015 07:42:41 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0117C1BE9; Tue, 10 Nov 2015 07:42:40 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B213F1FE022; Tue, 10 Nov 2015 08:42:38 +0100 (CET) Subject: Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux To: Bruce Evans , "Conrad E. Meyer" References: <201511091650.tA9Gog7d061645@repo.freebsd.org> <20151110080516.M4088@besplex.bde.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <5641A056.2040805@selasky.org> Date: Tue, 10 Nov 2015 08:44:22 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151110080516.M4088@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 07:42:41 -0000 On 11/09/15 22:17, Bruce Evans wrote: > On Mon, 9 Nov 2015, Conrad E. Meyer wrote: > >> Log: >> linuxkpi/sysfs.h: Cast arg2 through intptr_t to avoid GCC warning >> >> The code compiles fine under Clang, but GCC on PPC is less permissive >> about >> integer and pointer sizes. (An intmax_t is clearly *large enough* to >> hold a >> pointer value.) >> >> Another follow-up to r290475. > > This shouldn't compile either. > Hi Conrad, > static int > -sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intptr_t arg2, > +sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intmax_t arg2, > struct sysctl_req *req, struct rm_priotracker *tracker) Given that the second argument is sometimes used for pointers, maybe we should keep it intptr_t. Or add a compile time assert that sizeof(intmax) >= sizeof(intptr_t) which I think doesn't hold? --HPS