From patchwork Mon Dec 24 02:13:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 1907811 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 56726DF25A for ; Mon, 24 Dec 2012 02:18:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752960Ab2LXCSq (ORCPT ); Sun, 23 Dec 2012 21:18:46 -0500 Received: from mail-da0-f42.google.com ([209.85.210.42]:38984 "EHLO mail-da0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752844Ab2LXCOx (ORCPT ); Sun, 23 Dec 2012 21:14:53 -0500 Received: by mail-da0-f42.google.com with SMTP id z17so2955297dal.29 for ; Sun, 23 Dec 2012 18:14:52 -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=robEjErej1VdCfwkrZVdalaxPoHB9tqb8PffbsKhGks=; b=letnRofJgX6Y6Gj0GxcJ11XSS12w0BArg09oa+dpzCSp6v6/jgyy6933RsZoxycPAs TGnE2tqmlMRFmNK+t5BGS0EPcOG4Q3ZmepndGWeZXV3msbC7xmVf/r9iRmuCpuu4X0Yl 7vV7CGO+zwrupuWDlzbGjdppC6pxAhPkU2DhTUDUhIrNr/G3rnIoengpXuzU4co0e2eu OwoPb5poLQJ3d7s+HIEUjrxd5CsDvZjCTjuo/1UXZw3t0UdCQl8WrNASpCEOtUgu7qVZ qO0fnz9IfcAAp4yqrzZ5vN6QXOYnq6jLqJ5sErbER+OIghmSl/L8DUaJqqTaV+mIp4np P8KA== X-Received: by 10.68.232.201 with SMTP id tq9mr62571652pbc.12.1356315292612; Sun, 23 Dec 2012 18:14:52 -0800 (PST) Received: from localhost.localdomain (p2126-ipbf3106hodogaya.kanagawa.ocn.ne.jp. [114.149.157.126]) by mx.google.com with ESMTPS id wr4sm11379909pbc.72.2012.12.23.18.14.50 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 23 Dec 2012 18:14:52 -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 10/29] mmc: rename random32() to prandom_u32() Date: Mon, 24 Dec 2012 11:13:57 +0900 Message-Id: <1356315256-6572-11-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1356315256-6572-1-git-send-email-akinobu.mita@gmail.com> References: <1356315256-6572-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 --- 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 aaed768..4b05da5 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 */