From patchwork Fri Oct 5 08:13:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 148149 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp151026lji; Fri, 5 Oct 2018 01:13:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62U/l6brmqGllndP+PnSwFEGkZs5/6uTthh9dbkMwRdQ5X8mTObbf8vZ95xeD5DkUWCOQss X-Received: by 2002:a63:f848:: with SMTP id v8-v6mr8970692pgj.82.1538727229410; Fri, 05 Oct 2018 01:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538727229; cv=none; d=google.com; s=arc-20160816; b=VgEtV3Sb35ib+20AbZtK68aZcpKW4sbLehAoPQcXuYVLJbQQabFjpZUbRDC31jeil5 ZEpAdvR1VRjqeKjSnqMUwwBcJALIRKL9WIsONg7GFpflUa1ukft2tCN83hGnHn8S3f7D AdezM5T8a9kGacme6HEi9rW+XM4SiKFjCBfecbRfQmEZHQcb3OHeM/uZpFSuwQXDr+MP 7AyfWDsUfEXSDr9d3fzMN6ULgPubyDM32tXmPOqHll0JhGcusXTgtA2FI8LywGLPxE0S 0HIa/ynCCyJxXepdb3Vd5sRgztPjHvuTEnwPQJ+ygCuCmCuXLpCscdjJPMdGBnsfVSaD zFWA== 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 v14-v6si7754716plo.208.2018.10.05.01.13.49; Fri, 05 Oct 2018 01:13:49 -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 S1728491AbeJEPLV (ORCPT + 32 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(-) -- 2.11.0 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);