Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp224552lqo; Tue, 7 May 2024 19:03:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0M8yjLX0c+/Pa3B5Ve1dJrfmyBViv/8MXyiK1ldB3YvL5WWMQ2gggT5Cc850AcgIRUJd9rZSEFL99lLH4XFAOMJjT4mTSYGn7SqvKyg== X-Google-Smtp-Source: AGHT+IEUFiHuACM7gheUhyzQ6ILqBXOEKCWPJhZBMGEhAJeTNZil8golDNpdSICdE+m3JTkGosNR X-Received: by 2002:a17:90b:3583:b0:2b1:13ac:cb35 with SMTP id 98e67ed59e1d1-2b6169e1b10mr1179263a91.30.1715133837927; Tue, 07 May 2024 19:03:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715133837; cv=pass; d=google.com; s=arc-20160816; b=wzPs9pGVq2qcxSWXwmJm+SP7EzB04c8W5aRg+gV0jywOQwGNTTN0pNOerNj1qSR2h6 oCLFcK8asLOlSrv6QHWLVaFJuugaMmKP5VZV5md65Hso716+cuzK4Y4K8p44JiucosVl eQQAtwIS8bkXdvWRqxdlSuOnzFSWMRksQkowuDFODrXS9mlGGP37QSwAPJbL8Km0azYn S7GqvqKFjogJG70u4alfhgiJhJiJLgLgeaNJjc7ePXHcQk25ZS57TuDuESnw9gxnRg49 Wrt0VjJ3LaeZ45V/Q8mJYrgyWTrimo+19kA1mkzDrAWPRvnSr9x8nqHtjaPgkI3NB/Nl w6Yw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=JbJjB5E1jaPrO+A4KZB/9dcT79/qeEfPVi6Kpib8rRc=; fh=O76MhVf0BACHxzIRMTNepCqY6J+DubCZqqDO2ZdrGnY=; b=G+LMiYEMWyxqdrhzYHgDD80WInuqIa1g57D5RIpG5BA7ZSS0sKBdZT/SxgH+Z/RkPf sbwSragRvVLf4VO9N4VsY0QYjMWoQ6eWqX7zyuz1XYj0wD9kL88OIaUGY5xyKMEOAcvz NsKOo5Mcr9SUFM6HOZFbO3komFRJdJWpdz7d/gHAW//cC/wQmUIBdZChgeiukZZpAD86 7AUw7IIgWs3VGZmfGLzSgr9tzTfcNI+3DbyFL6vCzW/FygydLgsEEqpPKEGWtbIyjhMd p+94f3yDjadZvL2pClaDAYlR7ANCsS7EJNGea99TuE9HnkLzXE5t4DCEBiodAHL6v4AL SuuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KF75b589; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172618-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172618-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b6290c614dsi328101a91.156.2024.05.07.19.03.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 19:03:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172618-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KF75b589; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172618-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172618-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8515D2813C0 for ; Wed, 8 May 2024 02:03:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A7E8B664; Wed, 8 May 2024 02:03:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KF75b589" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA7B68BE7; Wed, 8 May 2024 02:03:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715133830; cv=none; b=tlRwciTYdwfIb4EzVqSe00NG+/HTMiQUd8ioJ29uwbYVZEZ9gdEz6D2FvWr3+nYm+GXCGQBsllvbRlr/oX2qO+3Cq/De+grNMB0LXZRfzycCQV5+2FibzCkHO6MK7/h8nf4bhjVwmyPOVeU/NU3Pia6QoI1/rK94hXJE3jC5JHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715133830; c=relaxed/simple; bh=u1HK3lKrCXfmSNN4df0DTFJ09j4yFFS2SW0WGxuOVdU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ABGXkD89V0FkYTQcYiyawRyqK4FaMu782lN9brWLcNqXFnQs578iPof/LxLHIzxEL+/0UVOGmvPjLCp3KAKtI9KqWHENo3ul58RObA7CeCG9etL3aDwzeETuXg33iUbUedQbl1FSJnpm9R8VrKp0SRjRVVctyBop++wwUpS+/qI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KF75b589; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DE7BC2BBFC; Wed, 8 May 2024 02:03:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715133830; bh=u1HK3lKrCXfmSNN4df0DTFJ09j4yFFS2SW0WGxuOVdU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KF75b58955oCdvUbr9+ISjBQ18eL34qjS/7cgPiVTdi6Ql/Zv5RMim9LBcEfrm+Lw h+CCTwtOfMzJBjZIGWan1Svk5EKw4S0eDak0tro++DbpNp6wOXt7/V22/g+uPUZjFJ GLL1rGehmFejgBgJsXivUHGHHsvPb7mJNH/V96H68WYm+tE1zz01TVvZko9XUnzRFl 5omX7obcfzzsmgek2LbFyrAecZkd+TpyYU8PqeZJ7H1DalbrmsuuiyTrSfEeirvX3C PeAi7jdkWV2ji3YbR8nu0sFf6xNrG0YNuDTDlzG05QGaz1n0GEpK4Ak04EjTf+TcwP 43c6gWN+dn8SQ== Date: Tue, 7 May 2024 19:03:48 -0700 From: Jakub Kicinski To: Xiaolei Wang Cc: alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: stmmac: Initialize the other members except the est->lock Message-ID: <20240507190348.1bd1c446@kernel.org> In-Reply-To: <20240503231804.2323666-1-xiaolei.wang@windriver.com> References: <20240503231804.2323666-1-xiaolei.wang@windriver.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 4 May 2024 07:18:04 +0800 Xiaolei Wang wrote: > Reinitialize the whole est structure would also reset the mutex lock > which is embedded in the est structure, and then trigger the following > warning. To address this, define all the other members except mutex lock > as a struct group and use that for the reinitialization. We also need > to require the mutex lock when doing this initialization. Seems better to move the lock outside of the struct to struct plat_stmmacenet_data.