From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) (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 E5EB542048; Wed, 3 Sep 2025 03:31:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.29.241.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756870295; cv=none; b=TCIG0brfgCUdjW5MaQ+QTySEX3C0QmsF4VQDgPHsnCuVtcNWshQYpMlAHlv0R8HZzr9wR9YQBEctkprfOOW7AuIapEhzNdpG17k1w4i7lz1KR+eDWCRDrGuMj2RPNlbIEEwvuEtmngFSJHwl/UQ6ms6PjZRnWRcnaNq7W121d2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756870295; c=relaxed/simple; bh=4d9mLeW3Q+EUZn/A4+IBvHiKSklhOVboTTlUHZHeDG4=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=RnoyzgZeyM1l/5vAtILTB9dWkBU+kjVxh9I15hz8ZpG3uttoRgvmLwwQte5oRsPD3/7919CUQYFzXqsvzRN4vaw7ZJ+kK9SMcISQqkPRGVoY6JanbBl9QDGX0Vc+syk8Hz8q1mSyeRi/ku/Z1SI6HRxNCYr9DWiEOMCvNPenln8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codeconstruct.com.au; spf=pass smtp.mailfrom=codeconstruct.com.au; dkim=pass (2048-bit key) header.d=codeconstruct.com.au header.i=@codeconstruct.com.au header.b=Icy85zbs; arc=none smtp.client-ip=203.29.241.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codeconstruct.com.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=codeconstruct.com.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=codeconstruct.com.au header.i=@codeconstruct.com.au header.b="Icy85zbs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1756870291; bh=oVaQkSdSvcCdDKN3m7ueTdePXOwfRyJ398Y5h6mLEpo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Icy85zbsNn3V5cPMdb3x6rJpqF01YsmfFsDV6WhLKau5qsl1F1JaifyKC76k8RIEV /XxZWidYP/y2VL6QnstbUHHUr6H4ZEye8i3NEEDgntM4cK/CUtyMgaUQVMx1GicytA Q1KyjQdHFeZhtVBZa2MORbonGYMgO9bLl+2aLRlrsSPIcRZUOvS+EUaI8x93z96VQ9 UTEAVypj2gBJCNkvr15zILIyalt/ODyKP7jpnoL/1eUiKew+xhj/hTRbU8Tlf2RZAJ HcEbPLgC73WbsW61Aoo406ccvX6glLnTHBFxjhCTfM8h5OAJaZ1AHCQcuVyKdklrca rTAyArEe7ZHTQ== Received: from pecola.lan (unknown [159.196.93.152]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id 5930369374; Wed, 3 Sep 2025 11:31:30 +0800 (AWST) Message-ID: Subject: Re: [PATCH net-next v27 1/1] mctp pcc: Implement MCTP over PCC Transport From: Jeremy Kerr To: Adam Young , Adam Young , Matt Johnston , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Sudeep Holla , Jonathan Cameron , Huisong Li Date: Wed, 03 Sep 2025 11:31:30 +0800 In-Reply-To: <958f555a-1187-44ef-95df-c93474888208@amperemail.onmicrosoft.com> References: <20250828043331.247636-1-admiyo@os.amperecomputing.com> <20250828043331.247636-2-admiyo@os.amperecomputing.com> <3d30c216-e49e-4d85-8f1b-581306033909@amperemail.onmicrosoft.com> <958f555a-1187-44ef-95df-c93474888208@amperemail.onmicrosoft.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi Adam, > Without the wrapping I get: > WARNING: Violation(s) in mctp-pcc.c > Line 275 > =C2=A0=C2=A0=C2=A0=C2=A0 struct mctp_pcc_ndev *mctp_pcc_ndev =3D netdev_p= riv(ndev); > =C2=A0=C2=A0=C2=A0=C2=A0 struct mctp_pcc_mailbox *outbox =3D &mctp_pcc_nd= ev->outbox; >=20 > I could move the initialization of outbox, but that seems wrong. The=20 > wrapping is the least bad option here. You're kind-of tricking your RCT checker there, by introducing this unnecessary wrap - and the results are not RCT. I wouldn't call that the best option. The netdev docs say this: If there are dependencies between the variables preventing the ordering move the initialization out of line. But I think this is a fairly legitimate case of breaking RCT for better readability, and preserving variable-initiness. We have exactly this, intentionally, in existing code, eg.: static void mctp_usb_out_complete(struct urb *urb) { struct sk_buff *skb =3D urb->context; struct net_device *netdev =3D skb->dev; int status; https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dri= vers/net/mctp/mctp-usb.c#n38 - which triggers no checkpatch/NIPA warnings. The wrapping in the middle of declarations seem odd for a non-80-col line. I would suggest either out-of-line, or slightly-broken RCT, over the checker-workaround format. However, I would not reject a patch on this choice of style alone :D Cheers, Jeremy