From patchwork Mon Jul 4 09:26:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 12904931 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C91DEC433EF for ; Mon, 4 Jul 2022 09:50:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 496886B0072; Mon, 4 Jul 2022 05:50:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 446706B0073; Mon, 4 Jul 2022 05:50:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 335986B0074; Mon, 4 Jul 2022 05:50:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 235576B0072 for ; Mon, 4 Jul 2022 05:50:13 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1EA34352FF for ; Mon, 4 Jul 2022 09:45:19 +0000 (UTC) X-FDA: 79648934358.21.4C361F2 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by imf07.hostedemail.com (Postfix) with ESMTP id 0804B4056C for ; Mon, 4 Jul 2022 09:27:15 +0000 (UTC) Received: by mail-wr1-f47.google.com with SMTP id k7so12538158wrc.12 for ; Mon, 04 Jul 2022 02:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=8ajViNQRBuqUSn02uQYgcqcIAiyCQZm2aY6tb0Jvxow=; b=FwV11uqFxCK4IkZ4zVZiQ64I4Ggdzep3kIDUZ2+1HDpOAhUlfzAYQJUacB1phfkN2X B2HQRkjXpwoAcuKnts64swRREXrVL4xJrJZ9WYfFyoHRvfGx3SOlMfDHIoShfgM86eoE AD6c8Vs5c95BaGGO/di2Xh5BNHGRZ6t1xKrPqwmbwreDxwQt9H7npJMcxNlxe16qrIxR bSGh6dmLpgE6CclNjxAIPWG2Vn4Kr0YDJAPJw/xemQN/PnikqQrEvbPdL20O9C3DsSfV 41Y2ic/yf0dFgLd1K0r+o0E7pB2FuYAm4jbyeIXVo3hBUk4RtoVVAoJQ15c+5E4BZzlQ V8Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8ajViNQRBuqUSn02uQYgcqcIAiyCQZm2aY6tb0Jvxow=; b=jrb9n8ZFQr1OY5+s/Vqe87YPPGJS/Wxpivp/w24UxZURhOPxoDd1GoIpHabbDhgOCY RbgCEJrNzdj6bNf1tE9bK/Yh2yzzlU3+kNRDM2ptXYmq1jMgavSFrfUF2Iux71QZxraB OCwe8XMAy1x7AcNjq8Bsox1St7+4t+v84AAlC8nCzUaxME9DpFlvMkUiswNF8qVHeEOI ogRH6MugeQS1vdNOvImCVjPBo5zfn/gumIurlQWqPh3v0oX5QrvMOI0VY8wqCD3W8ZSI Y2u0jXYtQruRiBYcRcHv3m9zGeH+SRgqCAjvcV65JXUS2bxZzIFP5ZiuY1Vp4kHdHNnH v2mQ== X-Gm-Message-State: AJIora8ZbWBhnoTMaLE9AUTEq9aUecE89TM3gkJd8I4Q08n/V9pu1L9G P3LxaJ21Slmq/rep+MJ95Dg= X-Google-Smtp-Source: AGRyM1toxERE0aCr4bhk9/9ushPcgnzqZmqbDSrQk4jk+lQaqJhem9chTZej0sQW5e9RrOi3uvfEsw== X-Received: by 2002:a5d:47c7:0:b0:21d:12f8:e0be with SMTP id o7-20020a5d47c7000000b0021d12f8e0bemr26419284wrc.432.1656926834593; Mon, 04 Jul 2022 02:27:14 -0700 (PDT) Received: from felia.fritz.box (200116b826716b008998943ac77556e4.dip.versatel-1u1.de. [2001:16b8:2671:6b00:8998:943a:c775:56e4]) by smtp.gmail.com with ESMTPSA id d10-20020adff2ca000000b0021a38089e99sm29618815wrp.57.2022.07.04.02.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 02:27:14 -0700 (PDT) From: Lukas Bulwahn To: Mike Rapoport , Andrew Morton , linux-mm@kvack.org Cc: Nathan Chancellor , Nick Desaulniers , Tom Rix , llvm@lists.linux.dev, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH] secretmem: drop unneeded initialization in secretmem_file_create() Date: Mon, 4 Jul 2022 11:26:05 +0200 Message-Id: <20220704092605.19604-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656926836; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=8ajViNQRBuqUSn02uQYgcqcIAiyCQZm2aY6tb0Jvxow=; b=ml5PXmxWyN0k6rfbuIBRMbbSrATrZ3u1IZMrehT1+7vN3Gy/ED+YybA4EVc3xLBj9dx+dv joSDkjwktKHTgRIs4KwWkmohI33jphqxuqwRHHS938BOsp7ht4qy+TJ9mSh5frH+aeOcBU JrmEbQzH4441tHzKYTd8vePH8ECSFlQ= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FwV11uqF; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf07.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.221.47 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656926836; a=rsa-sha256; cv=none; b=BSC///y8HmSoX0cT9NrrXf5uCYikXpnJw8yDcDRwWrJAPJJL2KToBADhhFFepme8LhOCjK HibjqBW3F9tBy8Ziqy09h5+DWeV7JovzJ1/yCo94aC8+etZ7uysOvpmJ8pMGPcpgFyHn7W FvlpdaZqrssGFnTtNZPN4Ag8hp6czBM= X-Rspam-User: X-Rspamd-Queue-Id: 0804B4056C Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FwV11uqF; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf07.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.221.47 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com X-Stat-Signature: dpiypzieh3168ndsr5da63yf14x8u858 X-Rspamd-Server: rspam08 X-HE-Tag: 1656926835-72625 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Drop the unneeded initialization of the local variable file in function secretmem_file_create(). No functional change and no change in the resulting object code. This unneeded initialization was already introduced with the introduction of secretmem in commit 1507f51255c9 ("mm: introduce memfd_secret system call to create "secret" memory areas"). This minor code-stylistic issue was discovered as a dead store with clang-analyzer. Signed-off-by: Lukas Bulwahn Reviewed-by: Tom Rix --- Mike, please ack. Andrew, please pick this minor stylistic clean-up patch. Thanks. mm/secretmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/secretmem.c b/mm/secretmem.c index 7584aab54d20..46b431d62761 100644 --- a/mm/secretmem.c +++ b/mm/secretmem.c @@ -171,7 +171,7 @@ static struct vfsmount *secretmem_mnt; static struct file *secretmem_file_create(unsigned long flags) { - struct file *file = ERR_PTR(-ENOMEM); + struct file *file; struct inode *inode; const char *anon_name = "[secretmem]"; const struct qstr qname = QSTR_INIT(anon_name, strlen(anon_name));