From mboxrd@z Thu Jan 1 00:00:00 1970 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 31E76C43334 for ; Tue, 5 Jul 2022 06:05:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A1CD6B0071; Tue, 5 Jul 2022 02:05:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3518A6B0073; Tue, 5 Jul 2022 02:05:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23F276B0074; Tue, 5 Jul 2022 02:05:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 1631E6B0071 for ; Tue, 5 Jul 2022 02:05:43 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D86F060710 for ; Tue, 5 Jul 2022 06:05:42 +0000 (UTC) X-FDA: 79652009724.02.79F1274 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by imf08.hostedemail.com (Postfix) with ESMTP id 891A6160011 for ; Tue, 5 Jul 2022 06:05:42 +0000 (UTC) Received: by mail-yb1-f176.google.com with SMTP id r3so20083005ybr.6 for ; Mon, 04 Jul 2022 23:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nbyECK3263/RIOlKgtKBVow3c3mI3lDCcZ6/fs9YY58=; b=hUSvlWnsXGp49fhdQXPLiewzuIeH3gUpLWCml+qlfxHOvACIfZbvr6lsB201e8WSAi UwQK+Vci+BYYv853VVQkXU9pAUe0ry/wra4/twDbkFodaD0MJG5p1zycPrsb02IVaDG1 PltFpOtfltb8XEvhn2NpnzTl1L+FL4ar9AGsv5jOxuZr49jIIoTrOFApr24g6KeUtlPV Kuj//wE/SJvvy2O8C5iYWp6exCPJtHyzjqWu64AC8zUKFgtF/v3Eenfbx7AKxOMd4PZS GGRE0QOXBl9n5PulF+SV69GscIEdlSK2m6BXA4INmNHptkmH3zKXQQdPpj8EISkbbOFk hBLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nbyECK3263/RIOlKgtKBVow3c3mI3lDCcZ6/fs9YY58=; b=lHgYQ5sc1XzHuI4nmCZPp10vOIGKCLjONgIo9WYJKgXJ7c/P7cSZon6RzURpsIg6Ow 0ZWMqoU07wgF7EoB80KccEhaV4SIbMCWqrj335YsIVQVMm/gNBQfVwkTxsivMWCcQFsm ChPGgpgFMt8ZAbWIfMhnkcbS69BAwVjlZidXdliz2NQxwkb4P2H0fjfPraW2/EMXTcbP 91BFdkZNO8J68C/hQ6688+qvs60Im/MLT0f9QdnRiPj5RRaTCLLiCmcNFqeWWmzMR7Us nrTv+vPrqLcxfUxWXn+WEpp5fdIdjr1bFvNH7WMrUMCkozUOXIkxBWampR9Xu/DfYbW1 NCGQ== X-Gm-Message-State: AJIora8YDRSBdq7TvfVlCKqnnw53jbaQLq8oFqGg7gx4vkcegFc0Y9CZ tpMeZFtjphlXl4tTUjtKyOj2ltaPt6zgisnN12M= X-Google-Smtp-Source: AGRyM1sDgPankvWElsMSV8lRoPFYUbJgM7WBumAixEKK/3jPU65pIsxYEOanVPial5z8nYD2qd/+j1eVDIfJ/ncUvow= X-Received: by 2002:a25:8d8d:0:b0:66d:e087:4f2c with SMTP id o13-20020a258d8d000000b0066de0874f2cmr22896512ybl.389.1657001141710; Mon, 04 Jul 2022 23:05:41 -0700 (PDT) MIME-Version: 1.0 References: <20220704092605.19604-1-lukas.bulwahn@gmail.com> In-Reply-To: From: Lukas Bulwahn Date: Tue, 5 Jul 2022 08:05:31 +0200 Message-ID: Subject: Re: [PATCH] secretmem: drop unneeded initialization in secretmem_file_create() To: Mike Rapoport Cc: Andrew Morton , Linux-MM , Nathan Chancellor , Nick Desaulniers , Tom Rix , llvm@lists.linux.dev, kernel-janitors , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657001142; a=rsa-sha256; cv=none; b=wjFki+NGsvT1RnsaXHFvinCkoIcTJpF5ydc7P5949R/v3uOOtwjW7m9zeVYdJyB3ydUQCe VPu/ZBDrGP5m7sx8oGFPCWo0G3wyQPaKYu8UwdkYkQ1RkehgyJFs7+LQJ/SOlx1t7UQ24v xmIJp1WbPFnwg++tK8o1uLV8/KafSmM= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hUSvlWns; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf08.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657001142; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nbyECK3263/RIOlKgtKBVow3c3mI3lDCcZ6/fs9YY58=; b=z0vF8RQ43begAipgJ6+UDTBDzmAGp6hJmga79f8bKbo+e8GDuVgLeh3kXC/ogWHbiY5q28 rcA9tOK+sAByBlPh+cSRm4hnUfKS5GrCkI8sFBVA07ahQFpgfOy9vPwwX3is+lqXrBwqOb JhVB29EKVax4dkkPJUgYVPhODTqSR98= X-Rspam-User: X-Rspamd-Server: rspam07 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hUSvlWns; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf08.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com X-Stat-Signature: szc5rtj8qeoffe7431eadw411jsz6o8a X-Rspamd-Queue-Id: 891A6160011 X-HE-Tag: 1657001142-992313 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: On Mon, Jul 4, 2022 at 6:30 PM Mike Rapoport wrote: > > Hi Lukas, > > On Mon, Jul 04, 2022 at 11:26:05AM +0200, Lukas Bulwahn wrote: > > 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. > > You are right and in the current code the initialization is unneeded, but > there's a pending patch that relies of this initialization: > > https://lore.kernel.org/all/Yr1jKwz2+SGxjcuW@kernel.org/ > > Let's wait and see how that fix develops. > Agree. I will continue tracking the evolution of this function and resend my patch if this patch above does not land in the next six months. For now, this clean-up patch here can be ignored. Lukas