Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

locking/atomic, crypto/nx: Remove redundant casts

Now that atomic64_read() returns s64 consistently, we don't need to
explicitly cast its return value. Drop the redundant casts.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: aou@eecs.berkeley.edu
Cc: arnd@arndb.de
Cc: bp@alien8.de
Cc: catalin.marinas@arm.com
Cc: davem@davemloft.net
Cc: fenghua.yu@intel.com
Cc: heiko.carstens@de.ibm.com
Cc: ink@jurassic.park.msu.ru
Cc: jhogan@kernel.org
Cc: linux@armlinux.org.uk
Cc: mattst88@gmail.com
Cc: mpe@ellerman.id.au
Cc: palmer@sifive.com
Cc: paul.burton@mips.com
Cc: paulus@samba.org
Cc: ralf@linux-mips.org
Cc: rth@twiddle.net
Cc: tony.luck@intel.com
Cc: vgupta@synopsys.com
Link: https://lkml.kernel.org/r/20190522132250.26499-18-mark.rutland@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Mark Rutland and committed by
Ingo Molnar
2af7a0f9 37249213

+3 -3
+3 -3
drivers/crypto/nx/nx-842-pseries.c
··· 857 857 local_devdata = rcu_dereference(devdata); \ 858 858 if (local_devdata) \ 859 859 p = snprintf(buf, PAGE_SIZE, "%lld\n", \ 860 - (s64)atomic64_read(&local_devdata->counters->_name)); \ 860 + atomic64_read(&local_devdata->counters->_name)); \ 861 861 rcu_read_unlock(); \ 862 862 return p; \ 863 863 } ··· 911 911 for (i = 0; i < (NX842_HIST_SLOTS - 2); i++) { 912 912 bytes = snprintf(p, bytes_remain, "%u-%uus:\t%lld\n", 913 913 i ? (2<<(i-1)) : 0, (2<<i)-1, 914 - (s64)atomic64_read(&times[i])); 914 + atomic64_read(&times[i])); 915 915 bytes_remain -= bytes; 916 916 p += bytes; 917 917 } ··· 919 919 * 2<<(NX842_HIST_SLOTS - 2) us */ 920 920 bytes = snprintf(p, bytes_remain, "%uus - :\t%lld\n", 921 921 2<<(NX842_HIST_SLOTS - 2), 922 - (s64)atomic64_read(&times[(NX842_HIST_SLOTS - 1)])); 922 + atomic64_read(&times[(NX842_HIST_SLOTS - 1)])); 923 923 p += bytes; 924 924 925 925 rcu_read_unlock();