From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from polaris.svanheule.net (polaris.svanheule.net [84.16.241.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E76F016CD33 for ; Thu, 9 Jan 2025 18:04:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=84.16.241.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736445876; cv=none; b=aO848TsDC3lqKU4ZZp1+JHUZDgp5b4Q1fmXeF+ccZkQsJSp7hHhLMNwbf6Yq29fmpNGAFzyRZ7EE0FpwiAf4GbqbMDvV8Bc+YM/eNMs28kUp+SME6QoDZReR159BOlE7dTySyaatP6BVlyxVkKFRULu6wYBUccTy+i1B8/8bBYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736445876; c=relaxed/simple; bh=gHix1USmPRA9HuUDnSkugSoBUUceY2mj+zzzKVZDk/E=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=mAlp45QtaBGVVhd6w400d/yGT9dBT7uhTFMIsTXkAYav2iv9eDre8P0g6fowDsiJrVn4RyIBJXDjjAM+FQN0N6xwgFcorj2nNAxYd9Y5PjDZ9jUr2PUaWEKt08sNTy8BoGr1p1xa/27B2g6QX5Teo68eoV8mcwBApR+jssEWQmU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=svanheule.net; spf=pass smtp.mailfrom=svanheule.net; dkim=pass (2048-bit key) header.d=svanheule.net header.i=@svanheule.net header.b=9XSsBr5q; arc=none smtp.client-ip=84.16.241.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=svanheule.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=svanheule.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=svanheule.net header.i=@svanheule.net header.b="9XSsBr5q" Received: from [192.168.90.187] (unknown [94.110.49.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sander@svanheule.net) by polaris.svanheule.net (Postfix) with ESMTPSA id 1A02A59B3F7; Thu, 9 Jan 2025 19:04:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1736445873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+zMNWArd5aOYkT+9rZD+uRRSUSOH0j1aKWvY0zQ8MxQ=; b=9XSsBr5qBItitwuDqTujaxep9T03cR8C4UjpqWq9g2P0w96X97w5wn4TaGKcAZCL+0XNbR Jh5DkdLj76/JPtea+QPHGNDVbJgl1xMhA+zRL/QEcji+8DhYeBF/jtahHACwhnTze6gaHR Bf9022nvAEpXp0lelieUPRFQEUX2jCCAvmcX27flHBuUhghzt3av4w82VNM02ugM1BHK2G ck6cgCsr+mPoJSG9jzOY9jMOYFmLHBTexXo+Nt4R25t8P8uMT14be4lAmEb8UcivrzBiFr xt+L8fnGGrOK90ylEHAWrpbDJPr7ORc0bIm24eDvkGB7fZl6Ar+W6nFJhnZGeQ== Message-ID: <8954ed9d37a3e8a4e44471ceb5f2c262f4fdcc38.camel@svanheule.net> Subject: Re: [PATCH v2] regmap: add cache validity to REGCACHE_FLAT From: Sander Vanheule To: Mark Brown Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Date: Thu, 09 Jan 2025 19:04:32 +0100 In-Reply-To: <25a56461-88f6-4885-82c0-364b8d1d8e83@sirena.org.uk> References: <20250109151106.38645-1-sander@svanheule.net> <25a56461-88f6-4885-82c0-364b8d1d8e83@sirena.org.uk> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 (3.54.2-1.fc41) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi Mark, On Thu, 2025-01-09 at 16:48 +0000, Mark Brown wrote: > On Thu, Jan 09, 2025 at 04:11:05PM +0100, Sander Vanheule wrote: >=20 > > +static int regcache_flat_drop(struct regmap *map, unsigned int min, > > + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unsigned int max) > > +{ > > + struct regcache_flat_data *cache =3D map->cache; > > + unsigned int bitmap_min =3D regcache_flat_get_index(map, min); > > + unsigned int bitmap_max =3D regcache_flat_get_index(map, max); > > + > > + bitmap_clear(cache->valid, index_min, bitmap_max + 1 - bitmap_min); >=20 > This doesn't build: >=20 > /build/stage/linux/drivers/base/regmap/regcache-flat.c: In function > =E2=80=98regcache_flat_drop=E2=80=99: > /build/stage/linux/drivers/base/regmap/regcache-flat.c:120:36: error: =E2= =80=98index_min=E2=80=99 > undeclared (first use in this function) > =C2=A0 120 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bitmap_clear= (cache->valid, index_min, bitmap_max + 1 - bitmap_min); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 ^~~~~~~~~ > /build/stage/linux/drivers/base/regmap/regcache-flat.c:120:36: note: each= undeclared > identifier is reported only once for each function it appears in My apologies., I should have been paying more attention. I've sent a v3 tha= t fixes this. Best, Sander