From patchwork Mon Jan 16 16:43:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 13103495 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 8CD73C54EBE for ; Mon, 16 Jan 2023 16:43:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F22366B0073; Mon, 16 Jan 2023 11:43:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id ED2C56B0074; Mon, 16 Jan 2023 11:43:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D9A3B6B0075; Mon, 16 Jan 2023 11:43:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id C56DE6B0073 for ; Mon, 16 Jan 2023 11:43:37 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5ABD4AACF3 for ; Mon, 16 Jan 2023 16:43:37 +0000 (UTC) X-FDA: 80361233274.26.BFDE08A Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by imf06.hostedemail.com (Postfix) with ESMTP id 97DD9180017 for ; Mon, 16 Jan 2023 16:43:34 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=omy54DRA; spf=pass (imf06.hostedemail.com: domain of colin.i.king@gmail.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=colin.i.king@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673887414; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=hdMES01EPPPE0n9D0ujpLqB92A4Ph7O7jAl0KOo2U5E=; b=hQXKEN3FuoukGnvQs/YkYnBnYV+99MmRBfYs4pkWRqFMMAOg/VF23ETQ9oJhpyHUlCq73M Cmmxuk8GpQWonBzZNGb+ei6yuCO7zbd4cNaUAcfqMkmj34KK8hFkwT6z2CbxtC5sxTdzuV +AYtqgObHxChEYtiKCMcdnAN0k0RDks= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=omy54DRA; spf=pass (imf06.hostedemail.com: domain of colin.i.king@gmail.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=colin.i.king@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673887414; a=rsa-sha256; cv=none; b=sp4j38rR7iopWJhlLF6NgG0k7N107HMCdusiy2/jrVhxOJJRP/T3yhiPNQcKXXP81IrtoZ +APFIjGvNglSB1nBk7ZbJ6StvfX6j7RMIcEutAekKI9B8ASKigI2YPWpIOlBu2JCgoX+NY dGwaxrJBqRJZh5E5oqWBkjvQoSpI8S4= Received: by mail-wm1-f42.google.com with SMTP id j17so1890068wms.0 for ; Mon, 16 Jan 2023 08:43:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hdMES01EPPPE0n9D0ujpLqB92A4Ph7O7jAl0KOo2U5E=; b=omy54DRAvSUB7i6EYvsO3YHFs/r5BjAXmaWpPrFeifZmPB0W93qQe71EzR3PVvZbsm nzco5MkDgfKynzNzqYMJif02+0nYqNkuTYoR4KCcXFmlEh6siWcd7A1SbpcCpeOdlTdI JWT5UL9xJBDxjY/Cef+FdjlMRZtG4AmLZ4YE3tXbnMefW1x4h7tw9IoIs79DCFniTq7g GEhOU4ES2IWRtidNvii0gCcRLsbEZ4fsRHrCURqhpMrqrA17xmFYsaDKHFk6p42CWl5g D/cJAdxM/VPPsZuqqDZqcuhJjKsSLu3WLxB+aFAucJ587yNGcZ5cgYmnpZDj9vWdkEtA cFkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hdMES01EPPPE0n9D0ujpLqB92A4Ph7O7jAl0KOo2U5E=; b=P6NDR2jYRJog0eVlUzdB4bt3YjtY6i9Ys8rJG+5yttW6vT0voREoDidKkC2pDcDmGJ qKD6+jh5JShh2QLpYn7obTTZPYCOhlRjYBCAftqFF64b9IB9a0UnGYGEqoYzL+jxbf/j Uvx52Ah/caTGCM1h7gbWyc58B/z5/xjj8zMg3At2z9LDDAtMGtU4fIisEDp+uro2iDrI Q89sENbTaoixUmsYXOSx23lMEq0pwTZk2j/9YS99E2Zg0iIl+aOw5ZeOVqGVapKwSoye JLtnLDrmucrWcmuOBStU85XuCoh5JS/qXD2wju2p655qpbTdnLgwAExpZnIaQQJe6VU1 vmgw== X-Gm-Message-State: AFqh2kpTWLk6zxFaS9wuNSsZYGsj1VR/4nT1uU4AB7ptR3capp6TojX0 4EBxN6bURTMHnzE/2mbITYo= X-Google-Smtp-Source: AMrXdXu9vFGQR99Y245eOAWzlFecq6Ah7aU8g1JRMshkROR6DtVyxdV2Hhit9yRaF4npesCKsttOnA== X-Received: by 2002:a05:600c:5d1:b0:3d0:761b:f86 with SMTP id p17-20020a05600c05d100b003d0761b0f86mr98565wmd.28.1673887413230; Mon, 16 Jan 2023 08:43:33 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id p13-20020a05600c1d8d00b003d9fb04f658sm8007889wms.4.2023.01.16.08.43.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 08:43:32 -0800 (PST) From: Colin Ian King To: Andrew Morton , linux-mm@kvack.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] mm/secretmem: remove redundant initiialization of pointer file Date: Mon, 16 Jan 2023 16:43:32 +0000 Message-Id: <20230116164332.79500-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 97DD9180017 X-Rspam-User: X-Stat-Signature: 4r6t5j5sqy535cfrii1oistrh67wcenw X-HE-Tag: 1673887414-677423 X-HE-Meta: U2FsdGVkX1+ToSEYo48qL5IoO/IxnalzoDpsYd0vneZguTlJdfxKgo8lcFWMiXNKRwKoPsXURM6dAagMTX9CrlqODS6Vc5Lu+MPlLe59hoGAmIBKzuyMpaC3stw7UgQ8upBSZrZhlF2sA3gO3mf8tqUt189CNsNdXl5/+CguTX3YFhZ+J659UQhQdiqE2iVCV1Bf/eAulc8T58HO6yMtQLksVGbgoxmXVxXevjLW41zte3P4eHu2VI7N7w36NoT62NylrYZIcwR6RBXcnc6lrWAM0xZH+QVK6YOcqaP8BDyw+5iD6B01eyETNI4eG5jZVw0EW7rKvdEgwyw3bVF7WP0kNMWlf+CWTd50q4uxwKleAkThtLb3ANk9Ftbsj9cXf3WpoQwrMtUbPSTMxz4dKKN9+w4+PKWWN0MEJu4Pn5SA2QcpWBu5xQFsKpNAPgGlQIDcDWFEHXQK76EfMOJjwp2WfGIw2yuYLS2DL2TEEgHZ6q7nMsMyAVdSQyXyBeMt/6EtfE9MPHQqy8RqHCOogntJErz7UcThON1x04cnZWMdVM/9c5ytzGP0A5IZoEt9xGOn2GDv/3xQMSsmeyQguYFfPFZR3x0CS6SqQ7NGN1Pw7jAZiVl3GqK/br2eN2ZezRJOoTYnip5uP7WL/mp+HMdSPedbs6F+bIGacND2vLAZUGqFWUd8qiuP5ooa/DfKDmj4Tbz0TxyJjhDVGdp9mPQM3CzR/6StJwfjQIXW7M5M2dU/ncb1yOkZzOMOB6r4YghTQDJ+RBedMKCMBQAPTUyravR5FPUgh2BdKksHfU/Pt2V3wqP6Wm4PUa6fNr1dMbj1HlRTK79fwqAwC6j8mqUe1Le+QKjWGLRPD5Gsmg0zxZbFSw+RLCHH6nJtbUbLNeMvkir0XVATx9EAb6rQqSfEG9BT/xBMOtb/uKd9Q1tn88qrU8YFseO5HQV7B8NutMK4ReyYP97SooHvyny 2/9QR5bI LVTdurxoc6WOOsrFp1fiLZPBdo0HWxADmyXaL9Z0PAGYt3Fq3eehwZtF71pxKViSkpIULoPHnMMiQ5tmxuk/FfVPAh1MkL7Us13PO0ydLpWvwHkoo0O8dvCk1uQ== 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: The pointer file is being initialized with a value that is never read, it is being re-assigned later on. Clean up code by removing the redundant initialization. Signed-off-by: Colin Ian King Reviewed-by: Mike Rapoport (IBM) --- mm/secretmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/secretmem.c b/mm/secretmem.c index 04c3ac9448a1..be3fff86ba00 100644 --- a/mm/secretmem.c +++ b/mm/secretmem.c @@ -190,7 +190,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));