Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp152418imm; Fri, 5 Oct 2018 01:14:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV61snQWMxUhFfAravp5cJyRvDl0n8NH9rUE3tmBESDWSXGHAHDT/KMI/ErQWs1bor/rEpZzJ X-Received: by 2002:a62:5b85:: with SMTP id p127-v6mr10736542pfb.33.1538727261769; Fri, 05 Oct 2018 01:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538727261; cv=none; d=google.com; s=arc-20160816; b=LqxCpksFSB2e1btxV0leOGiRzBINn8fzX36SexFEcXWX9EFfkJ2XqJAX57ha8RRCjK jLDPEUWUoSW5+R/jiGZbJu7k7QwnFT24cO86x5XjKuM/b6xC4WHs0tUaY3w1Wyq+64bg AyYFkxTPkuLF1H5WdgpUKyCHzBuQLPeMLjtV6o8i+saXPQq3NYtL2Q6U/MX63BjbNDu+ GfFjw1tEBhNkvFsewxBUnoS8hX3BxNxwSBMq1olE6JRQlT6Ggq4WojlS4uzBD9gBtg9y DDurSb0y2CxlGQYa+qBT+zxiqQY5/22jr/RhEqdBqCu6b1pU1MwM76qQXExb4HfLOFb5 GGQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=9pEAraO+w5FxZNKwOwU68gCXSvwsp2RrSj23yV0hAkg=; b=mjhR/SpHcTO/22rJ0yoh2yA6qugikzG9v9JvpwG4QFAA7AOUZ05SkVAhBtYOlybYy2 0kNGvrymxmpW88c4vSVvyH3CQGb+zmurRTccYluBtONOCD2nyYWCwqVMVDjN1Al6RcVS H+pyum/NNWgCFLfGhk/0lenaUGTmJ5kl1R9pentIuQAAJvfc29SrwiIgmXfc1Z6QRi1r 5nsJEAajZxviMWkMZBAbq69CkUMvalMFgZJ3Kbh/p1w78WXhMN/Yn207CqUf2zlxda7q FUZckXwhZAkJTY5T07n0MsnUdl8Z6KjgzxnX55I+tOGDlFPjzRF7xNyvAf/sq2pb34k/ yh2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e+cypP9O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a2-v6si2864174pgc.573.2018.10.05.01.14.05; Fri, 05 Oct 2018 01:14:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e+cypP9O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728483AbeJEPLV (ORCPT + 99 others); Fri, 5 Oct 2018 11:11:21 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:36442 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728200AbeJEPLU (ORCPT ); Fri, 5 Oct 2018 11:11:20 -0400 Received: by mail-wr1-f66.google.com with SMTP id y16so12578534wrw.3 for ; Fri, 05 Oct 2018 01:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9pEAraO+w5FxZNKwOwU68gCXSvwsp2RrSj23yV0hAkg=; b=e+cypP9O6uanr3tyDWz0c6akRdpCzHEznDk/UGqdh0XmBEz5LaG5BHA8TQpA89x4OX 1yb2GPuTj7EKXgJXcoo8GSSuT10ecGI2deQSCUBfSElkNv+n92lTnZFWQxHmqCgl4FEe ouWG6NoD/o9bqb2rorXsdLVQB0OmZTM4XGPlM= 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:in-reply-to :references; bh=9pEAraO+w5FxZNKwOwU68gCXSvwsp2RrSj23yV0hAkg=; b=Ln62Z9yIE4QMGbmj3gtbmQEyoQ9sDcRS65rWz8CMIrdcXgzAgsyShlU+WcK3AwGie+ rCpuOUc+/2TwSsvH2X+Uh4S13UaAVfGdgmgOQC/LrcLxUxsPG43I/f3bQQmbem8vFFzp 81fDgf8DvqysjjvK/wTdbBaZfIqc0XkgDT3LBuYP3anZjM8myBMUZc2L5v5mZQKSSJLE 74WvEDjaT3h/UEv/86KQQTqOcaFzIrWjhWvTbYnB5St0M1AL31T8d2Mkb/4RR7wYnzzF p4NTcZq+sR5MFv4SE3tMKXhsbVcxiG2wCE13ViaVXvV5mhCtl08N+zlZPpq2sHDfgJlN NKMA== X-Gm-Message-State: ABuFfoietSWkFIbTeUf+GYbV9B3FSw2qPAb/94IhmC2JEFJ7RRQpWO1c rjjujdH2JUCQGdZI6/ejIzmSkwJYt64= X-Received: by 2002:a5d:610a:: with SMTP id v10-v6mr1391403wrt.308.1538727223269; Fri, 05 Oct 2018 01:13:43 -0700 (PDT) Received: from localhost.localdomain ([2a01:cb1d:112:6f00:697e:67d9:a05d:22c7]) by smtp.gmail.com with ESMTPSA id t4-v6sm6565620wrb.45.2018.10.05.01.13.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 01:13:42 -0700 (PDT) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org Cc: Ard Biesheuvel , "Jason A . Donenfeld" , Eric Biggers , Samuel Neves , Andy Lutomirski , Arnd Bergmann , Herbert Xu , "David S. Miller" , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Thomas Gleixner , Ingo Molnar , Kees Cook , "Martin K. Petersen" , Greg Kroah-Hartman , Andrew Morton , Richard Weinberger , Peter Zijlstra , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH 3/9] crypto: crc-t10dif - make crc_t10dif a static inline Date: Fri, 5 Oct 2018 10:13:27 +0200 Message-Id: <20181005081333.15018-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181005081333.15018-1-ard.biesheuvel@linaro.org> References: <20181005081333.15018-1-ard.biesheuvel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org crc_t10dif() is a trivial wrapper around crc_t10dif_update() so move it into the header file as a static inline function. Signed-off-by: Ard Biesheuvel --- include/linux/crc-t10dif.h | 6 +++++- lib/crc-t10dif.c | 6 ------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/linux/crc-t10dif.h b/include/linux/crc-t10dif.h index 6bb0c0bf357b..4dfe09ff4cf2 100644 --- a/include/linux/crc-t10dif.h +++ b/include/linux/crc-t10dif.h @@ -10,7 +10,11 @@ extern __u16 crc_t10dif_generic(__u16 crc, const unsigned char *buffer, size_t len); -extern __u16 crc_t10dif(unsigned char const *, size_t); extern __u16 crc_t10dif_update(__u16 crc, unsigned char const *, size_t); +static inline __u16 crc_t10dif(const unsigned char *buffer, size_t len) +{ + return crc_t10dif_update(0, buffer, len); +} + #endif diff --git a/lib/crc-t10dif.c b/lib/crc-t10dif.c index 4d0d47c1ffbd..036ee664c9e1 100644 --- a/lib/crc-t10dif.c +++ b/lib/crc-t10dif.c @@ -81,12 +81,6 @@ __u16 crc_t10dif_update(__u16 crc, const unsigned char *buffer, size_t len) } EXPORT_SYMBOL(crc_t10dif_update); -__u16 crc_t10dif(const unsigned char *buffer, size_t len) -{ - return crc_t10dif_update(0, buffer, len); -} -EXPORT_SYMBOL(crc_t10dif); - static int __init crc_t10dif_mod_init(void) { crypto_register_notifier(&crc_t10dif_nb); -- 2.11.0