From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FEF73AE70C for ; Fri, 6 Mar 2026 16:22:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772814167; cv=none; b=SZslVYmK/1PzeOMabNYoR9olfERHHez3pFmfrOenKsGVtgwRQ9TgNm5lPLt9LCSOIpLVAMBZc4GDmxwCjVHaKlUV3b6IRwb0gCD+t6C4o1WxwnPG+BWCvfLGm0/cFgk14MNldMplFvJROPQ6srtUfISAWOSEaVVGtht1tnYLj2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772814167; c=relaxed/simple; bh=RTlYYkZYNjOQMgYETbCkdxYuRb/GQVaSBT807Dubhy0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t8cIW1U5sjXu9LAA4lFqSgDLXS6UAjnrXW9+MGsCdReRbFEADHsOzZfli17ikX1ivSsx+M1oua6T5VXJUGX4bbl66UR1D/esoXXJ0UqzPlBSRh5Lg64MzEzkRK0fIM1qkOweajwesyeJEW5mUgvQKaVn8/QNZdrIXGY1QPom0Ic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Q5aXQydV; arc=none smtp.client-ip=74.125.82.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q5aXQydV" Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-2be3bdfda8eso2533863eec.1 for ; Fri, 06 Mar 2026 08:22:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772814166; x=1773418966; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=xZaLKsYrYsqmlYJpsUyzhmqrHURB2MPZmeFHvFmeA5g=; b=Q5aXQydVgv2pDdNpSjjVvgnUOXn6T+qanCb6egv8s+GQCvjUuKB8Zn1Duq3QlxQkTW BVBFhg89+D2W6PnbGBNoIGfvKXqgd79OnCyLFN/pSq6yvQxvMb4jnn1xYDTazJLEH6Yw TzoVW5+JrEpHZg899204+WPp5MxKGoFcN66+XjN7mdh87IQbVkFht/iquLrIj+/YVyq7 jiMmZvRJ5nUrURuDBomtNZM85EmWiGfx25ayyiyU2tkRoRZKY83EM3Cz8UiuTgslT8+p 9UjajeMmFyPEMywCk3UxjYERmK+yqw0P+UEDsyANV86h30kIS1ZdqB2zRBvuldXJ2Il+ 42Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772814166; x=1773418966; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=xZaLKsYrYsqmlYJpsUyzhmqrHURB2MPZmeFHvFmeA5g=; b=Ei9KV6CjUuhuIGZFDzSWRh+QJNLlZ1QzrXnXDy7zsxu9RnJfUif1yLXPgTnnrj3REy 1yWwi5AV+CaLgCeL7niRyY9F239pOWM4vvhl6YphhFD4swgskwqt03/pEC8s1h11J3Ic 6cb060k+OPvexIo5JoOrTxeh1on7gH2tzts410+/Fxb41YM6URTwgQ8nSHS0EqmLRRpr BMqNPeV5SZJFuC0ErD1ku5w4MAi2EWwVehI4zTjkTyk7CrJJYySyG7k83FZ6BHh8HTZT qn1bEd6SZwJ13g46cADUDBQAUmb2e9xOgSk70x/gDJkDgKs3biDQ3rtXDUB5IKDYYsoI mt6A== X-Forwarded-Encrypted: i=1; AJvYcCX0jr1TUEYat4hTmOayG4eYPMOn+uK7YsqoG0LAdea5aW705pzCVJIZGRo32RO4WQ8qvkVuN+OT46KbDSI=@vger.kernel.org X-Gm-Message-State: AOJu0Yyv+ejmPb7kpN1m6YLGSWq/QM5wbmBJB/7mpIYY/u+wOc9bv8p/ THkersJmeYYzTtSlJB8X/p7jiU8CkRJKwW0x5BXPkf5Bfi3Y1BMQFK8g X-Gm-Gg: ATEYQzwsVXmwvM3U0whjXycIlIgu3Fr4oV+FzsOLRPkK0yOjAr9bRvl/a+LWZQBhhno 25ZYZILJmjjKuLXYEjr858c+TdhJQEVPw6Ug10/oRu5G/hMpZJ9G10hM/Nl80CZLpmkVauzx8l/ L7854dhUaPv/dC676vrcnHf2bz8lsvbrxD4xIyln48fStE4c3FfZZ2h8YGV3zI2Cr3uBWO4RkgI fTFQoMHHDPTc4wVo7g3gzxiAPJjom2zA49T64ymB6ehc6Dgm3MF159qPFBRCb1Ex+6A3Kbr17SJ xt8u6DJhSwqpkZyuiOKDnoVne6v4YqJXtMIKzi1kpgpYa3tFyWthvJzmR8l/pV044f6kqIjKwOX 6d40csSorsg/MpOgsxsbba+J7Hy/A2FKbc2douhMWOpyISRrtJK9cAtgyvq7ymqeEBEWVs5bnB7 QJ9olB1M11UXqx7Mr5pifyIVX+DT+4Udjj9UvK X-Received: by 2002:a05:7300:a887:b0:2be:1f58:329c with SMTP id 5a478bee46e88-2be4de8fc9cmr1071354eec.11.1772814165502; Fri, 06 Mar 2026 08:22:45 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2be4f8078c6sm1769855eec.5.2026.03.06.08.22.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Mar 2026 08:22:44 -0800 (PST) Sender: Guenter Roeck Date: Fri, 6 Mar 2026 08:22:43 -0800 From: Guenter Roeck To: Andrew Davis Cc: Chiang Brian , Erick Karanja , Grant Peltier , Jeff Lin , Cherrence Sarip , Kim Seer Paller , Alexis Czezar Torreno , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/11] hwmon: (pmbus/max16601) Remove use of i2c_match_id() Message-ID: <5066f410-a1da-4d66-acd9-e198f8e7df2e@roeck-us.net> References: <20260305195642.830695-1-afd@ti.com> <20260305195642.830695-12-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260305195642.830695-12-afd@ti.com> On Thu, Mar 05, 2026 at 01:56:42PM -0600, Andrew Davis wrote: > The function i2c_match_id() is used to fetch the matching ID from > the i2c_device_id table. This is often used to then retrieve the > matching driver_data. This can be done in one step with the helper > i2c_get_match_data(). ... but the code below doesn;t actually call i2c_get_match_data(). > > This helper has a couple other benefits: > * It doesn't need the i2c_device_id passed in so we do not need > to have that forward declared, allowing us to remove those or > move the i2c_device_id table down to its more natural spot > with the other module info. ... but it doesn't do that. > * It also checks for device match data, which allows for OF and > ACPI based probing. That means we do not have to manually check > those first and can remove those checks. > > Signed-off-by: Andrew Davis > --- > drivers/hwmon/pmbus/max16601.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwmon/pmbus/max16601.c b/drivers/hwmon/pmbus/max16601.c > index d696e506aafba..36dc13424d929 100644 > --- a/drivers/hwmon/pmbus/max16601.c > +++ b/drivers/hwmon/pmbus/max16601.c > @@ -318,7 +318,7 @@ static int max16601_probe(struct i2c_client *client) > if (chip_id < 0) > return chip_id; > > - id = i2c_match_id(max16601_id, client); > + id = i2c_client_get_device_id(client); > if (chip_id != id->driver_data) > dev_warn(&client->dev, > "Device mismatch: Configured %s (%d), detected %d\n", > -- > 2.39.2 >