Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p8XC7-0004as-IA for mharc-grub-devel@gnu.org; Thu, 22 Dec 2022 20:49:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8XC6-0004Zb-Ip for grub-devel@gnu.org; Thu, 22 Dec 2022 20:49:54 -0500 Received: from gate.crashing.org ([63.228.1.57]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8XC5-0002Kd-22 for grub-devel@gnu.org; Thu, 22 Dec 2022 20:49:54 -0500 Received: from u0f3226c756e75a.ant.amazon.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 2BN1moCo029793; Thu, 22 Dec 2022 19:48:51 -0600 From: Benjamin Herrenschmidt To: grub-devel@gnu.org Cc: Daniel Kiper Subject: [PATCH 0/3] serial: Cleanup & fix port discovery Date: Fri, 23 Dec 2022 12:48:46 +1100 Message-Id: <20221223014849.2112927-1-benh@kernel.crashing.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=63.228.1.57; envelope-from=benh@kernel.crashing.org; helo=gate.crashing.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2022 01:49:54 -0000 This series cleans up a few things in serial port discovery and fixes detection of duplicates in some cases: - Existing usage of memcmp to compare strings is replaces with strncmp - Don't lookup ports by name right after creating them, just return the pointer instead. - Move the detection of duplicates *into* the various port creation functions. At this point, the various attributes such as port number and address have been properly parsed and there is no confusion between things like wether a 0x prefix is present or not for example, or wether hex digits are upper or lower case.