Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1620195pxj; Fri, 21 May 2021 20:18:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWEL8RFqLlVdtcLUfpIEu4SdrEygMW8ki++RsGVPh+rRujt6E8Gv+M38STYkn5gsc9LQO/ X-Received: by 2002:a17:906:134e:: with SMTP id x14mr12997235ejb.190.1621653509261; Fri, 21 May 2021 20:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621653509; cv=none; d=google.com; s=arc-20160816; b=Qv1ey3hAgRk53OfZ1ExdM1A4Aa4UfKOMDu/4XUAtGLmpyrC1k76Ytzs8SVJvZKE4Lc mnfubIlABpcskivSqyDA3SrRgC8yPacgUOPxxvrsahQM0rQ1LuOpwL2BcgNRgAquh50h /vvhGQJcur7x8JLXP1KSDyA1fBj5r7uGpREqqJzVOpL2kszRYyq0NPTbJidtxgcjp8Z6 UXuWVFPgx4C5qmfCIclCtm/sasiDywlDZh9ZaomgRnW7uMHcscJzIzEeXNqquaSsJJpu n0+aI0kfFnSz61RZdGTiFN868IWOKjLW5DVllwt0zRvhn5lO+72nl+OKgZ2XF9SwLuKU zIaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=WKMn4LJoiICknKS7ZQXdIatkmtUrq6H+DAH6IjO2hAI=; b=NGaWO+t0xuS46ewmNsuhoN7Otp6ENnHYsc1JZ2B2hMr/9U1AwHqgVojYCyrpS7pJ2o 8XryoeFVX7w7G0bSovnaBR1wDk8J8kZOJTG5kAcgkExybHMOHjorNAiZmTQL+1RYei+k U15wbG47mbftvGNChocVqn+YA/S907ZsG6xsGtAkqzOI13pFAMmJtEwd3mMHrYrC7JBZ 2GemhmFUmg9JveZ11VmGzH1LSZ+lqdKH01wAO64GAMF43C6Bo92GdmaHbatxsOLFpbtT hLBb+ExxYLCVuMI3wm8kbty8BAYURcrHtPExoHO9yJz6yk3b0gsG4oE0xjkt78byYa6o kJIw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i21si6663947edc.289.2021.05.21.20.18.05; Fri, 21 May 2021 20:18:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231317AbhEVDPT convert rfc822-to-8bit (ORCPT + 99 others); Fri, 21 May 2021 23:15:19 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:51139 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231166AbhEVDPS (ORCPT ); Fri, 21 May 2021 23:15:18 -0400 Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.73 with qID 14M3DfGT2011316, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36502.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.71/5.88) with ESMTPS id 14M3DfGT2011316 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sat, 22 May 2021 11:13:41 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36502.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sat, 22 May 2021 11:13:40 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sat, 22 May 2021 11:13:40 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::1d8:ba7d:61ca:bd74]) by RTEXMBS04.realtek.com.tw ([fe80::1d8:ba7d:61ca:bd74%5]) with mapi id 15.01.2106.013; Sat, 22 May 2021 11:13:40 +0800 From: Hayes Wang To: Greg KH CC: "kuba@kernel.org" , "davem@davemloft.net" , "netdev@vger.kernel.org" , nic_swsd , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , "syzbot+95afd23673f5dd295c57@syzkaller.appspotmail.com" Subject: RE: [PATCH net] r8152: check the informaton of the device Thread-Topic: [PATCH net] r8152: check the informaton of the device Thread-Index: AQHXTiDTUevScj9u/kW7OuVFBi+KHqrtKP8AgAGqvnA= Date: Sat, 22 May 2021 03:13:39 +0000 Message-ID: <73dec4e9ba05452c90af9e174cacf7f8@realtek.com> References: <1394712342-15778-363-Taiwan-albertk@realtek.com> In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.177.203] x-kse-serverinfo: RTEXDAG02.realtek.com.tw, 9 x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?us-ascii?Q?Clean,_bases:_2021/5/21_=3F=3F_10:46:00?= x-kse-attachment-filter-triggered-rules: Clean x-kse-attachment-filter-triggered-filters: Clean x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-ServerInfo: RTEXH36502.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-AntiSpam-Outbound-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.20, Database issued on: 05/22/2021 03:00:35 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 0 X-KSE-AntiSpam-Info: Lua profiles 163845 [May 22 2021] X-KSE-AntiSpam-Info: Version: 5.9.20.0 X-KSE-AntiSpam-Info: Envelope from: hayeswang@realtek.com X-KSE-AntiSpam-Info: LuaCore: 446 446 0309aa129ce7cd9d810f87a68320917ac2eba541 X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: realtek.com:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2 X-KSE-AntiSpam-Info: Rate: 0 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 05/22/2021 03:02:00 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Greg KH > Sent: Friday, May 21, 2021 5:43 PM [...] > We have a USB core function that does all of the above for you, why not > use that instead? > > Look at usb_find_common_endpoints() and > usb_find_common_endpoints_reverse() and at the very least > usb_find_bulk_in_endpoint() and related functions. Please don't > open-code this type of logic, it's easy to get things wrong. Fine. Thanks. Best Regards, Hayes