lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <100fd0de-2c7c-cbec-ac99-ea3a4aff383b@infradead.org> Date: Sun, 1 Apr 2018 16:10:52 -0700 From: Randy Dunlap <rdunlap@...radead.org> To: David Howells <dhowells@...hat.com>, linux-kernel@...r.kernel.org Subject: Re: [PATCH 38/45] C++: mutex_trylock_recursive_enum() int->enum On 04/01/2018 01:44 PM, David Howells wrote: > Make mutex_trylock_recursive_enum() cast the int it derives to the enum > return type. > > Signed-off-by: David Howells <dhowells@...hat.com> > --- > > include/linux/mutex.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/linux/mutex.h b/include/linux/mutex.h > index cb3bbed4e633..2bacc5065980 100644 > --- a/include/linux/mutex.h > +++ b/include/linux/mutex.h > @@ -224,13 +224,14 @@ enum mutex_trylock_recursive_enum { > * - MUTEX_TRYLOCK_SUCCESS - lock acquired, > * - MUTEX_TRYLOCK_RECURSIVE - we already owned the lock. > */ > -static inline /* __deprecated */ __must_check enum mutex_trylock_recursive_enum > +static inline /* __deprecated */ __must_check > +enum mutex_trylock_recursive_enum nak that change from 1 to 2 lines. It's only 79 characters. > mutex_trylock_recursive(struct mutex *lock) > { > if (unlikely(__mutex_owner(lock) == current)) > return MUTEX_TRYLOCK_RECURSIVE; > > - return mutex_trylock(lock); > + return (enum mutex_trylock_recursive_enum)mutex_trylock(lock); > } > > #endif /* __LINUX_MUTEX_H */ > -- ~Randy
Powered by blists - more mailing lists