From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162835AbcIZSO4 (ORCPT ); Mon, 26 Sep 2016 14:14:56 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:53635 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S941540AbcIZSOz (ORCPT ); Mon, 26 Sep 2016 14:14:55 -0400 From: Shaohua Li To: CC: , Tejun Heo Subject: [PATCH trival 2/2] lib: clean up put_cpu_var usage Date: Mon, 26 Sep 2016 11:14:51 -0700 Message-ID: <72587e0787a2eae132513e366f356ca03313303a.1474912742.git.shli@fb.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <1474c666552accf475fc809b3525892e1ae88bfa.1474912742.git.shli@fb.com> References: <1474c666552accf475fc809b3525892e1ae88bfa.1474912742.git.shli@fb.com> X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-26_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org put_cpu_var takes the percpu data, not the data returned from get_cpu_var. This doesn't change the behavior. Cc: Tejun Heo Signed-off-by: Shaohua Li --- lib/random32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/random32.c b/lib/random32.c index 69ed593..915982b 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -81,7 +81,7 @@ u32 prandom_u32(void) u32 res; res = prandom_u32_state(state); - put_cpu_var(state); + put_cpu_var(net_rand_state); return res; } @@ -128,7 +128,7 @@ void prandom_bytes(void *buf, size_t bytes) struct rnd_state *state = &get_cpu_var(net_rand_state); prandom_bytes_state(state, buf, bytes); - put_cpu_var(state); + put_cpu_var(net_rand_state); } EXPORT_SYMBOL(prandom_bytes); -- 2.9.3