Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp287524imm; Tue, 9 Oct 2018 18:16:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV63BvtCq3rK9VdM9epVGlN9RVyCFsaOCAAFzR40FaqiO5poZxJRThm1qqcmR8rlM0+89nQkT X-Received: by 2002:a62:571b:: with SMTP id l27-v6mr32848547pfb.209.1539134161063; Tue, 09 Oct 2018 18:16:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539134161; cv=none; d=google.com; s=arc-20160816; b=UtODgnHflDPwOkL/oKO3kuyU4omQXjYYFBuS9JRNzgJEuWuHOiErKzfUBbCipQFTTI X0zKaS7WUQEqYhVIJJAgWWFCCz4eBEYWL+DWvBUrZfSB2FC/m2Rj+7LlLBDBCIm6sbps auwVR8NtiGKAI4Z0fH0nEz/0n2nBURXqe//IC9xL2eaM4lVxzmPxERrOTarLmDM6rxeG OJDiM7ENeWv4Iv5rCXzCYVKmp0y27BHsIp0uEBRNqFf+nq9/9FNQ+7DWP1S/Nn31XQLg pVV0vl1V4dINoKutYMbJaH5hgrQh5NOQOE45a2nfCO8POb1iIKp+vQEiBVNYYtYx9dQF gkZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9ETiD60kKvhWWOqxiPOUmJ4nhUyiVqaBb3nJXcy9G2M=; b=lQ3yh6uejcUPYnK4kBl3hAALF/SCewYOXs4GUN3aTVa0luUIWm31W3PYRVpYA4Z8QK m5VRs8Lwxj64s5hKcEJ0RwsTK17EpXq+82fg0SVzJAooUUQBULeqk2tMdt7r3EzqvTjI kZPFT4ILnoqHAD8CKVSjKCIlJeQ6gXFme/pbSffMi5n9oZByM4pBm2NYIoDU5XgxHgl+ 8VY6leoLhnoeXA/PLti4BLA92RpOJjMTqW9DDRgLlftTV+Ryr/F60ULmoGLnZ9EuxJf/ qITQuTEfQyeqxwALvU5vzcSurnDEq4c8Zmcd28FpzpBXN6six13fffVG9lwRe35vMmAc h5nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gibson.dropbear.id.au header.s=201602 header.b="gApRPLY/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z16-v6si22673304pga.177.2018.10.09.18.15.46; Tue, 09 Oct 2018 18:16:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gibson.dropbear.id.au header.s=201602 header.b="gApRPLY/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbeJJISY (ORCPT + 99 others); Wed, 10 Oct 2018 04:18:24 -0400 Received: from ozlabs.org ([203.11.71.1]:54973 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbeJJISX (ORCPT ); Wed, 10 Oct 2018 04:18:23 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 42VG1w0dGwz9sBk; Wed, 10 Oct 2018 11:58:44 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1539133124; bh=eNJ+qXTZO1bdO840NM4sNN7AbJ3oLaurTjaJO0cSD9U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gApRPLY/llAvAukWzg6dK55JUaNPTNWW5zNy1F1LiR9MffMwQHKrBUPCFJK0mhdKW rMV10A2aT/qbHdLfgBIFvVNaemGX7fe4gRyQ45gv+19tDEyK9nHG6ESi3yjDRJ21JP FBdMAhHABEt9rp3aMnYRjYotZqPwyaElglauv9Wk= Date: Wed, 10 Oct 2018 11:30:16 +1100 From: David Gibson To: Frank Rowand Cc: "AKASHI, Takahiro" , Rob Herring , Catalin Marinas , Will Deacon , David Howells , Vivek Goyal , Herbert Xu , David Miller , dyoung@redhat.com, Baoquan He , Arnd Bergmann , Martin Schwidefsky , Heiko Carstens , prudo@linux.ibm.com, Ard Biesheuvel , James Morse , bhsharma@redhat.com, kexec@lists.infradead.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org Subject: Re: [PATCH v15 06/16] of/fdt: add helper functions for handling properties Message-ID: <20181010003016.GH7004@umbus.fritz.box> References: <20180928064841.14117-1-takahiro.akashi@linaro.org> <20180928064841.14117-7-takahiro.akashi@linaro.org> <6a8d3ddb-c3bc-c044-4d6c-55e110d89e72@gmail.com> <20181005050627.GL32578@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="d3slIU+tL1lDaIh/" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --d3slIU+tL1lDaIh/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 09, 2018 at 11:02:29AM -0700, Frank Rowand wrote: > On 10/04/18 22:06, AKASHI, Takahiro wrote: [snip] > >>>> +int fdt_setprop_reg(void *fdt, int nodeoffset, const char *name, > >>>> + u64 addr, u64 size) > >>>> +{ > >>>> + int addr_cells, size_cells; > >> > >> unsigned > >=20 > > fdt_[address|size]_cell() returns an int. >=20 > I stand corrected. They take advantage of the fact that valid values > are in the range 0..4 and return a negative value for error. I'm not sure if the spec formally defines that these values will fit in a positive 'int'. But if addresses are 8GiB each, you're going to have much bigger problems putting it in a device tree than this function. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --d3slIU+tL1lDaIh/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlu9SBgACgkQbDjKyiDZ s5Joog/+Mp4GTHh8MV62ufe3LUp5dlUtwKaKypnCp0sN4DKEcqwzn/GHlv/FxZ1f 4FWaF/NOJQ3tvqHrX/uS9S2YNe0EILpEz4dllcVBi31MRwwP3XRsPriKSD1JLFFu MJSiNVztKYw91UwbOo6e2etdRlNytAfNz6BMiBCtZUlwxqlsB4svjNLifTeazhEk UuzPeekac6W4sSRqExSR/vX8jR8yl9S0VhftH83nDZrHyjwZYeLgW0o8iINHkUGJ YxvtyL6kEX7uMn1JtqPxHfBxZlKOLrxSasbziqJVvUwzAV9DU40Rp761YbjUlrkV zGAOswcB351l58jf3EQOVnmszeXK0ZeeyOABr0WD8z0VHt67sBL6gFkNcS8OLOjm KMTwAyRz99tmUW044RAJREY907NJGiO69MJyJzWn9JMyk+E/rWto8Q4AkrmNpzrz KsYuwymXIjFFKMdDdnfamf3YLjx86pa7Q5Tu8xmh1HEjrUaYwFqptaFpjDBAFRAR C5EY14p/ftKrl4O1LhqRDj2Xe0/+ZWeXPlCLlHYejNFqWBPlyE6ukrRLAg1TF0Sv cbyylJams/EaC2VIv6ztpyVf5T/fgPf49mXof67scxnmiMzgN9WhH6V8wKHCFZ4V 7ElFrHb4WK+YB6CY7U61SuVvpBJuwH8a0XBJoh1h+e9EdSm2UMM= =lNt5 -----END PGP SIGNATURE----- --d3slIU+tL1lDaIh/--