Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4685896ybg; Tue, 29 Oct 2019 10:51:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNjfQW4EGXbauTzvKCiVTIu2eLHe7mOW+bNuX5bhfKCclwEcoEB+7fbyyQoJ/VbfD/nIE9 X-Received: by 2002:aa7:d554:: with SMTP id u20mr18999327edr.6.1572371514771; Tue, 29 Oct 2019 10:51:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572371514; cv=none; d=google.com; s=arc-20160816; b=Uwt55OMDQFoJqhoCtHPFSxYZOR1uOUz78bK6SbwrO/UgvyEubq2kldeMdXiLgGJVBg OG7JChsmMaKbma1Ldf7LFsDujgjTSwi//VQG5mq5uNd71IuzEW8AgACWn0QJTeFuny8T oJLJ1YdDQObphyvgn5DEMeTU9fCUs1Q6kp+eUi1rQCuNC/My/9pGAYie1sQQ/vRXUine 7v64qjSn0iRnKT3BysTPB4dm8/b9qk5kzjl419FZ8dGtd1KRCjG86ZkdVKOIe6xk0HP3 gxFIYpCEnTt+AAMk/BTamM0IYX8wBS7GpbcFxWbxYyu0Yi6EciCf1r0pr861UoyLTU6f 4VUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=ptpy/vJ9nWhyDgwLIzHkRl9+v1e+gk6S6daIsLg9qkw=; b=iMU6z6hg3l5ZE1/VcArIDIMBVjV5K3kRQ4G5yUHpX508Zgt0I//iMBmeNYtjRlNjYf h2//cA2hdHqaFsEtwkzVP2mn6Psf1ET+Azd7pE+Dp5QsupSyjcX2OoHzLCYbQm9Mo5Np dDWge9sGBH4XKMn8lSpiYdOWBURabbleVqwKO0koivgWyHk6jABa6PM5nWn6q7703wnS c7fj+QdsewKw3T+4qjICEqMx19C3hFVD1QXqmNzEVl/oF0BiCXM76e6imJneek61DWa3 kmRYGfIjNs0w0miFYAaPirgllS74nvZVFoqT4FBJlKVvFGe4prgp8gPkY2wNd6Mel1v5 FzTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IRE77B74; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x50si10350126eda.155.2019.10.29.10.51.30; Tue, 29 Oct 2019 10:51:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IRE77B74; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726302AbfJ2J4A (ORCPT + 99 others); Tue, 29 Oct 2019 05:56:00 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:45793 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfJ2J4A (ORCPT ); Tue, 29 Oct 2019 05:56:00 -0400 Received: by mail-pl1-f195.google.com with SMTP id y24so7306806plr.12 for ; Tue, 29 Oct 2019 02:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=ptpy/vJ9nWhyDgwLIzHkRl9+v1e+gk6S6daIsLg9qkw=; b=IRE77B74b3UTcN2DESlNJtYZL5cgVxTp9FkSlyL40OAUe2y2yDfKAs5ZjJrQ/Dn1D3 cF96AKMX4+nWUzV4n+FWAuoatauN+4JBM6Iih9Jav+Zmln/SinAdiOjF2CPSmbPcOQY5 2O/pAQ7oPNv4ICd1xiDYsA9NHpxrhiodqBSRdSYaFHjIWKmLA71bBCKscxLq7V4qzQ57 gVQeiba4wLM7OXCohjVV9sBGpj9JhaC3UenidgDtCMZduXCbGrG4ROmC1KQFipoixoLL SqFrkhVCnlmFRdLPgJnzHkl3MoTTNlJazZA1/a5PQdeLnyWVfDlRfiNf4Hb1STCoH5I9 eOFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=ptpy/vJ9nWhyDgwLIzHkRl9+v1e+gk6S6daIsLg9qkw=; b=gAlHZ6v9Lju2Zr36l6tjFhdPzr40Lzg89QU4oBbjxxdeGic0l7yNNaRiSGsHbhFnAs oSihzLCYAD9JdbPS2Pdh8m7PB3D43Z/i751coFRE1hdBGXGd8j9mAvio6U3ELULheF05 4vnUE4LuzTnrMkPa6kzs99Tg+vKHSdOVSy1DwtgHjo2hGZSCJklY2j/1RDJrSzMiQ/hS FLxPLfBFLV2vMXLLAQxvY0HF9RTmv0cArd/W4OH2yiuOEp37aJvDKGuUoamDxj42XjHl TPGbuC1aSauzMwnlz8xh74peEETOC+dtHp+uQTpWu0DuzCsUCeRgTaHNluJDcCQv6nCa Pk5Q== X-Gm-Message-State: APjAAAV0c5BrbfdOyZ1sJcWmXpPmIaVPneu6mOJ6DYqe+998qihzhIoB 8y66oAbZabuh4RYongQZYgg= X-Received: by 2002:a17:902:a588:: with SMTP id az8mr3127639plb.70.1572342958474; Tue, 29 Oct 2019 02:55:58 -0700 (PDT) Received: from saurav ([27.62.167.137]) by smtp.gmail.com with ESMTPSA id x190sm14750613pfc.89.2019.10.29.02.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2019 02:55:57 -0700 (PDT) Date: Tue, 29 Oct 2019 15:25:52 +0530 From: Saurav Girepunje To: gregkh@linuxfoundation.org, tj@kernel.org, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH] fs: kernfs: file.c: Drop the condition with no effect. Message-ID: <20191029095552.GA11561@saurav> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As the "if" and "else" branch body are identical the condition has no effect. So drop the if,else condition. Signed-off-by: Saurav Girepunje --- fs/kernfs/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index e8c792b49616..d8123d8cfdcc 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -663,10 +663,7 @@ static int kernfs_fop_open(struct inode *inode, struct file *file) * Both paths of the branch look the same. They're supposed to * look that way and give @of->mutex different static lockdep keys. */ - if (has_mmap) - mutex_init(&of->mutex); - else - mutex_init(&of->mutex); + mutex_init(&of->mutex); of->kn = kn; of->file = file; -- 2.20.1