From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 24 Jul 2021 17:01:21 +0000 From: Al Viro Subject: Re: [PATCH] asm-generic: avoid sparse {get,put}_unaligned warning Message-ID: References: <20210724162429.394792-1-sven@narfation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210724162429.394792-1-sven@narfation.org> Sender: Al Viro List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sven Eckelmann Cc: Arnd Bergmann , b.a.t.m.a.n@lists.open-mesh.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org On Sat, Jul 24, 2021 at 06:24:29PM +0200, Sven Eckelmann wrote: > The special attribute force must be used in such statements when the cast > is known to be safe to avoid these warnings. How about container_of(ptr, typeof(*__pptr), x) instead of a cast? Would be easier to follow...