From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756733AbeAHL7R (ORCPT + 1 other); Mon, 8 Jan 2018 06:59:17 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:44200 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755966AbeAHL7Q (ORCPT ); Mon, 8 Jan 2018 06:59:16 -0500 Date: Mon, 8 Jan 2018 11:59:14 +0000 From: Mark Brown To: "Andrew F. Davis" Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] regcache: flat: Use cache element type in sizeof Message-ID: <20180108115914.GC11698@sirena.org.uk> References: <20180107232234.11064-1-afd@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uXxzq0nDebZQVNAZ" Content-Disposition: inline In-Reply-To: <20180107232234.11064-1-afd@ti.com> X-Cookie: We are what we are. User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: --uXxzq0nDebZQVNAZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jan 07, 2018 at 05:22:32PM -0600, Andrew F. Davis wrote: > A single cache element may not always be unsigned int, use a > cache element in sizeof over hard-coding its type. A cache element is *always* unsigned int. What you mean to say here is that this helps if in future someone changes the code to use a different type, it's not fixing a memory corruption problem that exists now which is what your commit message suggests. --uXxzq0nDebZQVNAZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlpTXREACgkQJNaLcl1U h9A8zwf9F0B79THY/3pwb9DfDhUSeR9deNx5Yjhy+30SDSXUahWYsg5d2eZEaE89 JoW0oITjooc6J1aKbprRLPjsWwv2hUKb8kRdxiVPHGENLBsN220ZtIHPz/UMlBjn 0biE1Uz4+giHBR8H90Bb5B/AFq/IpUSOxbYc5cpV0+QE6nbQ3VDv3AmGdCICl2D5 1yfWcuyLz2M5VWBivyavLty0QV7kafE+3rvjfpkReICXWAayHOP6IrVxIq8wsKmz dKD+4uydROmrAdZTqKK3YBsdO91cuO/Ide1w6kYhU2GcHcPv2n84ryk1qeH2bUr/ hDGpZ//cL4ycLOU/3oBsPb27M0kaRQ== =AW+Z -----END PGP SIGNATURE----- --uXxzq0nDebZQVNAZ--