From patchwork Tue May 9 08:32:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9717307 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B12C560237 for ; Tue, 9 May 2017 08:35:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A560A26E5D for ; Tue, 9 May 2017 08:35:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99F5927F82; Tue, 9 May 2017 08:35:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5367926E5D for ; Tue, 9 May 2017 08:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752667AbdEIIet (ORCPT ); Tue, 9 May 2017 04:34:49 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33556 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752616AbdEIIeo (ORCPT ); Tue, 9 May 2017 04:34:44 -0400 Received: by mail-wm0-f66.google.com with SMTP id y10so20879592wmh.0; Tue, 09 May 2017 01:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=J9/1V6rAlnEF7y4JVR4a+0M7n6RuSobu06vZvrjck2k=; b=PcnsoAmFexevOHf3Rr2u8CaTii5msnigQrRenk7YFUCPoEnGPRbBr5MAs6BbqVqO9X DW39jqRwcb6iS46kKTQ01zEtO28rjq0r7tj6HhhA1N3jRWcgi5v/qe2WzTFJAIIoX7LF ubBkd93EQwZqmk5inpq2j7eXAW1zP8vEG7S5RIacS6Shl6iI3IklCsNBt9E5CqMRW7qL eYmjhg342bxbRbcNo9lkH4XnKXv/5uJWSbVqFJoim07oucYqy0sWoVJ7Pe66vmTfebXR YRU5kKzxmiQQFc/b0z0FJzgIufNle52AFJJXaSHjrKTrxKaMTihH7cbsDy0M2dDEms0A G+Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=J9/1V6rAlnEF7y4JVR4a+0M7n6RuSobu06vZvrjck2k=; b=oXibICMsS3PQkr/9AyLzPCpoMAUhr1YERWem+SQjYW3+GRw5EuXPb4ec7xmia84Psk q1dm8xqGzr71ZLQjWpzP0L5FcgDV36aC+tnElhxoT7ACCs2S7e1EtLX+Y9e9oTZqKk67 glizogDZRKx9iyNBlFbC6GEne0C2kPNbAs/VvYAuxNZfIMbBUbfuWibrdRUgzRE0DpFh gTN2gPBFxKF392y1pPfy3AmnhokB4DazVKhQK7VL8CnMsTHVnzcMdLGNM6uHqMDYhiaY ZeK9b7XIRxhjYHH0H67Rf8T8K97lzJscVrNaCtEpOOrChY0mTWNDMx0WFV81ob91zsvS Re2g== X-Gm-Message-State: AODbwcCUN5MTc0QGPAMKG6hgO7NDHABdmj/tip/hLEqrZBAM4qNETSpe /qiBb5F3LzZ/Hg== X-Received: by 10.28.180.196 with SMTP id d187mr220707wmf.137.1494318877924; Tue, 09 May 2017 01:34:37 -0700 (PDT) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id k22sm15291108wrc.12.2017.05.09.01.34.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 May 2017 01:34:37 -0700 (PDT) From: Corentin Labbe To: nhorman@tuxdriver.com, herbert@gondor.apana.org.au, davem@davemloft.net Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH] crypto: rng - move __crypto_rng_cast to the rng header Date: Tue, 9 May 2017 10:32:22 +0200 Message-Id: <20170509083222.1100-1-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch move __crypto_rng_cast() to the right header like other __algo_cast functions. Signed-off-by: Corentin Labbe --- crypto/rng.c | 5 ----- include/crypto/rng.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crypto/rng.c b/crypto/rng.c index f46dac5..5e84692 100644 --- a/crypto/rng.c +++ b/crypto/rng.c @@ -33,11 +33,6 @@ struct crypto_rng *crypto_default_rng; EXPORT_SYMBOL_GPL(crypto_default_rng); static int crypto_default_rng_refcnt; -static inline struct crypto_rng *__crypto_rng_cast(struct crypto_tfm *tfm) -{ - return container_of(tfm, struct crypto_rng, base); -} - int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) { u8 *buf = NULL; diff --git a/include/crypto/rng.h b/include/crypto/rng.h index b95ede3..4281193 100644 --- a/include/crypto/rng.h +++ b/include/crypto/rng.h @@ -197,4 +197,9 @@ static inline int crypto_rng_seedsize(struct crypto_rng *tfm) return crypto_rng_alg(tfm)->seedsize; } +static inline struct crypto_rng *__crypto_rng_cast(struct crypto_tfm *tfm) +{ + return container_of(tfm, struct crypto_rng, base); +} + #endif