Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp144493rdh; Wed, 25 Oct 2023 20:02:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENqAX+kkQ71cCWxYXvnPpKNeHufJPM3EF9e96FecY2n3HvxPm8yYU1LUaJWFjEYJE3CX6F X-Received: by 2002:a25:8402:0:b0:d9a:b48c:7d96 with SMTP id u2-20020a258402000000b00d9ab48c7d96mr15510554ybk.1.1698289310367; Wed, 25 Oct 2023 20:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698289310; cv=none; d=google.com; s=arc-20160816; b=AtjPDtX+0l8bLoV3jeYpF2JQUWluYaI0P1g6/GyiBmS641Svnm2XnWMHkFp/d8pU6a C9OiOLYbZN0n7Hfe/ClSVJoGdg1GnrUnF0ZDusnnmJ8n7217oESRyaTEs9a2WW/+xTAb pskVq/jvsEGmF1F7JrkfSiZ6GGhX9rKhf+cMXxQzvADtH2xhSco1s+OX0s5sZwktpc+D Bi70JZeeJ+0v5dXhEDMm6bktfF5fEVIgRMLmRcj5MPTnIJetUQXeVsuuF+4vi5ckzdq5 fShhyrqu/rmTqs+IyWXeVMiG3IFnsy+JTXIgi6DThNIQ1zkGHH2Tetjf4h6tf4yNG7DG OQhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KqmzY42AkBqbJ2visQhGdc+emzVXck0kemI1A+g13SM=; fh=QstLVFYBUplCFqnHUFgOzyFJshLBWTEVSBkXCGUPkzU=; b=GVGzSBlN+bIvuJDhP5LKRaRitfgoh9RPZcXdaqNNO2vFEs8BTBbEXPvotk2KRHfY6n AuB6nWzo/FmdPtWZwjUbZ2lLm9cuAc5+Mwh6yHgKahG/5joAf/MF2yKW8FZZTAhBzyPv ICsHRguniEnNnn2Ra3T1aIMdHKtX0rD2N6Ww1gMbbM1t+IvT4vKcv7Hp0ZSrTDULJBdJ T2i5T0jZztMRVASs1THcgXBJY3o8XGszAVT3Y3kb/Jt5ZK8h8RYXV1ZcZBwmI185QmB6 jLZNW66iNXwSAADctP1V7qTYmJT8fjr8Uobb3nwHHBFl7kFT3JE9iEN8wzrtDySxUGiO TJ2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FWiqRLr1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t77-20020a25aad3000000b00da0390f6157si6887754ybi.139.2023.10.25.20.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 20:01:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FWiqRLr1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 68AA980775AA; Wed, 25 Oct 2023 20:01:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbjJZDA6 (ORCPT + 99 others); Wed, 25 Oct 2023 23:00:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbjJZDA4 (ORCPT ); Wed, 25 Oct 2023 23:00:56 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A58DA182; Wed, 25 Oct 2023 20:00:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698289254; x=1729825254; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=AiMwsKoIqJ/vLjZTysZ5Brq6QaeclE1a+bWmPlvUU8w=; b=FWiqRLr1y50gB5xRAZeBtYoHYxlwHbRrWeXxZsTqPryRPcK3Ek7xpCsr 6MElyy4R/MAwEV+B6pxFJ00GFb87DQyH7iBf/rAQ0bJc0TbreZS0ThCgh PG+u2VYr3WHMLEXk6pB3SRqk60qz17UlQarcikGjTo9+Wi+nlMN3+hVfz w2kwVmw0PlkCYeugjnsnImEf8S+bQjUeDNoDM2MQpTfzEN4Z97+654jXv t390MTBNdnqdS8uZbYCFjvgCBUisemf7g/l0eC8TM6oaVuErfKOxXClna poXlgjxSLxXuTNMffCirS1C9zjsjhDw6kvAmS4GECZEsiVshpA3I7NWAE Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10874"; a="366796595" X-IronPort-AV: E=Sophos;i="6.03,252,1694761200"; d="scan'208";a="366796595" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 20:00:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10874"; a="735606846" X-IronPort-AV: E=Sophos;i="6.03,252,1694761200"; d="scan'208";a="735606846" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 20:00:28 -0700 Date: Thu, 26 Oct 2023 06:00:25 +0300 From: Raag Jadav To: Andy Shevchenko Cc: rafael@kernel.org, len.brown@intel.com, mika.westerberg@linux.intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com Subject: Re: [PATCH v1] ACPI: LPSS: use acpi_dev_uid_match() for matching _UID Message-ID: References: <20231025053833.16014-1-raag.jadav@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 20:01:03 -0700 (PDT) On Wed, Oct 25, 2023 at 11:33:40PM +0300, Andy Shevchenko wrote: > On Wed, Oct 25, 2023 at 11:08:33AM +0530, Raag Jadav wrote: > > Use acpi_dev_uid_match() for matching _UID instead of treating it > > as an integer. > > NAK. See below why. > > ... > > > static void byt_pwm_setup(struct lpss_private_data *pdata) > > { > > - u64 uid; > > - > > /* Only call pwm_add_table for the first PWM controller */ > > - if (acpi_dev_uid_to_integer(pdata->adev, &uid) || uid != 1) > > + if (!acpi_dev_uid_match(pdata->adev, "1")) > > _UID by specification is a type of _string_. Yet, that string may represent an > integer number. Now, how many variants of the strings can you imagine that may > be interpreted as integer 1? I can tell about dozens. > > With your change you restricted the all possible spectre of the 1 > representations to a single one. Have you checked ALL of the DSDTs > for these platforms to say 'hey, all current tables uses "1" and > this is not an issue'? I'm not sure if I'm following you, this would basically invalidate every usage of acpi_dev_hid_uid_match() helper across the driver. Raag