From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f52.google.com (mail-dl1-f52.google.com [74.125.82.52]) (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 243823ED5B6 for ; Fri, 6 Mar 2026 16:16:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772813802; cv=none; b=nIDNXGJHguMYCrWrvEZXhf0ZFjAiz1qGT1tA0OAmVziyuBsfdbhwyKJsOxROWaranjgmGHLjEOhBM/EI8bc1+skfEENXqGKMRZ0GY9P9OdZHHJugOYtC/HQ0NHmuSkjkqAUu6sDBIE6duoCblOykbFM8rb0Wp2AmScdaEG3w6QA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772813802; c=relaxed/simple; bh=Q03wZP+jr95hI+NvHot1Du0zkm1UPz2DNNkQXx9mhXQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Wk+9KSmgUQkKb1Zqx+r3U58PGaocEkFe602+oVRt1TGj9Wguky2DoWljVcYuRzRk8fj+RZDLbp/xt0NMGbLapQeblgV8rdX+HEb7IaIVx+4C35TWzLx6DzD70hUu5vyHaMyD3TXf+J2w1CF1h7D1wJ1TeaoCtdr5iLM/6KDxtD8= 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=j5I3SB28; arc=none smtp.client-ip=74.125.82.52 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="j5I3SB28" Received: by mail-dl1-f52.google.com with SMTP id a92af1059eb24-1277d379936so11063034c88.1 for ; Fri, 06 Mar 2026 08:16:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772813799; x=1773418599; 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=SnvWTL3iEv/kL4tiEZKqQzSZXrgIInwKEy4wywpIFZk=; b=j5I3SB28qbl+1DiCPa6MKyA5QeufhImaZw/hyWbtmxd3kNMd2JpeZdM1ya2oPexZSJ eB/rGpXefxET2RAtO4MdJhN1N4MJoi96s92hQybxdSiF5DVOp7UicRExGZATk3lHYVtL GVtFW0Wmv8fUgMV1cMGrmqm3iPfRgSaB07zagWo1hMi4HIkuGwRgExRabPejx3S1TAkC Son7KnNFLY3VHb+X8M+rj+mGqvqCYQLCT6Y0tRzvQUxCi2KTJPP6kb4ZeoY7uI5BAV5F SGihLEgJM+AJ54sNWqVV+X4wg+0C3rHMA/Eb+8RvmqbYWHpHUvqziFk/9WH6uwZO9juA ggtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772813799; x=1773418599; 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=SnvWTL3iEv/kL4tiEZKqQzSZXrgIInwKEy4wywpIFZk=; b=SIs85FQxegh/f9TQM4FSTnA1yViC2nqqNy4uf1CMzEQOUu7e7TvH90LgjxTgsIWV24 P/9iZpUEm2cPZFjEAiG4qbs2lfw5gzsXC4ns9tkxQglcJ9Rvb3aysz+tdAhf9qoa4TjR XEHtXmejyWWVNIt3PMyL9Gb+2A2tktNBMjnXUt0IwKekevLlUDVaobWVbnAchQy6WzD1 i8aWk7/U1a1ITwsOCQR9Dj8/+ynMJKvRjmKXArI0nDcHLrOTd4vxgUIHrwkaksfgpaHP FhGo+AVapZ7GdvY5R5Av4ZlBpK372yVBPoxZOHR0srw4SxkwrsvyE+9BK4RzwwOT346Z 55XQ== X-Forwarded-Encrypted: i=1; AJvYcCUfA5V/d27RROcqdk400R3VJRDrh061Z9bEmICE3zdnDMQErCrLKQzCpZKr9mKCztSnPk7IfcuNFlajws0=@vger.kernel.org X-Gm-Message-State: AOJu0Yw7xF7wK1tVoAcDBePHylQ0xM1oBfh4tA6UIQP3upUyDONcW7E6 PuyP5hPybqDKZr+TUe7ZWM0srgwYXT5xI/3urcCXeTuXFWMBJeccX/x2 X-Gm-Gg: ATEYQzxgtxsJbEhGHaq0yM+Jd1+nnpXvK1HLHHXjDLKmErqwmUenKvn03UVHaGCDGLo 6qTjRHZwFBZ4J3Jp0QOTZEAWkCx/L5A9cHFmFYyiHMy0thG0VKZXbALZ7CYTAfgTSLGmCk2hjKb dILviYBIDBJZn8imFDUqB4ymyzAsk22DM7TFagcajIvkLgSALj90S6WsCpIqupgxyL6NmDlQUl8 ViaH50mIUc0Kmf43gwJWExWjbg9fZihFm4RTZr6/6ilP6uOQoKh10SqK4RmQLJbiTY0Tdm2dCF8 F9Jqk/j3cc0vkdZ1CsKlq6qpHCeKIF3ranzVqWqNUSE2LdJil2GxgK83IuvYTIq2dy+PVbg+6YG vhO0GvNI3705ejxRT8MOUQTtCY8U+5BUkYK0jfE0UKgImUzFf7RUcf5Bh1jOlO4vjpk9xvk986B y8tGyIcX+Ddlq3NYkGPF9BaiyF4zPMhkAtTRYTH9xwPnUbzNc= X-Received: by 2002:a05:7022:1e03:b0:11b:9386:8264 with SMTP id a92af1059eb24-128c2ec8795mr901108c88.41.1772813798951; Fri, 06 Mar 2026 08:16:38 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-128c3f5a102sm1569468c88.13.2026.03.06.08.16.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Mar 2026 08:16:38 -0800 (PST) Sender: Guenter Roeck Date: Fri, 6 Mar 2026 08:16:37 -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 01/11] hwmon: (pmbus/bel-pfe) Remove use of i2c_match_id() Message-ID: References: <20260305195642.830695-1-afd@ti.com> <20260305195642.830695-2-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-2-afd@ti.com> On Thu, Mar 05, 2026 at 01:56:32PM -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(). > > 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. > * 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. The above seem to be boilerplates, not matching the actual patches. AI review says: This isn't a bug, but this description is inaccurate for this specific driver. Looking at the code before this commit, there were no manual checks for OF or ACPI match data (like of_match_device or acpi_match_device) in pfe_pmbus_probe(). The driver only ever relied on i2c_match_id(). Could the commit message be updated to avoid claiming it removes manual OF/ACPI checks from this specific driver? Similar feedback applies to most of the patches in this series. Please resend the series and drop inaccurate information from the commit descriptions. Thanks, Guenter > > Signed-off-by: Andrew Davis > --- > drivers/hwmon/pmbus/bel-pfe.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/hwmon/pmbus/bel-pfe.c b/drivers/hwmon/pmbus/bel-pfe.c > index ddf9d9a2958c4..6499556f735b4 100644 > --- a/drivers/hwmon/pmbus/bel-pfe.c > +++ b/drivers/hwmon/pmbus/bel-pfe.c > @@ -88,13 +88,10 @@ static struct pmbus_driver_info pfe_driver_info[] = { > }, > }; > > -static const struct i2c_device_id pfe_device_id[]; > - > static int pfe_pmbus_probe(struct i2c_client *client) > { > - int model; > + int model = (uintptr_t)i2c_get_match_data(client); > > - model = (int)i2c_match_id(pfe_device_id, client)->driver_data; > client->dev.platform_data = &pfe_plat_data; > > /* > -- > 2.39.2 >