Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp723125pxm; Fri, 25 Feb 2022 18:21:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMbn2Etll77k0fpLGH0UcJDpYD7m1UaKKgifjHKhZGRpszYZrarHovXCwt8Iv7ygXmV+YA X-Received: by 2002:a17:902:854a:b0:14e:e053:c8b3 with SMTP id d10-20020a170902854a00b0014ee053c8b3mr10387268plo.8.1645842080358; Fri, 25 Feb 2022 18:21:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645842080; cv=none; d=google.com; s=arc-20160816; b=tmTN27g9zLTGk+j4+kfVPKsmN6N40CodJ30iis6gnH8TyPKAc8Fa+5Fq9b0Onzs10Z WvLW0a4dB+3FZYlTl05jFhtoida2Igk/c0O8IqUMMroJAt5c7taePH4eOqyQmANnjcyR J8oZgJOM4VWXmQ4bymZjyP/IWtgH1qSCxB/KpTHc2mYzhHZMq1eXmzIf18rTSc+uehxQ YhMElS+y37wwbzfgZ2R67xdkEUxUW4exxXODEOc6khyo8Ye/GNPNriaMYeSaocjaZmS6 RqeRDhursrBGMHJ/gRs1it0K56StcmDy4IhIwgxnxI0Bym+P8374mNfxLt48fMs32XRs iB0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5/UfaZITJxu0H1BQwiMhOXGkrGHeskVTi/A9G28Of3c=; b=KP47aKHq78FndCu1Ud4k8m0AKqj+zqoPlXk3Fnjdq1Z5L9jiQzEso4FXybWsUcN8H8 bxoORRG5k+d0PtSnw07VUc7d+D7tb49v5eC4R19uMq6IyQ0xgxwv5yWedqWr7gmqP3DK cy9QkHS1aYBt3HYo9UxisdCnJG9illarjbUpX/eCHAq/HSojjXLh/1ZsEgQCUYEt/N2t LPAs/4KWzVcenoL27AdRFdrlbMKpA4TiL2V90OOGTIb6edu1hUe0T2cJBhHb9ZoSLrA6 vUPbmmxlVGje/r62l621wSVIlFfQscW8GYlJA2JadjAqO2IUWd6jPoXc78mrKOdVb7eC O1rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=PxBxo4FT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w16-20020a170902d71000b0014fc84e7b2fsi3088043ply.259.2022.02.25.18.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 18:21:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=PxBxo4FT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2575A52B21; Fri, 25 Feb 2022 17:52:33 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243747AbiBYRed (ORCPT + 99 others); Fri, 25 Feb 2022 12:34:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238311AbiBYRec (ORCPT ); Fri, 25 Feb 2022 12:34:32 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44CB41637FD; Fri, 25 Feb 2022 09:34:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D7679B832D0; Fri, 25 Feb 2022 17:33:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57A3DC340F1; Fri, 25 Feb 2022 17:33:57 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="PxBxo4FT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1645810434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5/UfaZITJxu0H1BQwiMhOXGkrGHeskVTi/A9G28Of3c=; b=PxBxo4FTEb2YcdGU6iJx5RXgFvNLDy/JCeoJNRQ/Aa7R3Lfg7yRyOXXIRKGiBV0f+yGzM/ C2CFBt8UQhl7eqDikkacwsWRJW12yY/SN9+cCYTHlG2ijA+CDQV61vuXvur47uVMzNhdSX tIGxR60SfazHMPq2RAQAiajq9yjO4zM= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 8eda722c (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 25 Feb 2022 17:33:54 +0000 (UTC) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-2d310db3812so41434197b3.3; Fri, 25 Feb 2022 09:33:54 -0800 (PST) X-Gm-Message-State: AOAM532yi2NHWIXamUiQgJoXKKd9Ud1//T9z+VxXovDhHqeXR2h0UlaC XTB5qvl3WaPzIDTxitupqAzw7hKKIqu/2EB2hyw= X-Received: by 2002:a81:c74c:0:b0:2d6:b681:af58 with SMTP id i12-20020a81c74c000000b002d6b681af58mr8883802ywl.100.1645810433242; Fri, 25 Feb 2022 09:33:53 -0800 (PST) MIME-Version: 1.0 References: <20220225155552.30636-1-graf@amazon.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 25 Feb 2022 18:33:42 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ACPI: bus: Match first 9 bytes of device IDs To: Ard Biesheuvel Cc: Alexander Graf , ACPI Devel Maling List , Linux Kernel Mailing List , Len Brown , "Rafael J. Wysocki" , Greg KH , "Woodhouse, David" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 25, 2022 at 6:30 PM Ard Biesheuvel wrote: > Yeah, good point. I think this is fine, although there are a few other > uses of ACPI_ID_LEN in the tree. So perhaps this should be something > like > > #define ACPI_ID_LEN 9 > #define ACPI_CID_LEN 16 > > /* explanation goes here */ > > struct acpi_device_id { > __u8 id[ACPI_CID_LEN]; > > instead? At a quick glance, none of those ACPI_ID_LEN users seem > related to the CID or the match metadata. Either way is fine by me. Looking at all the current users of ACPI_ID_LEN, none of them really mind if it's >9. I can't see where it'd change any behavior or performance or really anything at all, anywhere. So I'm inclined to go with my original simpler solution. But again, either way is fine. Alex, do you want to pick one of these and submit a v2 based on it? Or do you see a shortcoming in that approach? Jason