From patchwork Sat Sep 12 23:19:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 7167641 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 99B0BBEEC1 for ; Sat, 12 Sep 2015 23:20:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D52F2206AA for ; Sat, 12 Sep 2015 23:20:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 030AC20855 for ; Sat, 12 Sep 2015 23:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754642AbbILXUb (ORCPT ); Sat, 12 Sep 2015 19:20:31 -0400 Received: from mail-yk0-f179.google.com ([209.85.160.179]:32817 "EHLO mail-yk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755563AbbILXU3 (ORCPT ); Sat, 12 Sep 2015 19:20:29 -0400 Received: by ykei199 with SMTP id i199so123312507yke.0 for ; Sat, 12 Sep 2015 16:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=onpeyvQEFNdwRPRrGR7igfsoXvetUwk2PQ7wkDS/gtw=; b=SApU+CGMOXwuzgvd6XvIoK2RG38GPFwBNr6A8W3rvKNcdXpV/P9sG7bONbMy4caEnJ w7EXQYE9EsyfBna0iHnVqJoRUqBXYDRJbWoWracWx4d2cUCMFIlpavjx7kN5/H4stvgy +WgnEdTTwwK6cTNOF6CfrR2+d7tFuVOkgKXI5/q55EbFjeaaXH+efLSnDkS6GUHYPyId 5PVTglQj1H41AuTc0+2up3zRiFrJyJzaXhaY9qPfKy4QEtYIVJOMdwz3/8rVLHR3DMbB 95JdlW75g+Gohu3txQ6MkpNJygKV4k23vGpcerMexm1F52lmxINglRk7tkBflDLJjtHj 875A== X-Received: by 10.170.144.215 with SMTP id l206mr6285329ykc.21.1442100028784; Sat, 12 Sep 2015 16:20:28 -0700 (PDT) Received: from localhost.localdomain ([179.159.191.85]) by smtp.gmail.com with ESMTPSA id h131sm4671183ywb.10.2015.09.12.16.20.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Sep 2015 16:20:28 -0700 (PDT) From: Fabio Estevam To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, Fabio Estevam Subject: [PATCH 4/4] hwrng: mxc-rnga - Use the preferred format for kzalloc Date: Sat, 12 Sep 2015 20:19:53 -0300 Message-Id: <1442099993-29449-4-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442099993-29449-1-git-send-email-festevam@gmail.com> References: <1442099993-29449-1-git-send-email-festevam@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam According to Documentation/CodingStyle: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...);" ,so do as suggested. Signed-off-by: Fabio Estevam --- drivers/char/hw_random/mxc-rnga.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c index ed2e3ef..4673622 100644 --- a/drivers/char/hw_random/mxc-rnga.c +++ b/drivers/char/hw_random/mxc-rnga.c @@ -145,8 +145,7 @@ static int __init mxc_rnga_probe(struct platform_device *pdev) struct resource *res; struct mxc_rng *mxc_rng; - mxc_rng = devm_kzalloc(&pdev->dev, sizeof(struct mxc_rng), - GFP_KERNEL); + mxc_rng = devm_kzalloc(&pdev->dev, sizeof(*mxc_rng), GFP_KERNEL); if (!mxc_rng) return -ENOMEM;