Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1680952lqm; Fri, 3 May 2024 03:20:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3VJrxYpnBuV77pQnKwV91AnTcHzZEKps5ssWZcrYqHwqeot9YXi9tQtI/IABlFn/9Zn/ifDMtvINEGz/UHyBrGJFlEpoqFyUGHZCd3w== X-Google-Smtp-Source: AGHT+IHksAyEU21QGLhQzF8uS7bD+q4+iyJvYNLn4kDzOlqBkT2ajFP9uOPbpcGVI3wmCeF/sXhJ X-Received: by 2002:a17:906:da06:b0:a55:b5ba:8104 with SMTP id fi6-20020a170906da0600b00a55b5ba8104mr1359181ejb.27.1714731619714; Fri, 03 May 2024 03:20:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714731619; cv=pass; d=google.com; s=arc-20160816; b=OjF9DSl2ptDI4vGbK7dAgehB7haGDYl9gBXj71Hpv+SX4afzcxEEyVxC4ORFBz1EMu kJtWZY3VgY5RuloF9mWLDpc/xkkE6tBLEB3t+ILIeNOqorbNLNhRnk+9YGclsKvL0dAv 2omx52VF8thuzRL0gNjeoKerrUrKZLYNJERA7kA4tfCRyuquEGD5v7uOO7XmQLBRmp+u V1a6354OnszGzwzA430oHafwMwDjRNcfZ5kvjgr7UEIPpLx9ktUl/JjszljLfRd0jP1O kf8UDGVnYV1rrZQYUIQYRW23bQzPFp2yHHHqKJL0xeDAuV8OkxyOnK5zgIiXKiOQPm+m eQKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=xQ2HKj6+T1V5Zfw7N/Rx/wC9M9pRWZu/SxieG/zltwo=; fh=rEC4aapC2LucXJ6P9SkySMGTK56J8mEZwHGsaMwF2/U=; b=tnA6CIEXI3dCj/ophEeg58ijIqqVAJ8nmWpzc5Cnm/miP0iFLHZbukU8vNPU1dCh04 4lxRDCgS5AQ2gQfQzwRjPTv2pFdUw+dwqcMZ8XL7HDDjfU9UXeKNr/lNq6pflj5deYY+ 3BCTtVdja1wOpatPZ2nVrdpTmqUngv3dm9ysn9aJrODUtek8MVAuRHxavxBKYn7SAuYl 8Ees3ZNvzGBBudCUgQQeaSxlULU6fD/MMV7Er/m892XHUevQ8RN3783qRKQpjw2ev5bg nxIpxPRfr4NZKYAoGZJN9kvDt0crgxI0N8G2hKxgxRi4fIeEso5vZvSVTc4LAtBetEI8 LSzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-kernel+bounces-167516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167516-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dk8-20020a170906f0c800b00a526fca3ca0si1371827ejb.122.2024.05.03.03.20.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 03:20:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-kernel+bounces-167516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167516-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6E19C1F2314E for ; Fri, 3 May 2024 10:20:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F13D71509A6; Fri, 3 May 2024 10:19:42 +0000 (UTC) Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C54914F9FD; Fri, 3 May 2024 10:19:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714731582; cv=none; b=TKQAO6S3iH9rOfu8lNKzMn3/WqRreyZSIiQ3qufeeVAkjcmaI72ucYHH2wHMHjd4ppNm7xuvx34eYm++K5m4SzIgGKYOiTEQNuBFHJxhRzZFj2uxlVwa2nSWkH38uNuYuDuTTxXKi4rf7g1kYq36bcrZa4Z1P90yVqVagHU6QJY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714731582; c=relaxed/simple; bh=CwbRZryxDvSIlBPZ/SNUliy+TfASd/RcVyRRmY5+U0c=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=ua6H5g3ph9wHFWcr13aASpx84S70zdFMV/ZOL/8EKEE98/g7OJDYnrA1dkKqLdr5MRdcvmbAiSaScLaMDlrVnonBY9J9TU/2GxrpRbRUi3tkce1MMosJZH2q2esvUBvxNNOt0V0V/W+n6VturY2CcpxrM6/OEIOwI8f09vGgNU4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 443AJ5byC3408017, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 443AJ5byC3408017 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 May 2024 18:19:05 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 3 May 2024 18:19:06 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 3 May 2024 18:19:05 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::1a1:9ae3:e313:52e7]) by RTEXMBS04.realtek.com.tw ([fe80::1a1:9ae3:e313:52e7%5]) with mapi id 15.01.2507.035; Fri, 3 May 2024 18:19:05 +0800 From: Justin Lai To: Simon Horman CC: "kuba@kernel.org" , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "andrew@lunn.ch" , "jiri@resnulli.us" , Ping-Ke Shih , Larry Chiu Subject: RE: [PATCH net-next v17 02/13] rtase: Implement the .ndo_open function Thread-Topic: [PATCH net-next v17 02/13] rtase: Implement the .ndo_open function Thread-Index: AQHanHHZpNHx0voP+0CDD26jysJVP7GEr5aAgACdBfA= Date: Fri, 3 May 2024 10:19:05 +0000 Message-ID: <3199bfed19ad4e0bb8ca868b6c46588a@realtek.com> References: <20240502091847.65181-1-justinlai0215@realtek.com> <20240502091847.65181-3-justinlai0215@realtek.com> <20240503085257.GM2821784@kernel.org> In-Reply-To: <20240503085257.GM2821784@kernel.org> Accept-Language: zh-TW, en-US Content-Language: zh-TW Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback > On Thu, May 02, 2024 at 05:18:36PM +0800, Justin Lai wrote: > > Implement the .ndo_open function to set default hardware settings and > > initialize the descriptor ring and interrupts. Among them, when > > requesting irq, because the first group of interrupts needs to process > > more events, the overall structure will be different from other groups > > of interrupts, so it needs to be processed separately. > > > > Signed-off-by: Justin Lai >=20 > Hi Justin, >=20 > some minor feedback from my side. >=20 > > +static int rtase_open(struct net_device *dev) { > > + struct rtase_private *tp =3D netdev_priv(dev); > > + struct rtase_int_vector *ivec =3D &tp->int_vector[0]; > > + const struct pci_dev *pdev =3D tp->pdev; > > + u16 i, j; > > + int ret; >=20 > nit: please use reverse xmas tree order - longest line to shortest - > for local variable declarations in new Networking code. >=20 Hi Simon, This is partly because ivec needs to use tp for initialization, so tp is placed in front of ivec, causing this situation.