From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934972AbeAHQ0B (ORCPT + 1 other); Mon, 8 Jan 2018 11:26:01 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:24639 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932481AbeAHQZ7 (ORCPT ); Mon, 8 Jan 2018 11:25:59 -0500 Subject: Re: [PATCH 1/3] regcache: flat: Use cache element type in sizeof To: Mark Brown CC: References: <20180107232234.11064-1-afd@ti.com> <20180108115914.GC11698@sirena.org.uk> From: "Andrew F. Davis" Message-ID: Date: Mon, 8 Jan 2018 10:25:57 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180108115914.GC11698@sirena.org.uk> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/08/2018 05:59 AM, Mark Brown wrote: > 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. > Right, will re-word.