Re: git: 175a584e501e - main - usb: dwc3: add <sys/mutex.h>

From: Joerg Wunsch <j_at_uriah.heep.sax.de>
Date: Wed, 08 Mar 2023 20:24:08 UTC
As Kyle Evans wrote:

> >     Commit 5e54bb1ea9e90 added USB_BUS_LOCK/USB_BUS_UNLOCK. They, in
> >     consequence, require mutexes so <sys/mutex.h> is needed.
> 
> Whoops, thanks!

You're welcome.

I'm just trying to compile a current kernel on a RockPi 4 (arm64), and
it broke.

While the reason for this one was rather obvious, the second breakage
though is more of a mystery to me:

sys/dev/dpaa2/dpaa2_mc.c fails to compile since LA_UNLOCKED is
undefined. This is aliased to MA_NOTOWNED in <sys/mutex.h>.

Sure, I can get it to compile by adding <sys/lock.h> to that file, but
I don't see why it could ever compile at all.  OTOH, wouldn't it make
sense that <sys/mutex.h> itself included <sys/lock.h>?

-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)