From patchwork Tue Apr 4 21:43:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 9662611 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 2B697602B9 for ; Tue, 4 Apr 2017 21:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DBF42857B for ; Tue, 4 Apr 2017 21:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 129762859A; Tue, 4 Apr 2017 21:44:10 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham 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 99AC12857B for ; Tue, 4 Apr 2017 21:44:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754626AbdDDVoJ (ORCPT ); Tue, 4 Apr 2017 17:44:09 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35970 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754251AbdDDVoI (ORCPT ); Tue, 4 Apr 2017 17:44:08 -0400 Received: by mail-pf0-f194.google.com with SMTP id r137so6515462pfr.3; Tue, 04 Apr 2017 14:44:08 -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=BV+TsZ7vb+SFPQuLI9lYF2T+PkKkdPncoKvItPnX5RE=; b=hHSo3/71QF6oEgl2sNNzrLMlsapDPIc6av0YYSGX59KmLa6iDD3D9YVek4Bln56IoC 31EKxTq2KCkTV7rdkk8aAgmT9F1WL1Hg3/63hJKU3tO9l2zVlp9uf47QcgF2KCjtQQ48 giRJLnVcGNDuzxBOyk1OxwY+49eU2wOX+RVGMDfcMsBM6OOQR8X8vg0ZuF2bvYCjMpU7 8qgw9QNtKE+2ZuH7KhL5P2AGyq+Z8BeQFxDIfTj60JraCC8WbVbkL/f9JZAwD/qUJlB2 XsqG8VI6RfuMrQRgZwcIda6yPZKv1r4z0L5rBAwBtt2FX6yywFnucAC+3gex9KXyFb52 eF1A== 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=BV+TsZ7vb+SFPQuLI9lYF2T+PkKkdPncoKvItPnX5RE=; b=a5U30wbq3qYkDpaiT4RvoprnTqHjsH9HGn/OjRgekfoojysFumuTh3oyW5hcxbS/qh 9TijKCzVvAloM0TIZN/tARWmNa6lyesf3CVEXEtEZErzDaINekziKscPH5Y/q76RXAMQ BsuMylhWyD7y2M0skYQnCEU8Y+NlXhZWtWBcWnG5jM2pQxuQCLoIQvj19HgaiWv/7WFB i/dRSkVxbEFAmxwoquS2ybcj3i1My5E36P2FlvYfOgQOujgxUeIxdJNgK1v4f4xZZ3au c6aEteTbwPbpyinpmdY293RZpohmT+n8vBCtPE8Y8lwFAE9ZgagvVExfb495/O2UPTJ9 SDZA== X-Gm-Message-State: AFeK/H2CiVO7QQMnkMOMxxeUZDlN3tHqcPOv1M8ca6baxDUyuwXiBaMA+Ccb5vFDef/pxQ== X-Received: by 10.98.196.142 with SMTP id h14mr24941145pfk.265.1491342247742; Tue, 04 Apr 2017 14:44:07 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([100.119.30.131]) by smtp.gmail.com with ESMTPSA id q64sm33467165pfi.69.2017.04.04.14.44.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Apr 2017 14:44:07 -0700 (PDT) From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, "Theodore Y . Ts'o" , Jaegeuk Kim , Eric Biggers Subject: [PATCH] fscrypt: remove fscrypt_symlink_data_len() Date: Tue, 4 Apr 2017 14:43:34 -0700 Message-Id: <20170404214334.113915-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.12.2.715.g7642488e1d-goog Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers fscrypt_symlink_data_len() is never called and can be removed. Signed-off-by: Eric Biggers Reviewed-by: Richard Weinberger --- include/linux/fscrypt_common.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/include/linux/fscrypt_common.h b/include/linux/fscrypt_common.h index 10c1abfbac6c..0a30c106c1e5 100644 --- a/include/linux/fscrypt_common.h +++ b/include/linux/fscrypt_common.h @@ -46,17 +46,6 @@ struct fscrypt_symlink_data { char encrypted_path[1]; } __packed; -/** - * This function is used to calculate the disk space required to - * store a filename of length l in encrypted symlink format. - */ -static inline u32 fscrypt_symlink_data_len(u32 l) -{ - if (l < FS_CRYPTO_BLOCK_SIZE) - l = FS_CRYPTO_BLOCK_SIZE; - return (l + sizeof(struct fscrypt_symlink_data) - 1); -} - struct fscrypt_str { unsigned char *name; u32 len;