From patchwork Wed Oct 9 20:03:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13829265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09018CEE350 for ; Wed, 9 Oct 2024 21:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=i+uVHUOU9deIeIerpwAIew5ByM1hiuI7rc50ZxBHn0c=; b=MqgWjS7SNl5c1bNSHe7nolKRtl 5WHQ0ct1mZCQVLHcHWWGP7vzGGVBRNma0o/qWjbgL/55RzDjYJNTiuyg4dVR6WblE7EHpe759gvPS 9TfUo27Kqu6BBnW0GkYeL6P+IWHmBIXqie1hLDoB8dox5G2XS+DlsWuLxHijPQFoohROapJgb1NFC u1wt2iK9uPxP+iggHAoXPMko1LpmzX/OY55mB3b2muMkB0u37gL+kR7bKzYtV2ELuTEdLRLEqHufS Z1kFTGcbyy0oB58xKl+BQhbNlUDEblepZl/E1BnSrM4T1VhSNkbeLzsSCqp5TCQaw8L6bp+0Fbezh Y2US89BQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sye2d-0000000AkfG-21hl; Wed, 09 Oct 2024 21:16:19 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sycuH-0000000AYuY-2Yse; Wed, 09 Oct 2024 20:03:38 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-53993564cb1so148546e87.2; Wed, 09 Oct 2024 13:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504214; x=1729109014; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=i+uVHUOU9deIeIerpwAIew5ByM1hiuI7rc50ZxBHn0c=; b=fYMt5zhnY5HsvKDJY773Pz0uisDEQw1G9nSmy4tI6wRMmDqEHImBdLocT4rSeZc62o /wXruxHboG3Cl2kfBhVo2Ym4842vWUXlF71tqw81Hssc9J4hFWkIYru082MvSjjq8ry+ zBs5tfBlm7YoMaLOoyADiy6VvikdLFaQmxvWUI8NKZELvApCryTTmRKDahA1SThxVhUz lcnhFh33vIV40qYdVH7zLefNMiu8uWArASDCmShtqjFoZaf5tY0c512Q/da5P2BJZIoK X5Scl48yR1ld1/UtE+M31a/I3Xp8c9vCZkBPNoJMeb/lXvEf4mp03z6kRMHfmaiP5OKb xapw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504214; x=1729109014; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=i+uVHUOU9deIeIerpwAIew5ByM1hiuI7rc50ZxBHn0c=; b=mXqzzcIb6fk8u2FIxhpNekQNN+oivjVF9nquRYCkHa0ZwYvo5Ra9VJdlj4DGeuPyLa dRn1+mGo1ZG4EVVPe0VJ6mCww8/oT7vpVT2ysVjWGZ49rG2ewxt4iGnLOhGrzbXOil8y v69YDWGJyTTw7uwUc5tINSqXd1tDSQ58Ta3c6grtV2rua1gbRqsx4Fdzrs40kzNjDbQ1 KHzTlFsLz+FrI1jfNVoUfZldStStlRTcNnM+2lx5rPq5Yhqe9ufz8/9YQ7uL9ycsaITN 2reNxNgUupm1fwFD6S07tbKcym241wbn7m5XamTP2+wgKI1V+flat628vUj/nkfC2vSc u5tA== X-Forwarded-Encrypted: i=1; AJvYcCVho+DsS4DDctQ6Jj9a95xzdc66OXuDuA42+j6kgBrIO6j35Hh5y6GJ3eKV/Bt5AXFp97UMWhizhpXzDESVzXFK@lists.infradead.org, AJvYcCWAvpjr16dpScKxeTcoE1iam18SrNm+DbleoB68MNvT1M1Pv8eqTi5WA7/hkJZxoFSu5nezhxxoHNdL7bMh5kHNGg==@lists.infradead.org X-Gm-Message-State: AOJu0YxSnqBz9f+ZFVS9iSGyRlZATnYZVK1ecgcXsRHjxIVdknz8ROwQ OwGVGa202LqWncm3jAs3RJ9v68c9TNNYiql27B/8Qgqo3Sc/QQRG X-Google-Smtp-Source: AGHT+IG4FfWa1XAC4GwW+YDRKpAvCsQhmAUQ1ilaZ0qG2t3YZf0j7u8PGdhBydz9ejeeZiHNICnlmg== X-Received: by 2002:a05:6512:31cc:b0:533:42ae:c985 with SMTP id 2adb3069b0e04-539c48e7bfbmr2603871e87.25.1728504214056; Wed, 09 Oct 2024 13:03:34 -0700 (PDT) Received: from ?IPV6:2a02:3100:b338:6300:ac71:eea5:34f6:504b? (dynamic-2a02-3100-b338-6300-ac71-eea5-34f6-504b.310.pool.telefonica.de. [2a02:3100:b338:6300:ac71:eea5:34f6:504b]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a993a3a1badsm656335466b.161.2024.10.09.13.03.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 13:03:33 -0700 (PDT) Message-ID: <8583cf5a-5495-476c-a309-169a83013aa9@gmail.com> Date: Wed, 9 Oct 2024 22:03:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 1/9] hwmon: Add helper hwmon_visible_0444 From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix , Jonas Malaco , =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= , Florian Fainelli , Michael Walle , Maximilian Luz , Ivor Wanders Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org, "linux-arm-kernel@lists.infradead.org" References: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzwmBVZbS/XRs64uJO8CB3+V3fa cIivllReueGCMsHh6/8wgPAyopXOWOxbLsZ291fmZqIR0L5Y6b2HvdFN1Xhc+YrQ8TK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f1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_130337_686601_39B2EADE X-CRM114-Status: UNSURE ( 9.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Several drivers simply return 0444 in their is_visible callback. Add a helper in hwmon core for this use case to avoid code duplication. Signed-off-by: Heiner Kallweit --- drivers/hwmon/hwmon.c | 7 +++++++ include/linux/hwmon.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index 9c35c4d03..7c26e241e 100644 --- a/drivers/hwmon/hwmon.c +++ b/drivers/hwmon/hwmon.c @@ -108,6 +108,13 @@ static const struct attribute_group hwmon_dev_attr_group = { .is_visible = hwmon_dev_attr_is_visible, }; +umode_t hwmon_visible_0444(const void *drvdata, enum hwmon_sensor_types type, + u32 attr, int channel) +{ + return 0444; +} +EXPORT_SYMBOL_GPL(hwmon_visible_0444); + static const struct attribute_group *hwmon_dev_attr_groups[] = { &hwmon_dev_attr_group, NULL diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h index 5c6a421ad..ce38051b6 100644 --- a/include/linux/hwmon.h +++ b/include/linux/hwmon.h @@ -422,6 +422,8 @@ struct hwmon_ops { u32 attr, int channel, long val); }; +umode_t hwmon_visible_0444(const void *drvdata, enum hwmon_sensor_types type, + u32 attr, int channel); /** * struct hwmon_channel_info - Channel information * @type: Channel type. From patchwork Wed Oct 9 20:04:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13829266 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75961CEE34F for ; Wed, 9 Oct 2024 21:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QTQ0jlOi1mGfVBZ2rR7lFPGy6cv5BdbVknfvj9hIlBw=; b=QkkgELZslSDe45UPmVYi/VIq+N aKIu+EAVVcFgSTdq1iZm0VFlmkW9R06T+SIQYOdtzhxwAHdVGOhS6WgUNGnG5x9OBmJAc1aRZPgvK 9jIHdF+sARPgjeaPekHHyNulcFUK3cUNZdZNqzYB/tVRpc8PQuufL3UtA3aoubiuxe7i3KZVcOBa+ bIro1i9qQV8ayZOfxaA6Z1SAzOipU4uTFW5SE3KaNBZ+cUouuNOYvzB4MttEnGrHljh7t8eSFu++r YUB+JImGEcyS+TREqyj3Y2TrGu1IF+S5Lo6yK0CJS4Bys9U6QJqTqVwnXkYAYQVNIZuFeukavL/qO zMBnQ3KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sye2f-0000000AkhG-12QA; Wed, 09 Oct 2024 21:16:21 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sycv0-0000000AYzZ-3hZS; Wed, 09 Oct 2024 20:04:24 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a7a843bef98so24468066b.2; Wed, 09 Oct 2024 13:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504261; x=1729109061; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=QTQ0jlOi1mGfVBZ2rR7lFPGy6cv5BdbVknfvj9hIlBw=; b=cqP/IPeNs5hmL4gEHP4OlGkAL6+JhIHGtiEjQdHuPfd4mJ/+FnOMTxfxwMb/wnpFkE MV+d2gqKRLyBghUc9RoKYQcaafGBDN/bGDAnpoYqYLZZAIdT6HI0LUawYs0wLaJHv3XF OxaW+F9hsTBu6QDRwl2hGFYEjIo2cfZwydh//q1soBO4tpI6eJ08XKLCXw4f+CEMnbdO QF44t+SHKMBszGI/ezM7a9mtQNzm1Xsn3JJL/BKdKBYc786MjmgV82an2WJG+cTE6CFT Z2hyDLBEK32FAPTPHEEB/SedfIh504nmqJHD/jYQod+A+pafa/U37yQI0cgBdMMasPBp uQQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504261; x=1729109061; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QTQ0jlOi1mGfVBZ2rR7lFPGy6cv5BdbVknfvj9hIlBw=; b=M3W5Vy0soUPlXSto59yFPcydWHxDONZcOpHlMC3NDrIhFBgL3ktK25mO2Mx5f3RKCx uknOsmdXpR6h9sgWGvVWhQRX1SrYaFZODC1MbL5lZm02CiByF6b6j3OeGaAf6xR7tU0A mx8Fzfyoysu1O0jddO3gKF8NnO67EsxXuRBLzaIeK0lVOIx5J/tUG4U2V3RkXEAuYJb5 zyZtuLxJceU8t+yuqsujoeVWpUfxhyyI6dgRcxXljQmQ01KJ9/XJcy6x+LVTund91hGx HRr7K/2KyXE4S5Z5Q8hrcsO4tQ7E0ptCFQ7J/ITpGKf+MarMNQbJQn5rZSnCQ3OLGR5z 1j6Q== X-Forwarded-Encrypted: i=1; AJvYcCVrfJDRHPGHmQE5Ir3o6isgGsmEOblOCiKbhyAuRDogNBzuBFXhfy0yYkfdcTt6uPs//EHaIH6s+fCQmIsFnmXO@lists.infradead.org, AJvYcCXxzt6kMx2wOui3P83xCB50NXByM9eQJjgNZNAR60nxTfps1AQZDa8wB/3hsx4T8DlgWD/WqySz57vwCosEI1EaJw==@lists.infradead.org X-Gm-Message-State: AOJu0YwBpOmaXD7dPkjCdqsQywH5HObrrpy9rGVB1mb2HtR509EwlHBp acLfjZp0GNzcxuceasZF5G57D8ipz4exBec8aKaAa0uVkJ6+0Tdx X-Google-Smtp-Source: AGHT+IHWX9uLJaSdKp8Ec7A4a4cNw8Y3L9j6ZgHvnh9gxoZDl2eFUmDCMymkwOkfOJgjwpcEQCrTRQ== X-Received: by 2002:a17:907:9810:b0:a99:4fce:c343 with SMTP id a640c23a62f3a-a998d1cb499mr351059066b.26.1728504260702; Wed, 09 Oct 2024 13:04:20 -0700 (PDT) Received: from ?IPV6:2a02:3100:b338:6300:ac71:eea5:34f6:504b? (dynamic-2a02-3100-b338-6300-ac71-eea5-34f6-504b.310.pool.telefonica.de. [2a02:3100:b338:6300:ac71:eea5:34f6:504b]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a9947bf72dcsm567309166b.191.2024.10.09.13.04.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 13:04:20 -0700 (PDT) Message-ID: <25079ec8-2b41-472c-a60c-8151fc906dcd@gmail.com> Date: Wed, 9 Oct 2024 22:04:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 2/9] hwmon: i5500_temp: Use new helper hwmon_visible_0444 From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix , Jonas Malaco , =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= , Florian Fainelli , Michael Walle , Maximilian Luz , Ivor Wanders Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org, "linux-arm-kernel@lists.infradead.org" References: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z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LTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_130422_956042_23CA479A X-CRM114-Status: GOOD ( 10.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use new helper hwmon_visible_0444 to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/hwmon/i5500_temp.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/hwmon/i5500_temp.c b/drivers/hwmon/i5500_temp.c index 7b00b38c7..819be21d3 100644 --- a/drivers/hwmon/i5500_temp.c +++ b/drivers/hwmon/i5500_temp.c @@ -29,12 +29,6 @@ #define REG_CTCTRL 0xF7 #define REG_TSTIMER 0xF8 -static umode_t i5500_is_visible(const void *drvdata, enum hwmon_sensor_types type, u32 attr, - int channel) -{ - return 0444; -} - static int i5500_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, long *val) { @@ -84,7 +78,7 @@ static int i5500_read(struct device *dev, enum hwmon_sensor_types type, u32 attr } static const struct hwmon_ops i5500_ops = { - .is_visible = i5500_is_visible, + .is_visible = hwmon_visible_0444, .read = i5500_read, }; From patchwork Wed Oct 9 20:05:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13829267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BE15CEE34F for ; Wed, 9 Oct 2024 21:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8mZDWEiIlQg7S2xqDiuV0YH/rM3kGck5+SNp5nnXt4U=; b=oyrBF7eZth2KEd5u/SrZEAFTo8 RYIUJuEyxzL7XrTJm1iIfduZ5YJZzvwAJOdN7XHQKqV25Zky/ksCeAcrCqPcibIKu90qf1jP/1NwJ Jg5kI70r43MjMDPy9brcqwHaNn4fuyaPCxIrL6uVT6S0eyW9b8NxP71UWbUzwjkKKTZ0RHm7yeJ+g hjYeDQZxFUmmncOHXtFCl+ieYABSv/+6asxVHoruVR8krKm1B5oKggl478s+EmGttPmE73VBFGqxZ RHtB+Yiq/KAM1xvfcerO06KXm/2Wn8ZG7nQWFl8Ag3KG4hjCLKBB1RzMkEvXE2rEdpBV6qLR2uM9H 89NnxVDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sye2i-0000000AkkW-3b1n; Wed, 09 Oct 2024 21:16:24 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sycvf-0000000AZ2B-3yhM; Wed, 09 Oct 2024 20:05:05 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5c5bca6603aso111640a12.1; Wed, 09 Oct 2024 13:05:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504302; x=1729109102; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=8mZDWEiIlQg7S2xqDiuV0YH/rM3kGck5+SNp5nnXt4U=; b=hwGs4eNirdAXGfVDKbvMC4tkShliVouUfTWR6VcSNAXeMnefdTZfY+8d0RldPcV6u0 q9xDzf1/GcD4eF8Y5aiwRUJD5ywtJSokLbGGe/I9i2Offt74JnGb+aeLohUTR0FUQi8K Aq99CzSVVjJ3X0KdmfJAWkU5l8YpDTiZJlbjPs+Ni+EPugGt3iyoTAjAD1DM7zoARlDz i2J7D0VykNZwqtpK44Cn7/lIt0/+vDm/6J9wpdh9aq1qfpBooTjgVE9Gd3nYHIsBtJH9 E/O+Vjf3Wpmh578Hxxv3mpBRoxXouvIYfs3meuzSevOqBkaE33AnTi7ioQfWFccSafCh xj1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504302; x=1729109102; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8mZDWEiIlQg7S2xqDiuV0YH/rM3kGck5+SNp5nnXt4U=; b=ZXwtQIk6PjbvSqnDeoQJ3+dX1kHxG/UOpMzVrL+mCAt5EPHAabxbRrZN3PNfnnji5o T1WPOgyBFQH5SV51KnGxhqQutkDtWL6D/1Ux8E97+DMvXznKZjDS6StARVOdBIpVWPyM LdDVoRc1OxKr1D3a8hgD6Da3x8Gz3uZgz5g3bvXKMhYX9dcaJqmlRu+0iD0N97rLvrKc IG1nqHN7lQqFiqVfg3jRfmjDJq0+HejaLgAgkzlVWIsADKqn+XvOq6QjWYx0pV03wUvO tpHfrYYv5VJqduEJAaewPIZEQmw9/h1QDoeymzepC8YWVJblCXL80Gj4BON5wvrBSz2L 6wkg== X-Forwarded-Encrypted: i=1; AJvYcCUk6CGPWrpsyQcLduifniQSLJT7Y92dBz3t+aK3Y5jH84mrq4ejYL9z77DXyq9J/CpgJ7keglpPaUvxfduXrElY@lists.infradead.org, AJvYcCVXoCM/UqWNywLd87Gpq4X/xErdLwWrv5iVWjVMID3vmuT4KPMj0Qr44OoMvA7oEU3gRt4R1ZWrRKxWYhGjHW3lrA==@lists.infradead.org X-Gm-Message-State: AOJu0YwOLNidSKebZK+WrQQ3eOB7e2ADMrcR68kj6/kGC5AUHDrgUpDE /rKB/jUQqmcy0C5C9K4obdmpUMEa2t8PmDmzAahjGqzO2nQuKNxX X-Google-Smtp-Source: AGHT+IHZHnjB/xXUwQPxQQfvhZHy+bc8ZdURKjvdyqInkMtPvuOa/xxpUrvLbZYAMMABBGjRj1lSuw== X-Received: by 2002:a05:6402:1e90:b0:5c2:1910:8e9 with SMTP id 4fb4d7f45d1cf-5c91d6c98c0mr3339018a12.36.1728504302159; Wed, 09 Oct 2024 13:05:02 -0700 (PDT) Received: from ?IPV6:2a02:3100:b338:6300:ac71:eea5:34f6:504b? (dynamic-2a02-3100-b338-6300-ac71-eea5-34f6-504b.310.pool.telefonica.de. [2a02:3100:b338:6300:ac71:eea5:34f6:504b]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5c8e05f3bf0sm5848472a12.88.2024.10.09.13.05.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 13:05:01 -0700 (PDT) Message-ID: <5eba910e-709e-4275-a018-17fa287dfb19@gmail.com> Date: Wed, 9 Oct 2024 22:05:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 3/9] hwmon: surface_fan: Use new helper hwmon_visible_0444 From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix , Jonas Malaco , =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= , Florian Fainelli , Michael Walle , Maximilian Luz , Ivor Wanders Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org, "linux-arm-kernel@lists.infradead.org" References: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K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hC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_130504_034350_67EEE62D X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use new helper hwmon_visible_0444 to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/hwmon/surface_fan.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/hwmon/surface_fan.c b/drivers/hwmon/surface_fan.c index de3c5a240..2f173c51d 100644 --- a/drivers/hwmon/surface_fan.c +++ b/drivers/hwmon/surface_fan.c @@ -18,14 +18,6 @@ SSAM_DEFINE_SYNC_REQUEST_CL_R(__ssam_fan_rpm_get, __le16, { .command_id = 0x01, }); -// hwmon -static umode_t surface_fan_hwmon_is_visible(const void *drvdata, - enum hwmon_sensor_types type, u32 attr, - int channel) -{ - return 0444; -} - static int surface_fan_hwmon_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, long *val) @@ -49,7 +41,7 @@ static const struct hwmon_channel_info *const surface_fan_info[] = { }; static const struct hwmon_ops surface_fan_hwmon_ops = { - .is_visible = surface_fan_hwmon_is_visible, + .is_visible = hwmon_visible_0444, .read = surface_fan_hwmon_read, }; From patchwork Wed Oct 9 20:05:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13829200 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CE751CEE345 for ; Wed, 9 Oct 2024 20:12:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Tab8ulX/uzp1+6fYBIMdT1It0Zn3BMBbGkpf8f3dsPo=; b=s52LB86pWy0uhjXcLZH8cVSoFA 2DF3Lz6/tht/NaWlJeIGOGVd1VBd1PocKObp1tlQSaCcArjXkfYEYdlQlbFRhZr0ejgAbO6J7O6ss o7pEV/ujO2Rcxtpr1XNchY64sWbNzTVX8MU0LevqXUpCbDljg1TCyUtwLrxQO2yD90iLENVRf0Ytw cgdAyRnavIqe0YM+lizEy6v/JbipoEaAR3zYmRxc8OoZPbM4dASYptgjqgRExO+Cnpwdejo/uO+xH C5sb8nu3MgZK29MKrcUKDB0J/d8oUA+g3NIARnIZ8rMuRpRgJ3ueoSvgMDTZ4/3mqLZx3xlDwOwrU p5jmQK2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syd2e-0000000AbPv-2ECM; Wed, 09 Oct 2024 20:12:16 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sycwP-0000000AZ4P-1qjy; Wed, 09 Oct 2024 20:05:50 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5c5bca6603aso112375a12.1; Wed, 09 Oct 2024 13:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504348; x=1729109148; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Tab8ulX/uzp1+6fYBIMdT1It0Zn3BMBbGkpf8f3dsPo=; b=dxp/Z+zdHsBYNP6GALIZOtvYZxk3jxLXQwvm9H8lPkiOdaN9FVot2Oyv/9bdTWtIHT muhHQzcfnFHWwiYLVWp3FOwKlOsPieWMfaebVroso/MIEQiJLwvqge8bUw9udNwFiMxw yqtr8F4ROCPlN9jDauCgBPLCvjNOjjLGmcTY2u6vGa/GpLF2KU/xaOuGqQTuxiv7BKMx QDZVHdBHzbC1agBvbT0uywT8TR22qG6aXZfJ/Ko9GBwEcJJT1OZB1KFwgU8BlUNSymbN ePEeCr3ktkMVC2CFnb8ZMI8ttoGbGSILuiXnNGKgyPGgnbdgJBIrLu06wzy6L/603F0q dfdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504348; x=1729109148; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Tab8ulX/uzp1+6fYBIMdT1It0Zn3BMBbGkpf8f3dsPo=; b=YR7Aa5ngExsd0wMhxkZ+w6b7XzEplgHT+nHBwnqneQbL8TC8vVfYisI6zvvEmJPxtA wdzHPbK5SGLGexF/XMRfkHmArFhamo2s3hnrrDHKgS9IckWuJ0UZ6n0vT9/0hP8Pgw3S uG2HEGd3GHGpoHmG0C4GXndvSsm46I0z0QNSrL7YKGP5Woy7ZW+TO3UIcd1ojee3J+OT Q8n15755VLtpkzq/7HDcM8MOdyXWoXCkYayqsBa22fXzavzc/58fsSTIUpdpRlXvMbTC vBoeKSP/+cSi4goFN2ZAxS8m1493iGpg2WZBSXMDAk1jzjvS/NGiGBFA6J9zHV2b3Zqc 1RLw== X-Forwarded-Encrypted: i=1; AJvYcCVIqFeA1BBSbdZo52k7uzjdksyE43lRladPgogLLDeQV7KPtjog7nObnohlD8Sp8Oi0yBU9EOpr5qCLPO8UC/ff@lists.infradead.org, AJvYcCWNC5iVtBj1/9+8jTbizaSfyXfe69l3y2MfeUjvJjukezoohkFWWKdQNoyv3Am5fffSlUIQ6rHnouZ7TaNe8o0aCw==@lists.infradead.org X-Gm-Message-State: AOJu0YwxshpdszXWvEJ7HmkqA6sl6BGyN23uirnqRjdV/gwlofccs4ic G4KppGlWBLUSaTuM7/uoji2+Wsv9t74EcSsnPeWpoADF5ugNoX3M5cfveuh6 X-Google-Smtp-Source: AGHT+IEwn0NyUjw3v519oNipSVIGNzNVzXZgEjNriHyVuj6xRjyAY9rdCtYOt/uqt/1eDX03+JoeEA== X-Received: by 2002:a05:6402:3546:b0:5c9:27aa:8421 with SMTP id 4fb4d7f45d1cf-5c927aa8c10mr2235163a12.1.1728504347842; Wed, 09 Oct 2024 13:05:47 -0700 (PDT) Received: from ?IPV6:2a02:3100:b338:6300:ac71:eea5:34f6:504b? (dynamic-2a02-3100-b338-6300-ac71-eea5-34f6-504b.310.pool.telefonica.de. [2a02:3100:b338:6300:ac71:eea5:34f6:504b]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5c8e99440b8sm5294199a12.29.2024.10.09.13.05.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 13:05:46 -0700 (PDT) Message-ID: Date: Wed, 9 Oct 2024 22:05:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 4/9] hwmon: sl28cpld: Use new helper hwmon_visible_0444 From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix , Jonas Malaco , =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= , Florian Fainelli , Michael Walle , Maximilian Luz , Ivor Wanders Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org, "linux-arm-kernel@lists.infradead.org" References: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6a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62WIO28IbY/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_130549_526685_05987B03 X-CRM114-Status: GOOD ( 10.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use new helper hwmon_visible_0444 to simplify the code. Signed-off-by: Heiner Kallweit Reviewed-by: Michael Walle --- drivers/hwmon/sl28cpld-hwmon.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/hwmon/sl28cpld-hwmon.c b/drivers/hwmon/sl28cpld-hwmon.c index e020f25c9..07fff262e 100644 --- a/drivers/hwmon/sl28cpld-hwmon.c +++ b/drivers/hwmon/sl28cpld-hwmon.c @@ -23,13 +23,6 @@ struct sl28cpld_hwmon { u32 offset; }; -static umode_t sl28cpld_hwmon_is_visible(const void *data, - enum hwmon_sensor_types type, - u32 attr, int channel) -{ - return 0444; -} - static int sl28cpld_hwmon_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, long *input) @@ -73,7 +66,7 @@ static const struct hwmon_channel_info * const sl28cpld_hwmon_info[] = { }; static const struct hwmon_ops sl28cpld_hwmon_ops = { - .is_visible = sl28cpld_hwmon_is_visible, + .is_visible = hwmon_visible_0444, .read = sl28cpld_hwmon_read, }; From patchwork Wed Oct 9 20:06:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13829268 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 742F6CEE34F for ; Wed, 9 Oct 2024 21:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nb8pOCtDHxPLiKmrGAiwuFobcA2kFtCdxgcgDzWTzq8=; b=ZX/JktHvVNFWy+lGz+EN8pLOPk TcJpwwLQaXoIVVAzxngIWCo9u3LaNXdoc+/VKE/YqWJ95OYJpotvdPiC1tMV/CM/ah3fkl5SZn7U4 z430pdlTkhOSVwX2kOQmaLZnIi50g1Y1LDmTu9iTXmQ+lAMAKVWvke/5Aa3Af22fQylYICF4Kb6DC sbSe4Mn+pq5JJYOjIjhFLs52fYKRd0hWa5S0oQKCNXaHMFV2As8z7e8jWP4UNeLgMcfmPzMq5qBpd JQSOMxVwjDnpB7RJXdwktS16uJeLYnO4JDJQRmEIW377SdF/TrlRa++0dMY0FceuAxFu0UbwOd3/l iL0upYsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sye2m-0000000Ako9-2xoo; Wed, 09 Oct 2024 21:16:28 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sycxA-0000000AZ6z-02wB; Wed, 09 Oct 2024 20:06:37 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a999521d0c3so30578066b.1; Wed, 09 Oct 2024 13:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504394; x=1729109194; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=nb8pOCtDHxPLiKmrGAiwuFobcA2kFtCdxgcgDzWTzq8=; b=VXKL4H69IldCdgAq/Vi0YZ0Cnn5LsUufQH6IVS8nskRxYnyjm1r2tIEO6vG/Zb3+nD c3cemdrH3/eHLAVMSJpdCx+4bOZhnXhEFxF5d8hjmRZAEM/DhyyiuVWdsg4CS2hquWKl PbvKqX7gUZ6F4T4dlvUt/+YnfBoGf4Gv3d5aQ6VrjSOZiFDTA5WZqQPepPnSMv6xDtvN xGk1ALBfIxKEe63uhfPfffSFbRNPGCBAk4PU8ecqefkyR40gqh09xXsyjDrGjtXhjpb4 dwmqrks+pZaUJk/KNqASdQqC8bMqRcYsI3ScndUklts3xldNExjlBxvDi1u0y7Kbxbm9 wCFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504394; x=1729109194; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nb8pOCtDHxPLiKmrGAiwuFobcA2kFtCdxgcgDzWTzq8=; b=wXlUUMmCOtdYQB6dt/cO0Q7WkfRVuJ3tFxLHc7lhXafcpPs1kUoj6y/zFAUy47ATOa A1dKc1ZE1hfDDkYaFpb10/Nps8HV/WVmkZa/n2YiX+Wdpuhrk1haWVVCW3qT0FAmgFQt bcCAprp0LTcjRb1U6aGs9FTohV2GvfRvfNg0pDW22VOCw2aoRk8RqDu+ky00AktDitzR SM3H+5/KdVZljJ3IgQdOOah+w1U9fPCO780PPour12nwNxqjwQiqGv6Kgho7Xf7s1449 krNa3Wms2YwWBCx8g31x52PoBXVMoY/OYej1YbUsxaVhDNW6eg16YWRsCZviv1HIraij LUPQ== X-Forwarded-Encrypted: i=1; AJvYcCUGoG9m/d/BSfcA9NOZOmTyYEb4extyQmgigtS4NqEr3J5jVu1ftsTNmUVOr/cOfd3FnCo+uatLx7xkj7zCGHHI+w==@lists.infradead.org, AJvYcCVGbzYFX4mI7lrk1QRzrhRHerBloIWo6KpSHfSnO0fqcAB/LLnbHBgpDFRNAVhIjk7+17F1BQ24sEZSqt4aEwK/@lists.infradead.org X-Gm-Message-State: AOJu0Yw3/kCUH0AkWUFaWJqB/cVhgQkyiv3vynbzNL9uygndB7xKNMVN jl7irtsxBdML+lF/2BkSErLw3BDvR4nFd6tgdcOExBR/5+ZAt+bK X-Google-Smtp-Source: AGHT+IHC78mKAzsxrz9lriE6NNMOEAx9AAH0501PJyVV3I1pdytg20VZCwdCWODLPoC3c5Q5JVX6rg== X-Received: by 2002:a17:907:94cd:b0:a99:5b55:1a75 with SMTP id a640c23a62f3a-a998d208648mr329458566b.29.1728504394210; Wed, 09 Oct 2024 13:06:34 -0700 (PDT) Received: from ?IPV6:2a02:3100:b338:6300:ac71:eea5:34f6:504b? (dynamic-2a02-3100-b338-6300-ac71-eea5-34f6-504b.310.pool.telefonica.de. [2a02:3100:b338:6300:ac71:eea5:34f6:504b]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a9950338d1fsm495383866b.47.2024.10.09.13.06.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 13:06:33 -0700 (PDT) Message-ID: Date: Wed, 9 Oct 2024 22:06:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 5/9] hwmon: gsc: Use new helper hwmon_visible_0444 From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix , Jonas Malaco , =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= , Florian Fainelli , Michael Walle , Maximilian Luz , Ivor Wanders Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org, "linux-arm-kernel@lists.infradead.org" References: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6a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62WIO28IbY/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_130636_087492_DFE199C4 X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use new helper hwmon_visible_0444 to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/hwmon/gsc-hwmon.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c index 4514f3ed9..d70b4e305 100644 --- a/drivers/hwmon/gsc-hwmon.c +++ b/drivers/hwmon/gsc-hwmon.c @@ -231,15 +231,8 @@ gsc_hwmon_read_string(struct device *dev, enum hwmon_sensor_types type, return 0; } -static umode_t -gsc_hwmon_is_visible(const void *_data, enum hwmon_sensor_types type, u32 attr, - int ch) -{ - return 0444; -} - static const struct hwmon_ops gsc_hwmon_ops = { - .is_visible = gsc_hwmon_is_visible, + .is_visible = hwmon_visible_0444, .read = gsc_hwmon_read, .read_string = gsc_hwmon_read_string, }; From patchwork Wed Oct 9 20:07:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13829269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78A12CEE34F for ; Wed, 9 Oct 2024 21:16:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lZEtzviNPDfMgnzBnHlmzKZlqYcXcxWCLlGUAEuMExk=; b=fnb3idiqku3QItAcN5Nru/ertq qCeB7xFlEfQSo+JBTaNtqB6cT766qVev/OQA0nybzRCy6B1M3aMqkp5a26hOhYX5CDmYX0pfPsPPG 2G70KGbvRjPLbZxtTKogFZM5nDTNwoYY2O8cv5qyQACNTVBUR2vNL3tY0ybsCKft9NoQsRNcv5kmS Bdh5PJMB8o1rKvQRp7u3Dwrh6GOxISpmwOkSxbpkiGrinnNxgf6NDEXlnwKxPcV9nQMv9TBCx2wyB 9XBkyDI5qK4YC7BEwqFKu/UsGmDwZ6jwRwYsR2YuqS2Kkxliu/rzeZoisLi67VO2vvJIY7Qgc2tpq mgfka8RQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sye2r-0000000AktW-1yKW; Wed, 09 Oct 2024 21:16:33 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sycy2-0000000AZCi-11vn; Wed, 09 Oct 2024 20:07:31 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a9943897c07so29843766b.3; Wed, 09 Oct 2024 13:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504448; x=1729109248; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=lZEtzviNPDfMgnzBnHlmzKZlqYcXcxWCLlGUAEuMExk=; b=EYgU2C5NBXYFQj9Zc+YCKhWqLWwfekAovVK7F1rfKY5AGcFdHLCxETN2/XSgfqZ/bS W3o1t9tS3bmFTm69Dv7Lfyo2y9nWQh1pAPELzT+AS+9JZtzYjR8qj8nS6/KEZkyi3cGq GpnMxRZsdOQPCm6MaM2KLpjZKOLRn/GcmKKRF0TX6CVjyYHRl2szuVdMUyezDeUJwNkK KJNeyq4TDl/J/o6IYkY9j0O6VPuUTKv+3KhJR6jx7Nqjz/4loS1Wp2klIDikJ5ks5upV OqmcVUVOEkXIZ2UM+dtrGm3l2OmsRtcGpInAdIT+u2/rkG9FF5zZUhUHxHv2Bqpqjz2t 9/AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504448; x=1729109248; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lZEtzviNPDfMgnzBnHlmzKZlqYcXcxWCLlGUAEuMExk=; b=YnstilD1FIvn6flX4/iloUjrPSVvwwxG1BwTSEKQ/Q78OACZxJ7IQEQMr65+iF3WeT EZrkdb8ibhsCMNlE+3d4sMg6d5hI/nRQyCpxxRWTMGBRh0gh+DZYC8YuskySrvnQl9tX qGBHTzTxMosF8ddgdbUujRgVHQrto179G8OEXK/bG6wwmdL46Yabm+WPq5BSP7lK1jJ0 1gIBsZMm4A26tiQaYPR6X9gBvV8nArQt7cyPfYcQigTUItExTJdsOJ/+oxlAhTDvrbBk NqgMRL+1AIe0aCJflbTbvMO3wDOaTl1srtATiw0TXedZqTejL++CXsabRsUqkTTzI9ya UuNw== X-Forwarded-Encrypted: i=1; AJvYcCVGrdDaLD7E8v869P2ucHQ+3j6dSQUHlCAI6il3IWmiqgRohBgVkXJKUzj44sjHjooGfyEWh1eHHwCXA2tVgxE0@lists.infradead.org, AJvYcCWVavtO9dTn+ZZFbVJcoY1s/jYgljGiIOvyGlAJADXTKxUxCkIt0lDr+pNQ2He9vx9EqGuuPylGD39eCUC4Iw/H7A==@lists.infradead.org X-Gm-Message-State: AOJu0Yzh1nJRd6CeTZSGkVT2sfWGUl5K9VEPxFq/ikiGrUpV3XDORyGe Cpmr2PvdSy2CfzOXMYTscfl+izbRfWU5s6WvKD0y31YUCpTZel5tB8rD6Qji X-Google-Smtp-Source: AGHT+IHr+GpFMxEYCu943hvq5llxkSFCkCSemX0T21vVg8cBSMkoT/V863crROgR+RrHPsvbrZuKPw== X-Received: by 2002:a17:907:e8d:b0:a86:9d3d:edef with SMTP id a640c23a62f3a-a998d10db4dmr325282566b.12.1728504437080; Wed, 09 Oct 2024 13:07:17 -0700 (PDT) Received: from ?IPV6:2a02:3100:b338:6300:ac71:eea5:34f6:504b? (dynamic-2a02-3100-b338-6300-ac71-eea5-34f6-504b.310.pool.telefonica.de. [2a02:3100:b338:6300:ac71:eea5:34f6:504b]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a9955cd5207sm460255766b.13.2024.10.09.13.07.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 13:07:16 -0700 (PDT) Message-ID: <544b1765-312b-4ad2-9eaa-71994883156d@gmail.com> Date: Wed, 9 Oct 2024 22:07:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 6/9] hwmon: powerz: Use new helper hwmon_visible_0444 From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix , Jonas Malaco , =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= , Florian Fainelli , Michael Walle , Maximilian Luz , Ivor Wanders Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org, "linux-arm-kernel@lists.infradead.org" References: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5Q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9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_130730_372092_AE025C93 X-CRM114-Status: GOOD ( 10.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use new helper hwmon_visible_0444 to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/hwmon/powerz.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/hwmon/powerz.c b/drivers/hwmon/powerz.c index cfb635f94..fa66a6471 100644 --- a/drivers/hwmon/powerz.c +++ b/drivers/hwmon/powerz.c @@ -54,12 +54,6 @@ static const struct hwmon_channel_info *const powerz_info[] = { NULL }; -static umode_t powerz_is_visible(const void *data, enum hwmon_sensor_types type, - u32 attr, int channel) -{ - return 0444; -} - static int powerz_read_string(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, const char **str) { @@ -201,7 +195,7 @@ static int powerz_read(struct device *dev, enum hwmon_sensor_types type, } static const struct hwmon_ops powerz_hwmon_ops = { - .is_visible = powerz_is_visible, + .is_visible = hwmon_visible_0444, .read = powerz_read, .read_string = powerz_read_string, }; From patchwork Wed Oct 9 20:07:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13829201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 761EACEE343 for ; Wed, 9 Oct 2024 20:17:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oxwn+c0F7tFj4DWFTXGW18PUE6Q3kXZdDNjic0+jZhk=; b=1ecxIaPzvcP+s2q2frkIxw3uZF T8MH7ahlC4TC+iogEPYNEfd3YM/3qpK2erAl6IyO3XtRYi9ZLKj2i6awsoRKmWYg7sHqC/3eWqG51 m06gAaBofQZ6WuHu298LJdyokulrBcCYyxJTlGMTuRjZcBA7PjtzcD4qSJ5TXIG0v8N9I1YH9bajw octWd+nDSS5D+U/wVYhvlZy4VUquxQKIC57+bGMebmbL55+Udhw63Qr7QTOJbvc82vl9UYok3Wy4r Nma427Bn5b17mmwybsethQotz9HpSyiegnwBsp+C5C2uK1Vg6HdNm8qHpX0xDcVb/x58xK51v1HBf 8tcB9qHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syd81-0000000Ac4d-1FB6; Wed, 09 Oct 2024 20:17:49 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sycyY-0000000AZFC-1soW; Wed, 09 Oct 2024 20:08:03 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a993302fa02so32220366b.0; Wed, 09 Oct 2024 13:08:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504480; x=1729109280; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=oxwn+c0F7tFj4DWFTXGW18PUE6Q3kXZdDNjic0+jZhk=; b=EMxMyHUAxCiYx2rDeFuAWB0DY+Q3qQ/GDydp/yjugrbUvaEb4BUVA95UzGfpSMUEok F5OxPkElVfWdRMy4ygcCbjcK0cpPHkwIlRyV/xNzfEAuhvXqpqPllAuJmrWjxmFz6Vih KgmvZ73vuHhIavAeh2/89DQyWn8q2QcBELb3gCHR/fijgzR54Di58d2ojjRE67IpsQHW zx7XSJbMLqEWS9QxDidr5ojgAECv8lVqNv8vk7BBDpGsicFUSWYecNdovCP5bCpq00WE rMjlwfJKHGTWfFbwZyGOShzOGaLRQbOXDC2531dtC59m5yDdeV4ZWHf6QULuE6dEwUfS /qHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504480; x=1729109280; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oxwn+c0F7tFj4DWFTXGW18PUE6Q3kXZdDNjic0+jZhk=; b=Hur2ck+0SmZJdxvidJCqWOm+1HBUiTijqzXupsvvWwXnbJUUGO7oIFrpg2PlAzhOcc 11KUl6YfYac5IG4gZtwlCkHj3S6lLmbePEHr0b7zVcgB00PiTHzjEG9YVJhk5EKRCdBD 0WcFEpozOS0iQGR5PB1McGZSykcB1+g56I4R//ffKhyZbk2y0jBVi5qy6w1Sw6CNzVf4 PUhEwpQBnAf1AaljMUrJJZlDbUM8xJJc5qU8D80cyBLzOIdDSYW5IfhOwk9YylwyNu6r TD3vSELOvDEGryzTJzIHwnNYuAzGrcJms+fXcVwQN2vda0zmCwVsdM8ZNegbfTmcSAxz yTvg== X-Forwarded-Encrypted: i=1; AJvYcCU+/3HLWURC7/OI9N1k7sHUHK2KgFV2EC2MR9zpqQtubFQ3abmDK6wmOrUfAI04GBczY+726zXJknGr6kM6UhUy@lists.infradead.org, AJvYcCUtt/mcoy/pBiaSEFJ51iEJZ3xrQUBtvBOW6N6dQ/Ld/OOzy4AG0dhS/vHh7U+lM+xCK/dGicPZwyRXzfdvB+KQKw==@lists.infradead.org X-Gm-Message-State: AOJu0YxyLhCzp562cT5q5PzYCDXWC9jhtX/4/022IkNO16oEm038CVpW b3imLotoQZ26c87r9ycucBqz/zdEadmEmbjzNvu9A8678VBEsBsl X-Google-Smtp-Source: AGHT+IFurkqe46bFHp4eUweBKS3wqvnMc65n6eCgeZOkN1PjeZ1RtecnQg+15NM7n2KBBneTeaVTXQ== X-Received: by 2002:a17:907:7e95:b0:a99:4aa7:4d77 with SMTP id a640c23a62f3a-a998d120733mr239475866b.3.1728504480278; Wed, 09 Oct 2024 13:08:00 -0700 (PDT) Received: from ?IPV6:2a02:3100:b338:6300:ac71:eea5:34f6:504b? (dynamic-2a02-3100-b338-6300-ac71-eea5-34f6-504b.310.pool.telefonica.de. [2a02:3100:b338:6300:ac71:eea5:34f6:504b]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a992e664ed8sm707664166b.95.2024.10.09.13.07.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 13:07:59 -0700 (PDT) Message-ID: <8eb3e8a0-89e5-4a2e-b0e0-1182c3e43c69@gmail.com> Date: Wed, 9 Oct 2024 22:07:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 7/9] hwmon: raspberrypi: Use new helper hwmon_visible_0444 From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix , Jonas Malaco , =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= , Florian Fainelli , Michael Walle , Maximilian Luz , Ivor Wanders Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org, "linux-arm-kernel@lists.infradead.org" References: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzw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Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_130802_543353_5AE78B6D X-CRM114-Status: GOOD ( 10.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use new helper hwmon_visible_0444 to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/hwmon/raspberrypi-hwmon.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c index 65cc52e47..277ab5dac 100644 --- a/drivers/hwmon/raspberrypi-hwmon.c +++ b/drivers/hwmon/raspberrypi-hwmon.c @@ -81,12 +81,6 @@ static int rpi_read(struct device *dev, enum hwmon_sensor_types type, return 0; } -static umode_t rpi_is_visible(const void *_data, enum hwmon_sensor_types type, - u32 attr, int channel) -{ - return 0444; -} - static const struct hwmon_channel_info * const rpi_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_LCRIT_ALARM), @@ -94,7 +88,7 @@ static const struct hwmon_channel_info * const rpi_info[] = { }; static const struct hwmon_ops rpi_hwmon_ops = { - .is_visible = rpi_is_visible, + .is_visible = hwmon_visible_0444, .read = rpi_read, }; From patchwork Wed Oct 9 20:08:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13829202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34BF4CEE345 for ; Wed, 9 Oct 2024 20:19:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bJ/NncwGHcv4vqspu9BzOb+yVhlD+2bUq8HOeBS9krs=; b=fDF7UjWJUw+APO855Urc43DXbX 3+RimZyoWZRQwUu0BYmzTOFRPZ4glTVH81dJFPs0sR9HP9BWdWOM1RWSUhiwYTvgMXOi9/WNwecAg adHSLZxU97PDPuWIBh9pkqeieCPP69jn6qbX09UokQWXHHPIyePsArKw8yyTJQ0JuPsDO2w60pZ+t EqtUv0NR08vYWKWT2K5w8mfZZZnWJ/rryQAmtPblWIxKPg4ndIbMa1VbTLVrGtazk/pe3J6wBM4Bs X7/AMJdr+lWKC29tvMNYTXtDofuizg9CG+HJz63Jvvr9HfVJFt2+qWjq1CHhuiW70YEG/prJZeIJX F86PGG/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syd9V-0000000AcGz-3MWF; Wed, 09 Oct 2024 20:19:21 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syczJ-0000000AZJ2-3YNm; Wed, 09 Oct 2024 20:08:51 +0000 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a9943897c07so30016666b.3; Wed, 09 Oct 2024 13:08:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504528; x=1729109328; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=bJ/NncwGHcv4vqspu9BzOb+yVhlD+2bUq8HOeBS9krs=; b=QFWYRUK8b+D96dg1eC3qcu8/+Xohwl8XY8B5bpvDDiPLqZmMNcjieR25EthhTPoUV2 tUTgOrXFdRlTZCGorXQxdHArDjE76SpLUkRn5oufDD3W+K6EbU2cR+PzIwRw0/hPfyaS e3FhwjOF8A6jF4f4jz3Ws6mWErcI7aWEUgOq668YQu1lfMMWTk+bFTq6hXYR84c2IVQR oebAdjZSFps7ZfPk9DcJSIP/reXQH20+hyjnIKdIpCc5K7ytp+Egcmbh8vQ0SILHuZbA IVkSwfD7fcPVpPIV5u8bHp2lCJw0q9Qwr4dBwVxUWEuyqQydaeb83KeAmhSgR3F8rW0e IvuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504528; x=1729109328; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bJ/NncwGHcv4vqspu9BzOb+yVhlD+2bUq8HOeBS9krs=; b=VpbGt239345fQllDy0+ig9jnCrw+ZgSANtPvLgak/hWBBjL3FKQj3hoKQehuNJHKiu kicdgNQKALXlY4YUSyQVpXZiZmct9ODIVRSQC43nqT2z+fFblbVSLiRhYx2JAFU2rarO J0lp5C95qxaM3YTVeYGfc86jtFdG13VCR9LQt+ExjyiC1mWUkeslzJUjVCuX9NMudwa3 nAG50NNAIioYHsEG0YC5dWy0hRicoEo86kiD0ANU7Cm2fj4nGYJycQul2Aza5shJeNms LhAN/n3WG2xMkVAy82YJ3+ACPHQqEug/PrexpreBhMnucP1IcP2YWFkghNGV1b/vNc49 EaXQ== X-Forwarded-Encrypted: i=1; AJvYcCU4hrYWV/0ZqDzCN9loGkheBtbYpkvLWOpv6gwFl9q5GvXCtTSXoJEs0AQawUZmUFUVfSMnGhVlZFG3Ct5d8B8oDg==@lists.infradead.org, AJvYcCXYVYlEau1fsDQ5p2nf4EiZ5SparwtE25r+2TdKdBeL0NwjIHtisiXKpiTzLJSCnuF/DYWz51XVxhuj2lffTdVp@lists.infradead.org X-Gm-Message-State: AOJu0Yw0ZtaoozpcPF7MQg4qUttyRy2+DB9lHjhgv5nRT6KYv5MjE49y 44m5ewvXHepelRQvWVMFCE9Zw4yK+tLekIlE856Y9W3SWBWYJ4ka X-Google-Smtp-Source: AGHT+IGAhkETXfPlVJwHN39W7ovSYoF4P67HwiMonJqrpsjOwTQDgXOrhwh62zuoivqdkvSUA+oM3Q== X-Received: by 2002:a17:906:7309:b0:a99:7d2c:b3c with SMTP id a640c23a62f3a-a998d341669mr331582366b.59.1728504527559; Wed, 09 Oct 2024 13:08:47 -0700 (PDT) Received: from ?IPV6:2a02:3100:b338:6300:ac71:eea5:34f6:504b? (dynamic-2a02-3100-b338-6300-ac71-eea5-34f6-504b.310.pool.telefonica.de. [2a02:3100:b338:6300:ac71:eea5:34f6:504b]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a992e664ed8sm707787466b.95.2024.10.09.13.08.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 13:08:47 -0700 (PDT) Message-ID: Date: Wed, 9 Oct 2024 22:08:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 8/9] hwmon: intel-m10-bmc: Use new helper hwmon_visible_0444 From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix , Jonas Malaco , =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= , Florian Fainelli , Michael Walle , Maximilian Luz , Ivor Wanders Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org, "linux-arm-kernel@lists.infradead.org" References: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzwmBVZbS/XRs64uJO8CB3+V3fa cIivllReueGCMsHh6/8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KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_130849_924102_5F117646 X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use new helper hwmon_visible_0444 to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/hwmon/intel-m10-bmc-hwmon.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/hwmon/intel-m10-bmc-hwmon.c b/drivers/hwmon/intel-m10-bmc-hwmon.c index 96397ae6f..2616c6bf9 100644 --- a/drivers/hwmon/intel-m10-bmc-hwmon.c +++ b/drivers/hwmon/intel-m10-bmc-hwmon.c @@ -565,13 +565,6 @@ static const struct m10bmc_hwmon_board_data n6000bmc_hwmon_bdata = { .hinfo = n6000bmc_hinfo, }; -static umode_t -m10bmc_hwmon_is_visible(const void *data, enum hwmon_sensor_types type, - u32 attr, int channel) -{ - return 0444; -} - static const struct m10bmc_sdata * find_sensor_data(struct m10bmc_hwmon *hw, enum hwmon_sensor_types type, int channel) @@ -729,7 +722,7 @@ static int m10bmc_hwmon_read_string(struct device *dev, } static const struct hwmon_ops m10bmc_hwmon_ops = { - .is_visible = m10bmc_hwmon_is_visible, + .is_visible = hwmon_visible_0444, .read = m10bmc_hwmon_read, .read_string = m10bmc_hwmon_read_string, }; From patchwork Wed Oct 9 20:09:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13829204 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D3D7CEE346 for ; Wed, 9 Oct 2024 20:20:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UBGcdl9zuT69a2GxmBJ6q1bQnqCV8b04FMLlUITa5sk=; b=UtY16UmuIkgMMy/BMZbDiLs8a3 dnmR3xWR+9PqIK31xTASjlle4qzJzrUSoHG+DEHU2sm7yUW+vkTqpH4a2o7IRwxS9nQM5y2gdZ0lU RD32bWRNeZaYNn0vUfvUN+SPNFBGseGfBT3J2QLSYJd+Ry+OfNhPEDBjeq9bvywTV9+1LJfiucVQ1 Fq0Iv8og8BfW6wuPvKpjDOyDJB5LzOTElBlIfYYSDdVBsx8ig9CHshi6hkqqvIN+syMhA7vzDrOOD EBnCJprjwPQQ7I3Eyh3IRuy/wbq1jj7D1BSuIGiNtAl7wmxZItsZaXpcoiPvuGwOWO7TvH26GzkKg r6jatTSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sydAs-0000000AcZM-3o1b; Wed, 09 Oct 2024 20:20:46 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syd04-0000000AZRf-3Jg9; Wed, 09 Oct 2024 20:09:38 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a993302fa02so32404766b.0; Wed, 09 Oct 2024 13:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504575; x=1729109375; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=UBGcdl9zuT69a2GxmBJ6q1bQnqCV8b04FMLlUITa5sk=; b=MmgM7gq6rj8lSCEOlfE6MHQTww7ONAgy9MoKdQd9iSfyt+LE35jMcAp6ZRMtbVgYtF aitoj8338qWU6QW4bVlUb2AuEOOe9TV8KpAnxBx6EzCGa8k01u1U+DiR4+WWZvD4yIrk wVHLSXdQeYLGuWACVU0HJMc1lcRBNMdJaQQvyBOC7lsFX1yXUCpxE82iBB8C/j2cuykI xf8cF8iRCDJJSDNB/gM/Gckkltcck/c9q6kS9BWmZ7XxJciF5bttZ5lz+rRSq27kpu0m wQeSJI9rFNfFuKtxwYHS10K8/l9NoGKgCcWFC8pmut8Laaj5eUp7OtkUyGHUDhm8vApr Gg+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504575; x=1729109375; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UBGcdl9zuT69a2GxmBJ6q1bQnqCV8b04FMLlUITa5sk=; b=fPNIclbnSjsiRWvNA2rSS2CQoK9JD6APq8XgyDvNWVQfRNkJgNyRefTqqjKmTlsn5f Yg7HrRuagatKZD8jDkcFBqDl2YkXFyq/B79+8yUiBGyG4J/XqxbEHOIkeH9SELNILOfD iWWbIa+w1cclw2/8D+i2PLbt2zQdwfHNGIvMEUxDjQjmx88mrRsQMbnIfr1vIgTBLDTa vJnTYX+YixTlYSLxhBloYioBSA2arCJeP+oPnUxoaDQL5FnOYsZvtc0+9RcFkJ+dxoDn LRA4jdMbAzqgBxDuNqDz9zZCAJB1tLodekz9RMY4nZxCZPu+9589pmP4QHdgtQpuI4V2 48Hw== X-Forwarded-Encrypted: i=1; AJvYcCUZF2EGu4E7OY1Rfmb19BlxC+uqrCHZ0v9X0rF2m4Gr8pfgsCJAcq/p9c3GfgwIOy1a5MQj0xcHOZar2UW85l3R1A==@lists.infradead.org, AJvYcCXS6QRJsbhg9xhMx+ggMzZf+YLKSF/6uFwMQ8Ht4dLBX59OgSEfpZ8rKqienAF8HDuG0ovrn+7Lblf03v5ZGi/P@lists.infradead.org X-Gm-Message-State: AOJu0Yw2U5HeYezaoxW+qBXBm6W9ZVF8zWKoZHFJ+FPiUZoHLsPbsWgZ q6h24duIi0mpO/zjwGScL+sukCrkihrbtkbm7mufD1hm9MCSp8Rq X-Google-Smtp-Source: AGHT+IFlfAD/cEAxQrpsQ931nIYGaB27WfPAv+6+Gi5vsbjsmEgRjQ21XySSkAGRPacB08IE+/Uh5w== X-Received: by 2002:a17:907:d841:b0:a99:4780:1af with SMTP id a640c23a62f3a-a998d219fe2mr354716566b.31.1728504574503; Wed, 09 Oct 2024 13:09:34 -0700 (PDT) Received: from ?IPV6:2a02:3100:b338:6300:ac71:eea5:34f6:504b? (dynamic-2a02-3100-b338-6300-ac71-eea5-34f6-504b.310.pool.telefonica.de. [2a02:3100:b338:6300:ac71:eea5:34f6:504b]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a994e8d9d27sm519607766b.6.2024.10.09.13.09.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2024 13:09:34 -0700 (PDT) Message-ID: <53c6775f-60a2-44e4-8f14-a7c68c996268@gmail.com> Date: Wed, 9 Oct 2024 22:09:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 9/9] hwmon: nzxt-kraken2: Use new helper hwmon_visible_0444 From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix , Jonas Malaco , =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= , Florian Fainelli , Michael Walle , Maximilian Luz , Ivor Wanders Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org, "linux-arm-kernel@lists.infradead.org" References: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+w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mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_130936_910706_982AD5C1 X-CRM114-Status: GOOD ( 10.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use new helper hwmon_visible_0444 to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/hwmon/nzxt-kraken2.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/hwmon/nzxt-kraken2.c b/drivers/hwmon/nzxt-kraken2.c index 7caf387eb..e46558e2f 100644 --- a/drivers/hwmon/nzxt-kraken2.c +++ b/drivers/hwmon/nzxt-kraken2.c @@ -35,13 +35,6 @@ struct kraken2_priv_data { unsigned long updated; /* jiffies */ }; -static umode_t kraken2_is_visible(const void *data, - enum hwmon_sensor_types type, - u32 attr, int channel) -{ - return 0444; -} - static int kraken2_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, long *val) { @@ -81,7 +74,7 @@ static int kraken2_read_string(struct device *dev, enum hwmon_sensor_types type, } static const struct hwmon_ops kraken2_hwmon_ops = { - .is_visible = kraken2_is_visible, + .is_visible = hwmon_visible_0444, .read = kraken2_read, .read_string = kraken2_read_string, };