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: 979355 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42RN6v38bLz9s1c for ; Fri, 5 Oct 2018 18:23:03 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="e+cypP9O"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42RN6v1VglzDqBy for ; Fri, 5 Oct 2018 18:23:03 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="e+cypP9O"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::443; helo=mail-wr1-x443.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="e+cypP9O"; dkim-atps=neutral Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42RMwB0L8VzF3JY for ; Fri, 5 Oct 2018 18:13:45 +1000 (AEST) Received: by mail-wr1-x443.google.com with SMTP id d2-v6so8139291wro.7 for ; Fri, 05 Oct 2018 01:13:45 -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=p+q0dp4xQI1+qoZo3WkuGpFdBtbgH811C7Gmbz27+YvyVHLVsHB2tlGQxPk46dlfzn FKCJv8s1caqDmvKhHRJtd1LWab9FT3N0qpfNMTpPUGNcv3z8enwjLV57OAWOA/cGboFR WkGrMeRrfzDTbd8DAwODhqgqnwj0xRzshZBdTUGFsMXti8CjJIn3A2F47V/ifC/XkYtV rPeVmy3Z+aT53UIvuSugtHok8EZc5LzTd2adfZRkyrM0zl8O7pSVNxfNY5tb/4OJwx03 Cu43MNxypit1/5ql012pzjFo5YBlFLq9aIH4Y1Qw61yhsDvmAoHfK2gshrYoUAj+c3mF HEyg== X-Gm-Message-State: ABuFfogO7CkhfxGuzCgdYN5lnPXX9r0FdybBlxGFkDqloOUbOohCKzB3 rzI+uMwoDtnkFCyJTzewDa6dTg== X-Google-Smtp-Source: ACcGV62ntJ9ibv6XTTbuRRc5lV5zur1H0clIqrdCTZXin3xHDioy7KJrXqpRM0YbS2pFQWeCAQb7kA== 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 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> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Jason A . Donenfeld" , Peter Zijlstra , Catalin Marinas , Will Deacon , Samuel Neves , Paul Mackerras , Herbert Xu , Richard Weinberger , Eric Biggers , Ingo Molnar , Kees Cook , Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, "Martin K. Petersen" , Ard Biesheuvel , Greg Kroah-Hartman , linux-crypto@vger.kernel.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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);