Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4606941pxj; Wed, 12 May 2021 09:08:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBuKesFudGBR7EE+2w1rqB77rJBpzdTY3Z8dhRxQmw2A5F6sotDknixTNyqnELx2Hg5luG X-Received: by 2002:a9d:5e8c:: with SMTP id f12mr13832005otl.18.1620835684422; Wed, 12 May 2021 09:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835684; cv=none; d=google.com; s=arc-20160816; b=nI9udZfNAciI3BpxoHs7EvHECuuQ91Mfy5+jRhPi8pGSEjCyw7fBkARI268uCZ59xD d6o8EXicc25Uy+i+UfXUld4nNVfVC75IKO62QVUae+gZb2FSvG61uR1GMwXw6RYrk6rD 01F62R+7akzTilI8wpx9u61ffgH04vFg+287GGFAG98exOd7I1ueFawLQAzgjvGnHnZa 5nNDV4UcVeY9mgWOecn+1wbPUwhYy9LHFXTYJVaZTiz0R6p510oUStKO19yTkNunH498 8ImIXfwfFkIRTFo1TOzxzBUDaqh6Pb7l2qd3KpIA8dnL8c3XMj7VgmH66XYySa7RfY2l nzgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CWE//Y8TyESCEMmoJe/eYUQl1dUlnx/J8DQmVOocQdo=; b=izf+DlROcZXVcZTI78mVRpEFB4BTU1dDdxo0sB+nteV9qSGHkCmMrULaAz0ounWgpk D1hlQYeMTHPAlSnUSpPbK/b9MzHXUGycFn5J7dZvwYo0Rpq3y90ZMROuRtlbB9F8d6nd X+fwO1WELC2Cbv80Nh6JY33qyT5Pbnlcr9LhKOD4IKLZORgYXV3UWpK3AcVTjKowe+Jh d/2PTyOoSB+Re0XUDVAO2TFvPkGNdNkUNgw104ueHwlP4zPc4jwTbk+PHjbA6dsQMyOa k2LLBt/+Rm9tnhy/bwLWL6aVXzqU6sMSMDewpAl/6FF0Kzjq4llBR0QvTUz/FQ6vLL/J VQsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QlahJ34f; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w201si181214oia.273.2021.05.12.09.07.51; Wed, 12 May 2021 09:08:04 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QlahJ34f; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238820AbhELQGW (ORCPT + 99 others); Wed, 12 May 2021 12:06:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:39078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234330AbhELPYu (ORCPT ); Wed, 12 May 2021 11:24:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0922E619B0; Wed, 12 May 2021 15:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832222; bh=GyM9gKbYClNFVOIMKTvnE/vOoFVKJe1bk5gJ1jYG2nY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QlahJ34fC8QJVcfy0AFwAqQmqkg2LhrUM89geAhjaHuU/p0fdKCGlnqzuU5E1xq/A 1dUdAvQ8Hdy8pr7HbG8PzMzUDK4M6ZbdL5pr0pWXYPkt9BntaevOzUls9w6y6gtjom o5W0h6Ut01rhGmV8ZZwXN7ULZ9NitE+KZ/idhtHY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuck Lever , Sasha Levin Subject: [PATCH 5.10 192/530] NFSD: Fix sparse warning in nfs4proc.c Date: Wed, 12 May 2021 16:45:02 +0200 Message-Id: <20210512144826.150808924@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuck Lever [ Upstream commit eb162e1772f85231dabc789fb4bfea63d2d9df79 ] linux/fs/nfsd/nfs4proc.c:1542:24: warning: incorrect type in assignment (different base types) linux/fs/nfsd/nfs4proc.c:1542:24: expected restricted __be32 [assigned] [usertype] status linux/fs/nfsd/nfs4proc.c:1542:24: got int Clean-up: The dup_copy_fields() function returns only zero, so make it return void for now, and get rid of the return code check. Signed-off-by: Chuck Lever Signed-off-by: Sasha Levin --- fs/nfsd/nfs4proc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 2e68cea148e0..015d25a5cd03 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1425,7 +1425,7 @@ static __be32 nfsd4_do_copy(struct nfsd4_copy *copy, bool sync) return status; } -static int dup_copy_fields(struct nfsd4_copy *src, struct nfsd4_copy *dst) +static void dup_copy_fields(struct nfsd4_copy *src, struct nfsd4_copy *dst) { dst->cp_src_pos = src->cp_src_pos; dst->cp_dst_pos = src->cp_dst_pos; @@ -1444,8 +1444,6 @@ static int dup_copy_fields(struct nfsd4_copy *src, struct nfsd4_copy *dst) memcpy(&dst->stateid, &src->stateid, sizeof(src->stateid)); memcpy(&dst->c_fh, &src->c_fh, sizeof(src->c_fh)); dst->ss_mnt = src->ss_mnt; - - return 0; } static void cleanup_async_copy(struct nfsd4_copy *copy) @@ -1539,9 +1537,7 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, refcount_set(&async_copy->refcount, 1); memcpy(©->cp_res.cb_stateid, ©->cp_stateid, sizeof(copy->cp_stateid)); - status = dup_copy_fields(copy, async_copy); - if (status) - goto out_err; + dup_copy_fields(copy, async_copy); async_copy->copy_task = kthread_create(nfsd4_do_async_copy, async_copy, "%s", "copy thread"); if (IS_ERR(async_copy->copy_task)) -- 2.30.2