Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF870C433F5 for ; Thu, 2 Dec 2021 11:21:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357291AbhLBLYg (ORCPT ); Thu, 2 Dec 2021 06:24:36 -0500 Received: from 113.196.136.146.ll.static.sparqnet.net ([113.196.136.146]:39346 "EHLO mg.sunplus.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1346343AbhLBLY3 (ORCPT ); Thu, 2 Dec 2021 06:24:29 -0500 X-MailGates: (flag:3,DYNAMIC,RELAY,NOHOST:PASS)(compute_score:DELIVER,40 ,3) Received: from 172.17.9.202 by mg02.sunplus.com with MailGates ESMTP Server V5.0(31415:0:AUTH_RELAY) (envelope-from ); Thu, 02 Dec 2021 19:20:52 +0800 (CST) Received: from sphcmbx02.sunplus.com.tw (172.17.9.112) by sphcmbx01.sunplus.com.tw (172.17.9.202) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Thu, 2 Dec 2021 19:20:47 +0800 Received: from sphcmbx02.sunplus.com.tw ([::1]) by sphcmbx02.sunplus.com.tw ([fe80::f8bb:bd77:a854:5b9e%14]) with mapi id 15.00.1497.023; Thu, 2 Dec 2021 19:20:47 +0800 From: =?big5?B?V2VsbHMgTHUgp2aq2sTL?= To: Andrew Lunn , Wells Lu CC: "davem@davemloft.net" , "kuba@kernel.org" , "robh+dt@kernel.org" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "p.zabel@pengutronix.de" , =?big5?B?VmluY2VudCBTaGloIKxJwEPCRQ==?= Subject: RE: [PATCH net-next v3 2/2] net: ethernet: Add driver for Sunplus SP7021 Thread-Topic: [PATCH net-next v3 2/2] net: ethernet: Add driver for Sunplus SP7021 Thread-Index: AQHX5dF9eGPWQxkNKU64ogPFWvAIaqwcdcyAgAE+n/A= Date: Thu, 2 Dec 2021 11:20:47 +0000 Message-ID: References: <1638266572-5831-1-git-send-email-wellslutw@gmail.com> <1638266572-5831-3-git-send-email-wellslutw@gmail.com> In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.25.108.39] Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgQW5kcmV3LA0KDQoNClRoYW5rIHlvdSB2ZXJ5IG11Y2ggZm9yIHlvdXIgcmV2aWV3Lg0KDQoN Cj4gPiArKysgYi9kcml2ZXJzL25ldC9ldGhlcm5ldC9zdW5wbHVzL3NwbDJzd19kZWZpbmUuaA0K PiA+IEBAIC0wLDAgKzEsMzAxIEBADQo+ID4gKy8qIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBH UEwtMi4wICovDQo+ID4gKy8qIENvcHlyaWdodCBTdW5wbHVzIFRlY2hub2xvZ3kgQ28uLCBMdGQu DQo+ID4gKyAqICAgICAgIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQo+ID4gKyAqLw0KPiA+ICsNCj4g PiArI2lmbmRlZiBfX1NQTDJTV19ERUZJTkVfSF9fDQo+ID4gKyNkZWZpbmUgX19TUEwyU1dfREVG SU5FX0hfXw0KPiA+ICsNCj4gPiArI2luY2x1ZGUgPGxpbnV4L21vZHVsZS5oPg0KPiA+ICsjaW5j bHVkZSA8bGludXgvZXJybm8uaD4NCj4gPiArI2luY2x1ZGUgPGxpbnV4L3R5cGVzLmg+DQo+ID4g KyNpbmNsdWRlIDxsaW51eC9pbnRlcnJ1cHQuaD4NCj4gPiArI2luY2x1ZGUgPGxpbnV4L25ldGRl dmljZS5oPg0KPiA+ICsjaW5jbHVkZSA8bGludXg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