From patchwork Mon Mar 4 12:58:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 2212611 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 822984006E for ; Mon, 4 Mar 2013 13:03:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758050Ab3CDNDp (ORCPT ); Mon, 4 Mar 2013 08:03:45 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:43443 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757787Ab3CDM70 (ORCPT ); Mon, 4 Mar 2013 07:59:26 -0500 Received: by mail-pa0-f44.google.com with SMTP id kp1so3160893pab.17 for ; Mon, 04 Mar 2013 04:59:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=LidkKagNB5MaOMcKSRuGcqOh8ZKqdTTuzqei1JwPVtg=; b=d92SZhBaS9GQKSh6YMdeSA5EEWq2SLjyT9N5hmNZ8X5oEjV5LN6DUxrq7nvoipVyrG jzwQfw1exq9M4bqZsTEGli/TQpQHjqSQFMcfRs31dNswMtONmP0xd2MfAyMtjxtkLyU0 cCJ+eBSv11dFDqIXUQU5bF35oF+Oj7ZrnmmipbYCu+KcIx4DeP0Trnj1el+IIZWMl6O6 wBmg0nahucsXamMwXDHhQqekuIaaLhkUmVlSc12yCPEHuSvDWtqGVSSDkYmm1HHk8N+h mfrFLWZZInONOheZbos07w1EIHaMv8fJP68WSCBWzQITPTQkjkkUSTmdfMJnwT0cv+M1 cqxA== X-Received: by 10.68.11.35 with SMTP id n3mr27818980pbb.220.1362401966240; Mon, 04 Mar 2013 04:59:26 -0800 (PST) Received: from localhost.localdomain (p2126-ipbf3106hodogaya.kanagawa.ocn.ne.jp. [114.149.157.126]) by mx.google.com with ESMTPS id t6sm23836060paz.11.2013.03.04.04.59.23 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 04:59:25 -0800 (PST) From: Akinobu Mita To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org Cc: Akinobu Mita , Chris Ball , linux-mmc@vger.kernel.org Subject: [PATCH -v3 10/23] mmc: rename random32() to prandom_u32() Date: Mon, 4 Mar 2013 21:58:18 +0900 Message-Id: <1362401911-14074-11-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1362401911-14074-1-git-send-email-akinobu.mita@gmail.com> References: <1362401911-14074-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Use more preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita Cc: Chris Ball Cc: linux-mmc@vger.kernel.org --- No change from v2 drivers/mmc/core/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 08a3cf2..9290bb5 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -120,8 +120,8 @@ static void mmc_should_fail_request(struct mmc_host *host, !should_fail(&host->fail_mmc_request, data->blksz * data->blocks)) return; - data->error = data_errors[random32() % ARRAY_SIZE(data_errors)]; - data->bytes_xfered = (random32() % (data->bytes_xfered >> 9)) << 9; + data->error = data_errors[prandom_u32() % ARRAY_SIZE(data_errors)]; + data->bytes_xfered = (prandom_u32() % (data->bytes_xfered >> 9)) << 9; } #else /* CONFIG_FAIL_MMC_REQUEST */