Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp283653rdb; Thu, 1 Feb 2024 08:23:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPrcNShV7Sw5IKAtceVWmrlRwq9cCCE6Sr9Rm2xMUTWNVQDR2qjXgsQrylx3EPDiQAbpHu X-Received: by 2002:a05:651c:150d:b0:2d0:69b1:b44b with SMTP id e13-20020a05651c150d00b002d069b1b44bmr5636072ljf.19.1706804610940; Thu, 01 Feb 2024 08:23:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706804610; cv=pass; d=google.com; s=arc-20160816; b=RgJI3PWwTgu6JajZ2C01OmabxydGhJ/WVH4UdWngnx9OHYZKuEf+IAHUaIIs1l2mJs vrvORQty6SjsjV4xzLe3GlcyAa0X5M4l44dT9FjgSKUM0tCc9R8HorH0jmfzcDG1EFrF pYpBJHtMGP7t40XMGRIp3VYgCkJ+k8qXQ6t28MdfFnmZo0qZV9YoQDvN4bGCvnfJBvgz n9jfBf8e3akGlCUbr4mrstylsAmyKxJYQoks7CDOok+DUGeW7NQJwZI+r0w7TSwqXvDG bi7NQx+sKOKVvndN3LjNpvwKUY5I/ZVA8Vl6rkFjYVldCLEOPub/8xqNz3u+tNYxnO0w V14w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2bm7C4zBaRxEHtHnijKpshODpaBuCUwJZ3uIJhW1Zwk=; fh=m3fSaVkVUOlRHy6wuU9gVI84ri7eY8w8JT//n6o3OLg=; b=Es6oFOCdoozDS98PT2pq80a4317Rhi+z/SkTg9927bbGR7vS9i36O3KZ9cg2uxoqgD ruRaKt0/QKKZ4gx86JtPksenKfS+33hvH8PIFwLXBwb/78+Rzi6MbBPkrPlGcihcxgNN s6DjBOW/eC7D0tm8OvkwBP4p0/NK5+AMIy4bTsvenL1bapDgKUC9VA5oITXAOrngPJNa HTGylIWLI6ZKWTDvUM4CAwZFaPZBKq6Jhk9R+4tzqpeMQE32doecmg0RUIVxOL6N/Eyk XgiZKUx0pRs8z8xaCjyMwmRfkziC4HxkFyhMHL+5Cvbbs0BeTnfHot6VWvqpGQrrBfux nUHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iQf1BBrm; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-48511-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCUuUvVs5XExd0wj3KriyRjddnT7p8USzpmedrMs7U80lqNcx+iGdeuHGiG0gUk/i7AHXJarfyMkwTzrDlkHEB72Z0/cjPf73Io4EZtNvA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l15-20020aa7cacf000000b0055c971de51dsi6618640edt.384.2024.02.01.08.23.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 08:23:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48511-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iQf1BBrm; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-48511-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CA9091F27ECD for ; Thu, 1 Feb 2024 16:23:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44FA5163AA6; Thu, 1 Feb 2024 16:17:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iQf1BBrm" Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 ECCD3626BE; Thu, 1 Feb 2024 16:17:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706804275; cv=none; b=DfR99a2HHHi/usBAWBcLV0OmrHkRsjlK8CRJqv66csydikVXjyho28t3v7dq6tTn0cB35qx80zTYYDpJs4iIwqRGgKndMirhI1vxtD1bgJt8CvMiCe7XXzeZgX8NlisuYcIQnYTtuIXSNoLTMsI9xu7s6bFNsXsaVwJSr9VwWg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706804275; c=relaxed/simple; bh=jVgPnk47a0kmMu1SnTVlETox5FpEracdHmxLPBBbb0Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rTuv//Ga7CACy722Qzi/8kRXUMJdK6Z9hj+GTMhTEiZARTX70jR2dPYeFHElhD6OBEK4lFPhMxb4fMgoTIWVfPObHF6oN6Rmjn5ICHz09x5MfR9P0XQkQ38kebPtxbgfGew5iHsT4ZDVuhSk90y2cONJiGP1Y5KNK2GNaKL6ZC4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iQf1BBrm; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-40e72a567eeso10125725e9.0; Thu, 01 Feb 2024 08:17:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706804272; x=1707409072; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2bm7C4zBaRxEHtHnijKpshODpaBuCUwJZ3uIJhW1Zwk=; b=iQf1BBrmfdqvtScJCM+3XPt85nxA8yryNFY3y+M0Wt7NnAuCfFk2L3PyB0XyT58S/i H/oMtneaE3lqB5o8LEiaajb6EkE9Nt5AzlKqWEYA2wueCMf+m1zNBPizOKP//OmsQss9 4EJkQ2lGKstyg+cBqeAOmA6PRI2ZRW7CGSuDKgPUZPz7URIvdp/dKVYtEwtp8Sk6oBk9 2i1w6hJZS/MYqpVhHFzfUQvyfcW06vVtYvGWBbTcyYjB2hDgfKXNN5GzcoDRHfKJDhE9 FFpigdvmS8ixqjvw4Zpdx+gxqgioAAEy7X8eCE0/wIdY5AN/y+KasZ1rHpJpLNfOd8NB SMdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706804272; x=1707409072; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2bm7C4zBaRxEHtHnijKpshODpaBuCUwJZ3uIJhW1Zwk=; b=oBwnRCK+us97KG/VdKE88O/FxNG5U4+0nZ4wASVS0Jr+Smc/1zhvScSP0TdD45q+mc AuQ9LfH1EBIJ1lmohb6+R9M6gRiokZlgyGByRhnLWVkohbk1mkDAFJk4M3wgkto+zO4j elQRP4TRZ1srisxlnWX5nmIV/uRm7oM2vewx2fAUEvvUsnMcY2rjtSRKOfWxfKJSY0t1 Nn16CIOV+SRxVZbfnWpcuHof59AtVx7e/9orkidmmpwZQxngY9jDCuOVrovecJlb3ciC afBJZGcC/IGMJ2MF1eGTd6ogfvYlTU4DCw+nJB6y2Ki/A71HHpcIM0Ry2Ho7BRmbAU6C MvKQ== X-Gm-Message-State: AOJu0YzRxqq3auGKoZjh2yH6T0ZlLjUY9dBOKh0yX5SBQLFBKxPpdoIE Bu/OO4XK7O7PQ1tqP+T2thMq0Dn8duLHukJFw78VsiFywUuw4OsO X-Received: by 2002:a05:600c:190b:b0:40f:bef8:2c87 with SMTP id j11-20020a05600c190b00b0040fbef82c87mr1447351wmq.39.1706804271957; Thu, 01 Feb 2024 08:17:51 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXKr4L2sAmDkLE2iJ0MDwJlxLRc/8Q5Nz7mXGkv6l4wWI20MmjGuAZTPPz4K2T3EnY2zttITtp4Jr+1lkaQxhPvZSVgzJOFCDug/Tk6JxUfX40t2Iyjr5AiFK5cw8WV5Ds4uZH+3N7bKs9tHIAJNpaRZBu6udF+RWUNwm84kHc3LpALPUPw7f98MpBeM+xPDbrXmbcoRzpFNslE0S+xm5Me6TRunYhPOH6UfKpCN3WbTC7sK6sVnfYcHmsye81G9+DFQ+GWZrIuXymsl9UUmlUyit7m4dOcjfS+M2DwJ9JObuYiGyiWRjmog0SwrHnAwaMD2buzMDOgSUz1pKsCU7gO8fI3AeLeTfZ+5Pzx9on/Jw8CQgh38O7K2IJprIMqZYqyNg== Received: from debian ([93.184.186.109]) by smtp.gmail.com with ESMTPSA id eo9-20020a056000428900b0033ae9e7f6b6sm12463234wrb.111.2024.02.01.08.17.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 08:17:51 -0800 (PST) Date: Thu, 1 Feb 2024 17:17:49 +0100 From: Dimitri Fedrau To: Guenter Roeck Cc: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jean Delvare , Stefan Eichenberger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: Re: [PATCH v5 net-next 08/13] net: phy: marvell-88q2xxx: add support for temperature sensor Message-ID: <20240201161749.GB48964@debian> References: <20240122212848.3645785-1-dima.fedrau@gmail.com> <20240122212848.3645785-9-dima.fedrau@gmail.com> <88a60be9-083b-4618-845c-6983bcad3540@roeck-us.net> 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: <88a60be9-083b-4618-845c-6983bcad3540@roeck-us.net> Am Thu, Feb 01, 2024 at 05:18:23AM -0800 schrieb Guenter Roeck: [...] > > + > > +static int mv88q2xxx_hwmon_write(struct device *dev, > > + enum hwmon_sensor_types type, u32 attr, > > + int channel, long val) > > +{ > > + struct phy_device *phydev = dev_get_drvdata(dev); > > + > > + switch (attr) { > > + case hwmon_temp_max: > > + if (val < -75000 || val > 180000) > > + return -EINVAL; > > + > > Not that it matters much, but we typically use clamp_val() to limit > the range of temperature limits because the valid range differs for > each chip and is otherwise difficult to determine for the user. > Will fix it. Dimitri