Re: [PATCH v2 2/2] soc: renesas: rcar-mfis: add hwspinlock support
Wolfram Sang <[email protected]>
| Newsgroups | org.kernel.vger.linux-renesas-soc |
|---|---|
| Message-ID | <aoLVWPw8jD5WxDmG@ninjato> |
Hi Geert, > Any specific reason this is not CCed to the hwspinlock maintainers/list? I relied on get_maintainers, but will manually override for v2. > > + /* hwspinlock private data */ > > + struct hwspinlock_device bank; > > Please document this member must be last, as it contains a flexible > array, which is not obvious to the casual reader. Yes, will do. If my hwspinlock cleanup plan is accepted, this VLA will luckily go away then. > > +#define MFISLCKR8_CH_OFS (MFISLCKR8 - 8 * sizeof(u32)) > > +#define hwlock_to_local_id(hwlock) ((hwlock) - &(hwlock)->bank->lock[0]) > > Perhaps move this to drivers/hwspinlock/hwspinlock_internal.h > for general use, and use it in the existing hwlock_to_id()? > > Or else, open-code "hwlock_to_id(lock) - hwlock->bank->base_id" below? Yes, putting the macro to a public header makes sense. But I really want to do this after my header cleanups are applied. So, I will go with your latter suggestion for now which, in deed, looks better. > The rest LGTM. Thank you!