Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4360047rwd; Tue, 30 May 2023 04:31:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7bqcc35BshOCl3k3ve7PFKknE18z+BqbppMjSBXf+yIHShgESpgCJpRKMD2OihUyBMXY36 X-Received: by 2002:a17:90a:9606:b0:244:d441:8f68 with SMTP id v6-20020a17090a960600b00244d4418f68mr11433113pjo.16.1685446259956; Tue, 30 May 2023 04:30:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685446259; cv=pass; d=google.com; s=arc-20160816; b=tF9eaR5DJCT/mghv/4/BDIpKPTBuvltCm6hQ6oUze9dsYgRbQPOi4p9vX4nhN0FiJn Q0MQPJrhabB+rnzMGmZ2OIDunweiXLA8JritZ+OXn6wjJXU+2100NSr9tBatbwUx7wWj iSHkt8joARcJn4nwTQgmw0quO4mVGR72GryDVxt6FwWCyumFdPc4fAn/fLEWYXh14VfG E/IckEZz/bx/jrAuADV7QBEC/oj5CweKawbQ7M8etssTUhENkLeSR9+VFDZ5ZLWR45GP /03UcwJRm/JoXLUAXk7M2/bjSX2uXhTTjRq+HPcE1J/9ioiDx3V4e437OlKl3DUWHfP3 QKcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id; bh=S2SUnZhB41qJC00+ZsdkOTNS3PmA/7k4AcnjdgHHZ5c=; b=cn7KTaanUdT5DHx3YQlIxLnfFDyXwOy50LoEbpsIqDkBfuIRTs2ecg+sNTnyN8BD2E vYrtcH3ngkxJFODkLPPS0i0kC1CF1+RdQhwFOpymVGiz7+fNCVnF9L26G04yeQBLj3WD We0SvVaIczpOAnDCVo7VBAjGglEKvOd4s3e+l4X4QVowihU09io9yGFyOXaafpPVQwIA JTYPGb6+fa15UAzXWhFqxSsoXDA90YNEKPQwW2m6/heXEkSNrLJHEP2do3tRY0F9fviv eo0eHRlyOxfKNx4yOvWuIvLPme7KZ7KbZxnr2vNek1YKydmC0lgx9gLdD2JjuGB4EPJO uSNQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=talpey.com dkim=pass dkdomain=talpey.com dmarc=pass fromdomain=talpey.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go6-20020a17090b03c600b0025546028cbesi4559750pjb.31.2023.05.30.04.30.47; Tue, 30 May 2023 04:30:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=talpey.com dkim=pass dkdomain=talpey.com dmarc=pass fromdomain=talpey.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231838AbjE3LWG (ORCPT + 99 others); Tue, 30 May 2023 07:22:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231823AbjE3LWE (ORCPT ); Tue, 30 May 2023 07:22:04 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2060.outbound.protection.outlook.com [40.107.243.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1983106; Tue, 30 May 2023 04:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=StYdE9MiVFuXLiKATH/f7Ifkw5SqjI/l5Pjq0SJ7mbqEclOfVjZkzWP1M4sj9ZUnscTv7Tr+LZWB7DSOZ6O2Z3UMG/utmUlZUnZKviHcmYVYZjq7UVs/5AtKeY7GRoqP/Bvzq67TsE3NkGL/9uKQ4VMWHRJjVzctAFFVWoUehoq0Uy3Ez/40nu0FIIr2V0K9URdfD5vH97wF4jsriuhQDdx8dtWchFrW/2Ifj5Yj2UHtVKmi1FIRokISTfLgkk3cQXc5pzdgk5W2j7ieVRkDx7/j+Wsg+lVTVFHHxuazbR6/BMLfjq638Ss3TUI22hyfLy+30w0O01cxnjK0Y1EhNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S2SUnZhB41qJC00+ZsdkOTNS3PmA/7k4AcnjdgHHZ5c=; b=bCkHJpGlpb5v9L0m+a7EpAO7caryOmT7+Rc0gO5un08/yXom1e71+GqIv4BgF119waITIKtXVCT0EYCT/DewhF4kkNGguYiIAceR/vAB9N8fWziR6m5+ymzETy+HHOEYFHRnls67ZOEpK52ye4WKmqgb6IwdmA7dc9L4cR+6TDovGyLK71qnXik2frJARxQV8elcuO67zi8yW7SFtKDEnLGHS7mcLEepa0LoItm0t/h+k/anxqse7XSt6R9TlHNhBlPR5NkceyZkzSmqrR3wQhleK4nmbx85q/j3T2ebuOnIMGPxDLk3M85Zq5zhcEPVG7iTZ2pw7v6fJtL2GtxuuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=talpey.com; dmarc=pass action=none header.from=talpey.com; dkim=pass header.d=talpey.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=talpey.com; Received: from SN6PR01MB4445.prod.exchangelabs.com (2603:10b6:805:e2::33) by SA0PR01MB6363.prod.exchangelabs.com (2603:10b6:806:d8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Tue, 30 May 2023 11:21:43 +0000 Received: from SN6PR01MB4445.prod.exchangelabs.com ([fe80::ef26:464c:ccdf:ee6b]) by SN6PR01MB4445.prod.exchangelabs.com ([fe80::ef26:464c:ccdf:ee6b%7]) with mapi id 15.20.6433.022; Tue, 30 May 2023 11:21:43 +0000 Message-ID: <66f1e8f7-7023-4331-66cd-f3c02e59581d@talpey.com> Date: Tue, 30 May 2023 07:21:40 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH] smb: Remove unnecessary variables To: Lu Hongfei , Namjae Jeon , Steve French , Sergey Senozhatsky , "open list:KERNEL SMB3 SERVER (KSMBD)" , open list Cc: opensource.kernel@vivo.com References: <20230530092055.16919-1-luhongfei@vivo.com> Content-Language: en-US From: Tom Talpey In-Reply-To: <20230530092055.16919-1-luhongfei@vivo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MN2PR10CA0014.namprd10.prod.outlook.com (2603:10b6:208:120::27) To SN6PR01MB4445.prod.exchangelabs.com (2603:10b6:805:e2::33) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR01MB4445:EE_|SA0PR01MB6363:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f54fdaf-9e36-42a0-18ae-08db61000bb0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +LjgVD4G4SQj1TxqUEpGtB9ieXgqsqFVFcpaNSLYZHiARBRqpx4Guj1j4A737m/RQg7ucegnVJspn7bEsm9Mrxi7abOxmqty44ELDk+wGeAe3Hpklvae7imY8NYL2czguKjFIW8jM5/584jgyNyXbSNQP4uH0CjRlq8ZSyHLRk3AJ2vKy9ecqKrLukFQJA8ELCkifrdvitmTKY1q6KTEaI0/RjVmF/BnmDthVgisjM3kL9o/adIP3X/dQ5RsDDcrqU3l8VHbjRsjlno4kb+MkgTTVNNHxIYcxT3BK4yAh8bqxXQUBes93BMR7olx0ftqRuze/Dn8XsEUwqPIIRz3/eyRdgWlvqZHBn/6oG0DnchoRWBFCwjo7521X5Pr7hAV4C+2KxgwlXoIWDwGHhcrtQf53XAPtj+90LstZNvgt1HUBL6TUzNmxsyn5RwKsNUv0rcMSv68rF7LYbmcx8gT6uzy9Cp8Ns6Xyf1rGy3Nmm9vanHYAfiGNm38OVMN0Ljyx//khFcWM3Yg5LKef3UY+DprdzW1heehdOq+KADFXqHvj0H0CSzjgySR/abaHvB/R5gno9Clb+7BKRwknPfkMA7tl9cBz0Z9l5xbNC5AeOk7PdXRKS8O6GGlAgogjrjmsi0evQq9eHSKUi7vgLbr4Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR01MB4445.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(396003)(376002)(136003)(39830400003)(366004)(451199021)(83380400001)(2616005)(2906002)(186003)(36756003)(38100700002)(38350700002)(41300700001)(52116002)(316002)(6486002)(5660300002)(86362001)(8676002)(8936002)(478600001)(110136005)(4326008)(66556008)(66476007)(66946007)(31686004)(26005)(53546011)(31696002)(6512007)(6506007)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cnFuUmo1Tm1Sc05Mem9zQk1hcVZ5NHlWWjkvTjFpVHV2RlE3S2Jocm5kenhR?= =?utf-8?B?U1BWUzZPT0lwV0luSndTNTB2V3U4NWFqdTZ6STBYbmRWL0dtRE9EWWlSNmYx?= =?utf-8?B?OVpmdHp6UW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f-8?B?bEJ2emZvbVZiWm1KSElvd3dQM1hTWkpGU0RDMnpIbU11dTNBK0lDQmpEQXlu?= =?utf-8?B?TnVmVHBtUG94M3ZSV2J0dFZLWjZNYlcxVlhqckwvQjlsOExNNFRvODVMdTFS?= =?utf-8?B?RTZQM0dCTzRDaFBjZ1BQM2NqdklzQnQ2ejV4WFZoaVJYck9Tb0tQbEtrcHpX?= =?utf-8?Q?yoqXKk4rATH2TTgTJYJqD9A+I?= X-OriginatorOrg: talpey.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f54fdaf-9e36-42a0-18ae-08db61000bb0 X-MS-Exchange-CrossTenant-AuthSource: SN6PR01MB4445.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2023 11:21:42.8815 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2b2dcae7-2555-4add-bc80-48756da031d5 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mCFXjhZ3Yl3zYkmBEHhTzEo6FxQdsUYr5tSMZdaUN75KQnTRiMdvhIPuDl+aVGBH X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR01MB6363 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/30/2023 5:20 AM, Lu Hongfei wrote: > Remove unneeded variable:ret and return 0 at the end of the function > > Signed-off-by: Lu Hongfei > --- > fs/smb/server/vfs.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > mode change 100644 => 100755 fs/smb/server/vfs.c > > diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c > index 778c152708e4..cb3fc71cc59f > --- a/fs/smb/server/vfs.c > +++ b/fs/smb/server/vfs.c > @@ -120,8 +120,6 @@ static int ksmbd_vfs_path_lookup_locked(struct ksmbd_share_config *share_conf, > int ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap, > struct dentry *dentry, __le32 *daccess) > { > - int ret = 0; > - > *daccess = cpu_to_le32(FILE_READ_ATTRIBUTES | READ_CONTROL); > > if (!inode_permission(idmap, d_inode(dentry), MAY_OPEN | MAY_WRITE)) > @@ -139,7 +137,7 @@ int ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap, > if (!inode_permission(idmap, d_inode(dentry->d_parent), MAY_EXEC | MAY_WRITE)) > *daccess |= FILE_DELETE_LE; > > - return ret; > + return 0; > } I don't see this function being called at all. Let's either delete it, or change it to void. Tom.