From patchwork Wed Aug 9 10:02:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiu Jianfeng X-Patchwork-Id: 13347319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57B7AC001DB for ; Wed, 9 Aug 2023 02:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229537AbjHICCx (ORCPT ); Tue, 8 Aug 2023 22:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjHICCx (ORCPT ); Tue, 8 Aug 2023 22:02:53 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4667F1BCE for ; Tue, 8 Aug 2023 19:02:52 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4RLCxg5jfvz4f3pFh for ; Wed, 9 Aug 2023 10:02:47 +0800 (CST) Received: from huaweicloud.com (unknown [10.67.174.26]) by APP4 (Coremail) with SMTP id gCh0CgD3hqnH89Jk6rUUAQ--.53787S4; Wed, 09 Aug 2023 10:02:48 +0800 (CST) From: Xiu Jianfeng To: john.johansen@canonical.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, terrelln@fb.com Cc: apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, xiujianfeng@huawei.com Subject: [PATCH -next] apparmor: remove unneeded #ifdef in decompress_zstd() Date: Wed, 9 Aug 2023 10:02:44 +0000 Message-Id: <20230809100244.342530-1-xiujianfeng@huaweicloud.com> X-Mailer: git-send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SsGvfC2KfnxnUUI43ZEXa7IU0VnQUUUUUU== X-CM-SenderInfo: x0lxyxpdqiv03j6k3tpzhluzxrxghudrp/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: From: Xiu Jianfeng The whole function is guarded by CONFIG_SECURITY_APPARMOR_EXPORT_BINARY, so the #ifdef here is redundant, remove it. Signed-off-by: Xiu Jianfeng Acked-by: John Johansen --- security/apparmor/apparmorfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index c198a8a2047b..7ee8f4bb7733 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -1314,7 +1314,6 @@ SEQ_RAWDATA_FOPS(compressed_size); static int decompress_zstd(char *src, size_t slen, char *dst, size_t dlen) { -#ifdef CONFIG_SECURITY_APPARMOR_EXPORT_BINARY if (slen < dlen) { const size_t wksp_len = zstd_dctx_workspace_bound(); zstd_dctx *ctx; @@ -1341,7 +1340,6 @@ static int decompress_zstd(char *src, size_t slen, char *dst, size_t dlen) kvfree(wksp); return ret; } -#endif if (dlen < slen) return -EINVAL;