Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1798067imm; Sat, 30 Jun 2018 04:36:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpffgqr07i5lGRdtOk4Ec5OOdsBfm3sMzP3trc11SwxDsmzPFfiivhtojLCeHOSYKmZRTAF8 X-Received: by 2002:a17:902:18a:: with SMTP id b10-v6mr6807970plb.62.1530358613840; Sat, 30 Jun 2018 04:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530358613; cv=none; d=google.com; s=arc-20160816; b=WkGo38/bjfZFV/dR86ODP/3+3XSaxI4G2mFdGf5SlOgGt3MxKBREeR6F50NiV6Mz5C TVAm5f2nQYTKnZmk8kUSB45gu9/OZ76Lc15pyEiv3yYtqNu+axrYc+6e6KePFDzsxiiS kU42+40cV97UmkQV2JQHy0TrMm6v1e0JiHJpPRi6rquPOUyHeTMKA9jCWVpU3hzoM76r GeMY7GwgXccPTKPQYlnf00Ey8bDl1JxJ1TZSp3adqwFSramWnEov7r1DdPpkX/HvJq/j fwZVaQBWk0SObBeTHpvPrndxHQrFIausyoSpHrL/5YVAjqPFsbV+0Z4WsKyQqQHFyQRh T6fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=Ru0ZKh0a3gdDJ/adFJkkXd4/R5PEjriYtaeqkOjB5+4=; b=0LuDLvV7IIvtJKY6PbRkRij0R8fpTypVF4ri/JWRjknxpf4OC9sY960SlvadnXbko4 PklWvzZFmKzSUzYHz5foA4c8RITAPWSahsbtihQkGATza4GfaAfHNTwJB768jqeumEva HWKq1cQeaMe8nFOfLkFRKhtA89LMbWu+6ZHe4LTBQ4+3/cyjkPV4xw34rdR5VA/gIndG dVcSUbJfBPpXb4zUmD05Jr+gRCvLkPbGY0zUNnnnTQkLXJRCdEQuQ95LwUFYuwnp4rRu 6I8wB+lA1pwXBjv9qDrXLX409j9iLm93Em2pi611BDQlwIpn74+97mRHlk6/7+N1sWfo gUJw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9-v6si10169084pgf.638.2018.06.30.04.36.39; Sat, 30 Jun 2018 04:36:53 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030373AbeF3LbC (ORCPT + 99 others); Sat, 30 Jun 2018 07:31:02 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:59511 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936139AbeF3La6 (ORCPT ); Sat, 30 Jun 2018 07:30:58 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fZE5a-0002b8-1X; Sat, 30 Jun 2018 11:30:50 +0000 From: Colin King To: Herbert Xu , "David S . Miller" , Jan Glauber , Robert Richter , linux-crypto@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: zip: make several functions static Date: Sat, 30 Jun 2018 12:30:49 +0100 Message-Id: <20180630113049.4402-1-colin.king@canonical.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The functions zip_ctx_exit, zip_compress, zip_decompress and zip_ctx_init are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'zip_ctx_exit' was not declared. Should it be static? symbol 'zip_compress' was not declared. Should it be static? symbol 'zip_decompress' was not declared. Should it be static? symbol 'zip_ctx_init' was not declared. Should it be static? Signed-off-by: Colin Ian King --- drivers/crypto/cavium/zip/zip_crypto.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/cavium/zip/zip_crypto.c b/drivers/crypto/cavium/zip/zip_crypto.c index b92b6e7e100f..f9e99a15d2a0 100644 --- a/drivers/crypto/cavium/zip/zip_crypto.c +++ b/drivers/crypto/cavium/zip/zip_crypto.c @@ -69,7 +69,7 @@ static void zip_static_init_zip_ops(struct zip_operation *zip_ops, zip_ops->csum = 1; /* Adler checksum desired */ } -int zip_ctx_init(struct zip_kernel_ctx *zip_ctx, int lzs_flag) +static int zip_ctx_init(struct zip_kernel_ctx *zip_ctx, int lzs_flag) { struct zip_operation *comp_ctx = &zip_ctx->zip_comp; struct zip_operation *decomp_ctx = &zip_ctx->zip_decomp; @@ -107,7 +107,7 @@ int zip_ctx_init(struct zip_kernel_ctx *zip_ctx, int lzs_flag) return -ENOMEM; } -void zip_ctx_exit(struct zip_kernel_ctx *zip_ctx) +static void zip_ctx_exit(struct zip_kernel_ctx *zip_ctx) { struct zip_operation *comp_ctx = &zip_ctx->zip_comp; struct zip_operation *dec_ctx = &zip_ctx->zip_decomp; @@ -119,9 +119,9 @@ void zip_ctx_exit(struct zip_kernel_ctx *zip_ctx) zip_data_buf_free(dec_ctx->output, MAX_OUTPUT_BUFFER_SIZE); } -int zip_compress(const u8 *src, unsigned int slen, - u8 *dst, unsigned int *dlen, - struct zip_kernel_ctx *zip_ctx) +static int zip_compress(const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen, + struct zip_kernel_ctx *zip_ctx) { struct zip_operation *zip_ops = NULL; struct zip_state *zip_state; @@ -155,9 +155,9 @@ int zip_compress(const u8 *src, unsigned int slen, return ret; } -int zip_decompress(const u8 *src, unsigned int slen, - u8 *dst, unsigned int *dlen, - struct zip_kernel_ctx *zip_ctx) +static int zip_decompress(const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen, + struct zip_kernel_ctx *zip_ctx) { struct zip_operation *zip_ops = NULL; struct zip_state *zip_state; -- 2.17.1