Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp409230ybz; Wed, 22 Apr 2020 00:14:29 -0700 (PDT) X-Google-Smtp-Source: APiQypIyboettS7bfHtB1eUkIGM9tleDuJmTDNFBV8n+/R/RACl8MBkyLqrfZFe6rV62QBJE7xjn X-Received: by 2002:a17:906:c4f:: with SMTP id t15mr25550686ejf.193.1587539669517; Wed, 22 Apr 2020 00:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587539669; cv=none; d=google.com; s=arc-20160816; b=F78mdZBt1svkOgS7JLSPwaDPCyn+GsWoyPMulhgFB5xO46zd9j7Z5YRFrad68IQTfu geJ7hEfTXBVFHqz2TiOkSTSaQsB2C8xvskuDzJ/nDYRR0CxThGcs5OwtXmCGvhKEwuyF kcA/6mOYfjDspgf9D0hf8MArzQfMXvN9rHnua9JMj+CZeCA/dSwqB9w6dqztFqa0t9DQ TInrIcCHCRGuxV79MzoIZ9opnpNWwYyrFz6fqwRLMpuXaNNAY46/XGG9KTDYz1j19unN WNnkBuQ9cOi0r9SDW1gwOps+3mVj9/A2/W8Qz2gP6JEMDdW8E58ivUejehmj0njIVc2C E0iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=+5cJolfIElG7SpVGtlBXab0VOTdrmXMmHXrRgqglmG8=; b=vbx3gGMFoeV1ua8g8zwD3xLFjKyPYQ08mYHOhDoiT0eAN5GQJwz4wrWCOcNPB7u/BO E4TGYDTmgtY5pUL/5QqAa8sQtZ08Mg47N2c7G13gXWzmcwCitTLxN456OuBq0PQWhqoo 1HVj2+reGsVO3WwQev8bhBosvlxSIcPtIEpSd0f5z02bIEscUYij0KhMM2C6ILETb5Oz K8RTY+iknqWctxoTXPr9qcarMg3yTvaNdRuBcP5y85KhPU4Hh46dUHZPUupiow6D/5hA 9Mn/QrzqPQAIUv73TJvf/84nmoK0zoJrfR9ilD9D+ottL5QqceskyLU/GqEFyBQdokPq ygpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e25si3029037ejl.159.2020.04.22.00.14.06; Wed, 22 Apr 2020 00:14:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726422AbgDVHM4 (ORCPT + 99 others); Wed, 22 Apr 2020 03:12:56 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2866 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725811AbgDVHM4 (ORCPT ); Wed, 22 Apr 2020 03:12:56 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3316C335695113F4E212; Wed, 22 Apr 2020 15:12:52 +0800 (CST) Received: from huawei.com (10.175.105.27) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Wed, 22 Apr 2020 15:12:44 +0800 From: Wu Bo To: , , CC: , , , , Subject: [PATCH] fs:ocfs2:remove unneeded variable 'o2dlm_flags' Date: Wed, 22 Apr 2020 15:12:01 +0800 Message-ID: <1587539521-461177-1-git-send-email-wubo40@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.105.27] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: fs/ocfs2/stack_o2cb.c:69:5-16: Unneeded variable: "o2dlm_flags". Return "0" on line 84 Signed-off-by: Wu Bo --- fs/ocfs2/stack_o2cb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c index dbf8b57..2da9633 100644 --- a/fs/ocfs2/stack_o2cb.c +++ b/fs/ocfs2/stack_o2cb.c @@ -66,8 +66,6 @@ static inline int mode_to_o2dlm(int mode) } static int flags_to_o2dlm(u32 flags) { - int o2dlm_flags = 0; - map_flag(DLM_LKF_NOQUEUE, LKM_NOQUEUE); map_flag(DLM_LKF_CANCEL, LKM_CANCEL); map_flag(DLM_LKF_CONVERT, LKM_CONVERT); @@ -81,7 +79,7 @@ static int flags_to_o2dlm(u32 flags) /* map_flag() should have cleared every flag passed in */ BUG_ON(flags != 0); - return o2dlm_flags; + return 0; } #undef map_flag -- 1.8.3.1