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: 13829162 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 469DB1E04A8 for ; Wed, 9 Oct 2024 20:03:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504217; cv=none; b=qpF5DVFb8hMPp7S6DcofsQ/kOfyAIrzgoNkCTSMM+RmuiV24Wvhh4PY3A7aS8t00khNwoCvvNDg76UFS60ZxW1MnttSIUfi3gOvF0xgE6Qm1fTax4I4lV5wmo9skWrMrzsptGNDen42BfxdcGITIhHXlyB7kdZkxvCsAPKoLGxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504217; c=relaxed/simple; bh=6g+QNjhOrdb8sfdNgFtUCBbMsVcro8HZhnq0tUHugcA=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=eWG+ubypkAFKGTmJRQVC2mDtydtH+40Moj7ProYye3gaUD3mquJMx8FN6OH7hqYlmYPESvslXjxo1pN+zdvFolivkDbyRdl6n8mHhmw/Zar6dO+DjULnd5MtydYAE41WAmdu/OfAfaVpzgw+YCUoqh2Fx6OGbIfOLkyAP+Og5ws= 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=NfJ5VARB; arc=none smtp.client-ip=209.85.208.176 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NfJ5VARB" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2fac3f20f1dso1597941fa.3 for ; Wed, 09 Oct 2024 13:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504214; x=1729109014; darn=vger.kernel.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=NfJ5VARBs67evtT5Gm6cFDLWuDle3ddSTt3sCRZkmh5ZzTvBnlnHFUIhjgzmS4uIHy QbUNpSF6h02Cg2/1F69S2lESrQWPxdlWADC/icHMFYyh5WmSUzzYdCiT3vipQvCf+hQt 6cBsOCaEwdZYC6zNopbjJrKNvDi7niZWxgXdEEZjRGZoHFAZrL90jfgTppmxbi6R0fI3 PDGor9TM7XeX9aXVA2rf2OETniE8/n0OjUYHlo3MrmK//KiYOENjPZqDUMCF2kBn6G4C 7+XQfgI09wsC6SMn/M6CmxGDRcUIK5UiRKu0F4W04w1w1K+No2BOKTk4+71rWnPbTPbp P0Xw== 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=eXgZCf4bLRbBAQQH/AUqTAkWJV6hfl9aF+XuUebEC0H3zVKWJhNk6CjFekWq0rdykt pNbZ+18biMlF4R6Pm257TJxNJdJqRtr2MVwKmvDRp/nE8wmq8hSb0gOCIMOekthZa7my LDAXRloUORDOUb0AjprFWFNaCxniH3qTYg7wvwkQJJaFveuJMQ3l//KFmxyepVx6OtUZ LfOsz05Q/+qdQNNZsb3ZPXPM437jWdQ1YoWNpGwsn5pjyxJEdCThph84uKJMtbppQK+I cGaP4FkiKQIQj3XVDqaWiMW+8L930GcDqaFit/ull4AWVEw9xNuAJKfK3gh4fnokD4XM Mixg== X-Forwarded-Encrypted: i=1; AJvYcCVChU6xZxg8FRmXtQrIm4qLb6UyRelyHB/JpiUt4rxXsGAsRFyZgr+8n+hlKalLEQucaE/1llyfd5vM3Q==@vger.kernel.org X-Gm-Message-State: AOJu0YzC+gRaE/2yCqSo45/JVCKDjTed54N8MJ98RV6oHVlGtd1QYOFT 5bqbvKIPEUNECZuI196yNMzMZFeQShudETVJMocbNnH7b1fZQbdJ 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 Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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+YrQ8TKK+Z4R mJRDh0wNQ8Gm89g92/YkHji4jIWlp2fwzCcx5+lZCQ1XdqAiHQARAQ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oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> 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: 13829163 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 B70171E04A0 for ; Wed, 9 Oct 2024 20:04:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504264; cv=none; b=NQYOg/UBvF81fClK+AHGR4h9WqNCQBRrDIXmQnZprgvomuHg3phRetz8hSlnm1oGQzgNqHs4bzlZ4K8xcZjpdb46Tloso5T4nkJ0mAMQ/qfIjUWjujZ2dbgPl32+U0Y3aeWw09nYNAahg3oh5nMAkruyl6c7b7/8rePhi7QWHDc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504264; c=relaxed/simple; bh=wo9gfaj+5qVVWziGNmHlE/1NG8BfaReSHIOfLE6Rg44=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=o//M0iPWB+jzsWbFzXcROBl0jSwRr4DoshjQNGDNBJwrjGgLjmjK/Bb6rJj2MgD6KcLklKsKswww+XOk4fKN51KYhZULXHlE5Qb6lkw+C3S6JuPNzM7rEdZWhRzpMmm2uoS6V9AoDpRVI862z5VxWI8qze9ogfT3LU3qWsZvzvo= 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=eY9ygJCn; arc=none smtp.client-ip=209.85.218.46 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eY9ygJCn" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a93c1cc74fdso34248466b.3 for ; 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=vger.kernel.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=eY9ygJCnWgNgge6D8q2j720PmK32oy14gPClA/JWq1nPEiTLh0l0s7OIDpmqTqTpv3 zH2LgFPKA8YxHJx0Frp7tKyeDw+LQ6mF5na4jYuxAW8A8FavtQy5XDsobh0zsyDwboIo N+L0zo2rUwBAesxHYEN8vNxEw7zeDF/lE7+v9E9PIm5sHlAtqWfhtCS/ebD1zYtOjCeS aF6e+RtckSVGYmfseHp0cPaEkS23uvWr8AwH9hOUnB0Cpubqli2zxHj3ijeS63abHJxq N3OO4twgTeaUsxTLmtCTdJCkOEvMeWiA2e+LrwC8E5a6hmuL11G6MkcLOsieYof5yn8O 9HNg== 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=Aq0eVqu5JPaoQCo08Rlm7Jl33QKM1YFH1zYn5yr3aaHjxSLNb9r5aIRxP1LxUlNrKd aH2uBkkE+8a8IpleolkcuDHDVtMc334LwbO8TnzgJdaN5z7eeK3A7+B/RwR38QqlYbYF 5BkvKmJpuHGYgGBZHuCF/SmkZh4h7Kgr/1aXbTQNYsBAU5WNkp2/1N/bzYUgllVswSb9 NfxeGdY5/BCgpD3VjCzGCHoWSfZR6pxpp8zF9zH/QmLKz3mZI8iI06I6V7IYijifXolb j8LUMZ4iP/TPy2swZ6z//Pe+ogUVoGlMBv+Of71L+Mq/uvam8pPs1tRqgXlQHGFxg4t8 oZeQ== X-Forwarded-Encrypted: i=1; AJvYcCWs751JWTX8bZnabVPfmpGhvd1Am7h+P6pRV5QqSOeni0WKYwEUa7jDuuhXykrdWn9LonR4DSf3x5XUfg==@vger.kernel.org X-Gm-Message-State: AOJu0Yw9RQznMODRI5H48A3/a2DEqH/HKPMbWbv5inNv//qAH2FcrjMV SW2+AfLRKE9cJk+05C/Y3jaEm+yW897Ba/JSH80O+ToVxSsp2JHZ 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 Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzwmBVZbS/XRs64uJO8CB3+V3fa cIivllReueGCMsHh6/8wgPAyopXOWOxbLsZ291fmZqIR0L5Y6b2HvdFN1Xhc+YrQ8TKK+Z4R mJRDh0wNQ8Gm89g92/YkHji4jIWlp2fwzCcx5+lZCQ1XdqAiHQARAQABzSZIZWluZXIgS2Fs bHdlaXQgPGhrYWxsd2VpdDFAZ21haWwuY29tPsLBjgQTAQgAOBYhBGxfqY/yOyXjyjJehXLe ig9U8DoMBQJf9GRVAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEHLeig9U8DoMSycQ AJbfg8HZEK0ljV4M8nvdaiNixWAufr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32945@gmail.com> 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: 13829167 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (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 290861B3F30 for ; Wed, 9 Oct 2024 20:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504305; cv=none; b=bfCN3YSRQ7sy11M//cEY6pcsiyuOVKd5kauFHRrRcXRWsi4sWUyQ+IgqRKB6bG88iSsSXNAbIoCDQrIk2rCJIYnFY/mqCbGpg8qzN+GwN8QDIdZJ7WlTqM71GZ030vPw2dA+9FOK8YMEJThd9rPMG8kimM5yiSWR4ZbvJPmPlEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504305; c=relaxed/simple; bh=sCWXV4FxPgIGOT/2VFnKprN0mcc+B0HEHv2UK2jVgFg=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=o3nMonOk+TQL1w8Z1tq7xNA9d5+kenJfImJ2gxQmjDKilyDpWZ8S81MI+XzqvfbLvmLESb3oOL+O4i8m6oEi/nduL74cxZgVLT/pm+vSGWFB1SM+hJVn5QRco/KUj7U12bV0aRDgcmuo5qmcF9in1UjXTTH/+zXkkkiJNmkCA1o= 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=VMNzuri/; arc=none smtp.client-ip=209.85.208.54 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VMNzuri/" Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5c5bca6603aso111639a12.1 for ; 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=vger.kernel.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=VMNzuri/3Znfhw7N6BjY4sgiMLnWKC8ssY5YFOXQuNt9EAhHcOGA5k1yRxBDnV+2Sp bSPEQ93yV58SHZFYgO8xsauLRBwdKwQgenL2rOOB0siIwhvAWbb3FDAHYzrDfyCiU4Il PTPBvFClA0Jc+34+3Vv8rlltzQe5C19yMHIeYbbKX73PkbYh5OmIJZHtkRtwxOVbk3gV V2NuZVsDkVGtfE2CI0RhD4vqECyXTNxcqMrC9FVulyDqHIAoMav0HmSjoxeDFNGaEzF1 iLf6RL440l49AcDtDNr2cyIeNMyFQJsPw2E0XBz3NLoaBlcsa3yHTzWPFtKQ8uHY0f06 Y6Ig== 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=W0qjppSSSdDOLLvQuTmMx5SV3jwf7NAwMPtY2/ZUO4GrmiyR/H/1J9LmzJIuK7XqKN 9h3e99X+oR97dVAICoEINMp52JDiqXIzuP5CCzfU3Y3Zk4mpZf2Hci3b0R7ZZ0udhhBT UzAVwzJB4VgF+HtDIbnIiC0s4r4f3gVGIOtrkTQOcda5EWCbxd6KXR+KJDVaz5yupCHP MEyeT0YhQ9YoNHqd4fz3TT110BiJlQmupyrhfTQcD+JR7w6bkxY5bvBn56SCZCaCwopZ d/Lb6Tt63KDvf2cLcpmo3xfhAZR4JQXaaDo/geILIt/yc1cIpZhEKGPPw0tav4lCupR0 W0gA== X-Forwarded-Encrypted: i=1; AJvYcCVbOE+mFHLSlT9VPxPH/WnBSfv6YV1MJUuKdoUm5fYkdOaN0hPe0PrfxtyfXIwtHPhT6ZCs+7iSpkwctg==@vger.kernel.org X-Gm-Message-State: AOJu0YxgTTUhnP4HU/5ov3k/tXLJn9ISr2xM7G8wZjfuo9lpPHtnC9Tm IKk2hZBmuHTeuffE467k7NjEkKRAGnbhhHyF0NROWrnRS0PaPGlM 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 Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 MVE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/0ZFUC GwwACgkQct6KD1TwOgxUfg//eAoYc0Vm4NrxymfcY30UjHVD0LgSvU8kUmXxil3qhFPS7KA+ y7tgcKLHOkZkXMX5MLFcS9+SmrAjSBBV8omKoHNo+kfFx/dUAtz0lot8wNGmWb+NcHeKM1eb nwUMOEa1uDdfZeKef/U/2uHBceY7Gc6zPZPWgXghEyQMTH2UhLgeam8yglyO+A6RXCh+s6ak Wje7Vo1wGK4eYxp6pwMPJXLMsI0ii/2k3YPEJPv+yJf90MbYyQSbkTwZhrsokjQEaIfjrIk3 rQRjTve/J62WIO28IbY/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> 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: 13829168 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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 AF5A21B3F30 for ; Wed, 9 Oct 2024 20:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504351; cv=none; b=l4cyd7/xYwVqc5nBQZQGTlImZ/8298yaJXrH+X54VtKY5q0SB/+xVNo8uuhpJ5XDYMLoGrGBfHqsm6goUr13Qke44uFiDr2ZJQWtT5+gT+mHTYIehOKTmluSEtp0aTOBxISlF7dqtTWBAmu0YWmApJc8k8RXaUC1ukky4hvgA3M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504351; c=relaxed/simple; bh=5ReVWaHLB2JW1Lmuy7poN/TLNWwLwirmKypedMcyCWU=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=KHUnh7nk8GD/nCNPUT7XqHXkVYzSHG8AYGgCu0EoDNBMMsSCPZDVIfvCLQUCTczewF6wDaQlxIVbmkYP0gN1GQh2irhSRm/NQYIMWp5W7BffJW6T7o6oOc8SoJhhswQFCPzIhg1OXlRrUzcxHarVE+n9a1EZ/M8VHE4x6LTtzCM= 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=BALTVJc/; arc=none smtp.client-ip=209.85.208.44 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BALTVJc/" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5c918c067a1so115446a12.3 for ; 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=vger.kernel.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=BALTVJc/j80+ijL0TWTVcdH4w2hRkXU9cnenwboStUEa9m9lU/er5JBeeSDWemTVoV oCGj7yVZYOkRNEQEap164F73cnFuKsqeML1zjIzJDwYdugXJktmkQqsbTEi4G33xmSiB dT+rARa3fvzc4+733y42tWJD73wx6N/nVaCny5znX+HUQ8C9PJqwkUcQotJxD78anNOy z6ZNT6SG+SR4PiFQhZWoIfSdmoVEJ44OGw1m1vAkLIjG9kvreMCVsCLPx01GIpprOoFe 3H2WXYmUZ4KmbZrtTUkt1lW5JUPsLHMNcyFITTy1O0Xp3DlY5oer8tySpQhJDSwL4A5I PXhA== 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=lmOCsVi33QkvqQWfMXQ3rexEVsWaV7jbRxLQIJkGX1eeICxT7g+hJNflQE6urc97CS GgbSWTSaG+ysL6m26NfMpJx3Z1ZO6Jzfasxfct2za8RLsBu9fuPuLTlYF6Et/nGseJFG R4sAUaIg3Zo5iYLZlDzRxWY8z8gMe6a7XD4P3UAwmarS8vEmcma2Y9LnmdQapka9z+yn Nzdr5Q4xvkWvclMiyX1gbaG+1ey3RQyfcRkVGGoXGTVdKy+usjKyYiu008RClD55JtFU hOeEF7KR7cxN5+ATJFYgnOMjnB6/4Q6s+BJdW3pQrlJlF4Kqq2k57ZkV1lhIbMZCciGW ZjZQ== X-Forwarded-Encrypted: i=1; AJvYcCX6KcAJ6CWAkuugHnHJo0alDPC4dCYxhyME4NO5vLHR7K31jSwdxArKgppGbFAQdc/ED/UJUYuPzhb3Xg==@vger.kernel.org X-Gm-Message-State: AOJu0YysckiUTvI1reHm2TySNWk84Pc11DMgk8HOCx10oLMpqBvb1Rqb 8s8tb4kfHRT5JKnbwzYCUrYwEm9FYPcRT5CvBlcHQ4AIbACCAnS0 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 Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A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4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu 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> 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: 13829169 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 273B81E132D for ; Wed, 9 Oct 2024 20:06:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504399; cv=none; b=DXKFcMOAGRHBxkyD7V2ApOR8Qc26G/XQntm40XN/SsyZvG26FUQ0wWG1FNMVFIHjl3Qie+4rOcto1X979wN1hUE3mPTXlRpE+luVkV9Vu7jWhI0p0fzjQHYnGyc3hs/StBbwYAVNCzuvDNOW2tNmJI2iYiq3QgfVtfgk8T8oTYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504399; c=relaxed/simple; bh=x9ULqSe4IxywaIDfPqV+2djpVGrAmytUHtiC4RyMLqU=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=PeN+Io0QSN0qOWxU7D2R3LjE+gtbwHO7FYAC7v6lMEGYcSjEphOKV0t364QRHIT4cKVIw3BCTl7/i751Bvpk5RWUeraddrx4anzPZJYZh7DdCKUOuEaPr32tUE+YDFvGf1S5U6Xm8k0GtMBNebtUpGj2e3K2+fU2X5Bql8qRF4c= 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=OyV6OZtS; arc=none smtp.client-ip=209.85.218.47 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OyV6OZtS" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a999521d0c3so30577966b.1 for ; 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=vger.kernel.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=OyV6OZtSoFj4VmU8lvRtKp9A8cHttS+RX3UyfQR+y8Y5V4/a+ehCo7+v/3z5nPz+tn tUn5UFZqy+cFYSuBo9Qk++OQeRDBBLiUXRTh7+sdjB9bePaeyRBuyA0HM3pL2kV/pken t5tnZFtuJ4eF7MvyUpLRWogaDgmMfmLeumRJGGR5h8aB2U/KIrKC9rX5hGX2yGmKTvNY 3rCPQtvVPwdD0HEw1ZEQrnXL9DwWbIe9ye304WS3s4ilUi77rvk25eYj4B0QRbEMj/Rr Z8zm6DsQtSR2uTBJQ2+zgF0lUDbgo+CqqmZRSxyTRjOENpdqvTmXBlD5HEXL1x1wWNCL ++tQ== 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=mBKPMzKMy+UovAKb1QCQkFIhjMSFEVYCDRrCDwXx8wD1+OSClKAVe7x2JlBwA0DdTH ctrL5GSUYhdn9j0vjD15J0S7aWg30F0+SnVt6P+SHMK18spKKZwV0bIyEPB0AHisv6ZG bKaqXHMZxV07AnzsxrzOqC2wyQBYm80d0mYnSdkTV5/GcouWB1fzF/OzD9tNBsctCmbH JqKeed7OwDLl/PGMCh/fX4bxv+qdM7SMucJRRPxrEUvfg/ytxJoJvTEFRUen9N9vJArK ZKp0QApRwEJbRia8oQJg194WAYIpiF8LDRieNia8v+ngEOmSev8k+Q2730hWP+hysG9h hA+A== X-Forwarded-Encrypted: i=1; AJvYcCUyYnWxKaGZ/jH2LcDY1j83oDwcyn33Y0jLaFWAzlaFpRc7WQbZwo21n57vw4WpjgXYBJEvFMfPPDiDMA==@vger.kernel.org X-Gm-Message-State: AOJu0YwZ9P2YPM6kY0YeKtn58PJ2mEW1NA4XK64/+12/Urexp75xXJ8Z QsScPMjcaVfi7qFnWUnrycHpYfoo+OwAqoywsjQ/d8E+kOPYcmMF 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 Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzwmBVZbS/XRs64uJO8CB3+V3fa cIivllReueGCMsHh6/8wgPAyopXOWOxbLsZ291fmZqIR0L5Y6b2HvdFN1Xhc+YrQ8TKK+Z4R mJRDh0wNQ8Gm89g92/YkHji4jIWlp2fwzCcx5+lZCQ1XdqAiHQARAQABzSZIZWluZXIgS2Fs bHdlaXQgPGhrYWxsd2VpdDFAZ21haWwuY29tPsLBjgQTAQgAOBYhBGxfqY/yOyXjyjJehXLe ig9U8DoMBQJf9GRVA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UBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <3aecbfc5-e11b-4425-9c6b-88dac2d32945@gmail.com> 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: 13829170 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 C78C21E04A0 for ; Wed, 9 Oct 2024 20:07:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504440; cv=none; b=XQN/S5j5itb2QQB59H/GH4KYp4z57jdtd/BpV/P//VDdML8Nk+RHYCwZYMDGXrlJyvLyn1CV167UIcCdYnTDpgIPvIVMxfmTd9YFb1pGTelpRaeec+QXuzPp526RraZ2wYuZk6JwK562+4A+pZH95NjczJn2VoJHiMQ4F47iK0s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504440; c=relaxed/simple; bh=N87+sndzptkD989mlFOoFvhj/kb9LAtHqe/5aYbp1Cs=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=Z0wC45GrCnxgh4nas2/p3FUL3GZxeBY7dw8J91d8+bDpTgJYtPCPo8m9ryHAF4VWlv+lKyyKd9RVZBK5kddoIKiKpI98Ovu6CUp6ymHE89ADLOd6/L7isRSRacV3J/+/fVqtGATrt6cSroiL2RTUMAv5y3zajw86fFw6BHa5ax8= 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=foaA5qSF; arc=none smtp.client-ip=209.85.218.51 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="foaA5qSF" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a998a5ca499so26672666b.0 for ; Wed, 09 Oct 2024 13:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504437; x=1729109237; darn=vger.kernel.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=foaA5qSF5K820MkBrQJ1RRAzpZ2yh/HmQciKOPnF62gI7wgrPrTOveAgXZhQZrLcs6 UyvP13HP6HF4WKv1uRnMidxpA6Ytcj2WXrmk3906RSn9ag+5TjIt1R1Q2K6KOIGthrxU bzCFxqgl2PVcLRxHTbQPzpVl2NUHIOmtSnwGfDWdKH7fZRl8EPGt0/TpLzbPY4PbEQxw 19Z2yfeeWRdTfe8jrkwx2UIhNGhbGIvPVDWo4bHoCg5yIPTe4Z0gcd6WQDy54IPjggmB 9a3KmCj6jpec0wL9pM/gqths5M/k6JAx2Zal5TDGk993mpvLleOvGKobNpbWzaFdt08b Mo4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728504437; x=1729109237; 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=tVfu+lDfceN7bPOxCaorzU2AwEO1s0z8eAcLJy09ju5yrKju/zYfz4EQVVg7cjdy+z BR/huwcc0rYo+OZ28AbpROwYNTvKLmtzM//TCzgBPdAPua3FPqg9BlWgieqBzBLhwwJ4 jOtqrzAHxCMOwoUFgaYQB0jLHMVyqe6kNeDHWp+Dm8nhfkvr71OlPwtjlmSzTtBf5YNP u4qr2V3y1Fy7Oqfg9b9/rOyO3b6aw1y5l/TAjXrQJNwOGdJLtKC6poXVmAkwxvuXetrb 4KWyB5NUAvQ1EIvTT3IbFFGIjI8ILMtBF/0tMGPS3Dhx8yJi07NIexaOcJLeQ21QbDat LtJQ== X-Forwarded-Encrypted: i=1; AJvYcCVBeYYAZ7hP57Vi9ucV6HUhup5HZDdGiejeUPtrjOf6RM7/aVFDHwDPElN4dhZ/9QIvOdRSZ2OfLTVV+g==@vger.kernel.org X-Gm-Message-State: AOJu0Yw26XbLY/3Bfmj6y6FmzHvd+t8zU3vhST6Xo94UyDa2N7hFk3Bk zrkzqlmSQJ8BYUDcSfVFelb+f3LdStuqCtc3ZNlp9h4quekuWcIL 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 Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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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C GwwACgkQct6KD1TwOgxUfg//eAoYc0Vm4NrxymfcY30UjHVD0LgSvU8kUmXxil3qhFPS7KA+ y7tgcKLHOkZkXMX5MLFcS9+SmrAjSBBV8omKoHNo+kfFx/dUAtz0lot8wNGmWb+NcHeKM1eb nwUMOEa1uDdfZeKef/U/2uHBceY7Gc6zPZPWgXghEyQMTH2UhLgeam8yglyO+A6RXCh+s6ak Wje7Vo1wGK4eYxp6pwMPJXLMsI0ii/2k3YPEJPv+yJf90MbYyQSbkTwZhrsokjQEaIfjrIk3 rQRjTve/J62WIO28IbY/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> 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: 13829171 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 1657E1E04BF for ; Wed, 9 Oct 2024 20:08:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504483; cv=none; b=Gh6LQ9g2OHYDHMYV4Rg6GmdTCziqjAfCow/yc1Vkc3g/w1BMVafaQl7LtV1KZrh+/4z6VCcLFA67h3YhhO5+ImvfS6eDPLdNFycsqnDLqO5FjdPWqnszBuzesz73D+POPu9zzstC8L9fUk1vAqsHVPbZYauWzHOGaZACs/bzLpI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504483; c=relaxed/simple; bh=NtwPPSiRl1VWRASozVIsjQKII//5XDGFI3+TjvTrBZY=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=Ju27JJHjx0T/PPR3D5JAxJS9yf/C4kHUIrOH/CVzYGrGjeve0Oq+dPhXiHxlrAId09MaF2CG5ya9MyS4+26weSoxkrFGlkwt2DiMZzXmiTxY9OkXwfU3sbLO2Dj0ZNd6bMfmLkeUB8DfS++dj4eRVBdmxpJ9q9cUaKqDSOJt80A= 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=U7CJNDQF; arc=none smtp.client-ip=209.85.218.50 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U7CJNDQF" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a9953bdc341so24175066b.2 for ; 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=vger.kernel.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=U7CJNDQF0rHiYn7GfkJHgUWOsqydZ5EtJvAOpyDVfescZNDpXH89BujA+Gl8ytwrXP j7hWxXOJbIfH98mnJVQJfgsX/hLwdPNeK8/pr2pPZXw529/aUvKKOShMm2PMHdAY9RyB YYpO7N9/S+agJaT1YhAH2XU9uAXHQs0YF2Z4fKxPcj1eD0u9qg8yhIJgTm06W6Dsdw/H tyvM/eTyxa18vp8RrDQHdz4GhCusP2ZyWsJlIvR1JS5IAxWFN3IsRcaGI5EAhry/kDwT T1+2xVgOBPYpxlFiRNp3diFp1gmoWcDcFK0Xgu+ySAE8qyKMDGmw0bshyRhdvZcigMwf ssRQ== 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=KfF21vVxLn8Pj0AsuC6i+OQ9qBe/1MSJx7TKLBLihjS1Nb0P+oRT1PM5iY6J58dQZj hRi1uk+n7Fyt/nx5Ag9/B85NNgZSCqBEEr+so9EF96tz+SnZRc8k6o1eA+d1n9h4em1W mVShUYDfrVnsmQ3Yy2KFbRqoH/ZCTbRYJRLG1YUKNepyo0cfSvQDTGa9whFeCrvC72oe fZEIHPckkqe4J12GOqQOsqmadzKOb2ROMBQ8/vL45ENfhAnQtObLjNMtlX8yOgsaA58v q6BmXO3shtta5Tw7WZl79QelBa/zLU/uXqPsH1UdlLtSB4m2IpM+drn3MLm59AUNXK3G 3qmg== X-Forwarded-Encrypted: i=1; AJvYcCUfWGgiWGHGhyVlxO/kMxaZYV+3xGwtxRxM7JLgLlotT/8cRnnTxz0rl7EIb3WKFgHeyI68+PRx7seUrQ==@vger.kernel.org X-Gm-Message-State: AOJu0YyBMUdGYR8i8OkWSpFIP3tO7CfqLsX+uH3nP3+D/AqOJTpSs/y4 cvp/x3LoZsDXGpnS99FF66eqik17Bqc+nALRIvsTRb1yxcIkelhd 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 Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 kPaXl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rOB6PjSu 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> 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: 13829172 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 532B81E0E15 for ; Wed, 9 Oct 2024 20:08:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504530; cv=none; b=ndQikINr8x7trOkzymPJWmnsP9UIGIDKsdSNL1ybKSB8r4t99TVzq3igjFPJx+UlZvzZqR9oE406CEpo4ojw6THykq4uxyaw7J6ug1Ca2XNhwfh4qqLE/RrD5x4aj3k/XKFf76r59Bv1nK+kCmy8yISRnlRSJZX8YR7oSHWIKM0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504530; c=relaxed/simple; bh=Ax6a3rc+cdZ9gaVud9rH1hpf/6qtLoULOXesN7Y8GcY=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=qC7dAVK88r7qPQpQlT7CCkJZFWIcaDemfFni/Ot/zIy6YqfW9LeU63NjZ8vTcE+PHoFACqoJn1N6z/Hg1K/Yt647HzHaHT9aYnY1gCHxGLKEXkyrttMZujlZk7Asmeo85pyn2oh4xhpvDH2bGB+gVpN6TCh35D9gPXcyVF8aYlI= 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=l2PjTRyv; arc=none smtp.client-ip=209.85.218.41 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="l2PjTRyv" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a99650da839so28820866b.2 for ; Wed, 09 Oct 2024 13:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728504528; x=1729109328; darn=vger.kernel.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=l2PjTRyv7/y8G04/bDzt3JO9B80pX3cqp9fydtiSEvpybBjORSJPn1jhuGJsfDrztU mQClr++3Wt4pnGxlQM/n9+op6oQClFZm9zaoXuH4N6b6HJvOelTYse0Rspv24ntHl3S4 G9G7u/5VOkOtcJbDT8M7HolXGZmVb7RPzkc6+e58SISMWxq05IUkQUzW7PAfkgSuWODu S/bH/jqTv4MZ7NiDIpJqRkmWtkeBVzaDB96Lji6JWD+DhyAkQK3BEVq3jm50gnoF/YAq z2wQpRYL9qljFjGkY07v5CHRhpUuyC5hxYKLVG90wSmAkyEC/Wt37TzsWWWtwdRjJyzc dZVg== 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=FnjvyAUl64kJCxnzAPQ4NAJ8DZV3BtRJEf7zUSvz/ED+ToYSTMg0vVhRqXXnrctkja GoQ45Y7Gq5jTvXpAi5JlHJm8bChE9XybJl2bFC6HKOB5dKEjU3JVCVsiGxdn1koODLQm 9am9IVUnoRVncDVr87J0HnK+0kl6CFRa8wjafN68d5DCEsrpS80ciw8iVdxMRsGQ07zy xr+WQOOFExKgvCPGiL6NjS7bCMyoeYn8IT/D7kCwqR9qW3BH2u40blFHP7mhWVonJlc+ pqmr4KamHjgDqAGwSMSAED8+Okzvr4AHk662gIAIIUebccutaDmna90sOzSQw6Qk1Gdv 5e5Q== X-Forwarded-Encrypted: i=1; AJvYcCU0WATwygXRp/e0i2JwdgnIx7ILaQ7eeAO6WJaKl2XYQD90Klah3eJSQk2BUiSFNPnhIWWRDASlqJhLvw==@vger.kernel.org X-Gm-Message-State: AOJu0YzkbgT5W/eq9nGz7LTyekHiauazHNFzAAACYWKXDqC9j1+nCVcn /2MzT7PI4S0rrMAmX76nVUVlJlGQZdK1x53nP/FZFm4oT4pRRmT+ 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 Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/8wgPAyopXOWOxbLsZ291fmZqIR0L5Y6b2HvdFN1Xhc+YrQ8TKK+Z4R mJRDh0wNQ8Gm89g92/YkHji4jIWlp2fwzCcx5+lZCQ1XdqAiHQARAQABzSZIZWluZXIgS2Fs bHdlaXQgPGhrYWxsd2VpdDFAZ21haWwuY29tPsLBjgQTAQgAOBYhBGxfqY/yOyXjyjJehXLe ig9U8DoMBQJf9GRVAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEHLeig9U8DoMSycQ AJbfg8HZEK0ljV4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4425-9c6b-88dac2d32945@gmail.com> 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: 13829180 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 5B8671714A5 for ; Wed, 9 Oct 2024 20:09:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504578; cv=none; b=NSwCxWppqC6LvPmtE0tug6ZF0hcczCr+AlX5KujvGypFMvcR4o5FIEvT0EIawbwtlRN4EtGq5TJoUjPnr0Xnd6l/gdfMYT9/Ks4YFhEnGTIGP3k0QacWbTPxlh3EOwGIAiFLOjv67OKLjDacw+iNt0ka3v2YNwyNL7FEifmNWfI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728504578; c=relaxed/simple; bh=ZzdKVeyv99FsSAim/UT/tV/bsgcHbHVJv6ebmnUhd4A=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=FSZOToLgEQjIP6nBCt4kl3dNv+nrL2cfWn6U1D6oV05ZJOTZWKHBsE4L2OxR8NB0RA3v3be6ykeCgStf5Y9/tLPlFbda3OA5F7Zpx4/WJo9+uu63f6+vJZVQoJVrJLqy5+jbemCHfZd6fUeI1BP2QNivsNhAMs1AK7gOXmR7dIs= 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=DuiNk+a/; arc=none smtp.client-ip=209.85.218.50 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DuiNk+a/" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a9953bdc341so24316766b.2 for ; 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=vger.kernel.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=DuiNk+a/2hijRdVZlqIVN1PspPIUzvIIMlpHSQ/7DZwhFzIZ+/0aNoMS3Iwqof3zOc sAlE6wLxSVgWBD7AiABkLMJsZF9MIgvNriWV28bIfoVOR8o82RG1vcduwGzkoSr/OURc kgyTD//RYz0Eb66yo4Yr+xKhdFUtOKIUuTo+9D2DT3ZepP1nt+YRyoCJX1zeP7p7bfZ+ y9/AUhI27dB+h/ylKKBkDaU/IPAdYnRKqsChK2rWYUC8jteQU7rO/bDQCsD8osMOhC1y 31yBwsDH3FmDNWw5CkqYlN+0q5y4yEkAicGLMdrxe+zE/wfh09nkk3fhdX7KqY+CZESC T4Kw== 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=sxkQyrfbkykWqOuxlVI1tbY/3YPBtF9KOgMw2ebEgL3c5zTKbxblAU/QcnlA3rE/na Boz/l5sGucAP+E+3x7f8DRvfSOBnnpIeCgfwXwEt5MlyCyaRuM4O+Gdj0GiHXzDRhfPz VXkxLq/CWSJiRQrY6oU4q0D1RVEe4dTROe+pkw9b9Zf9W4keECWSHipZChDt5F6p9oF1 yiAtBt2+WL9tGvFYnBsI4jRcmHBeCDYV3OFF2xmHx3AuhYtI+NnU20+h2j4zWQAedeX4 24wqVnGcebz+LXBOz5W6lO7PXtXW6Lia+n6+kvCiKdeX/plkgrq5gaYdFEJ6bmZ+9f+L 40/A== X-Forwarded-Encrypted: i=1; AJvYcCX9CcXbSghWxZxoAYoE1V5sqQvpMNMKjKU89fafVUqRHGx2ok3pf9RGg8qDCUOsdtRgOzH3OWA9m8TKBg==@vger.kernel.org X-Gm-Message-State: AOJu0YxB1VQj/NpH73JPRJXIJxkBsGcyiXBjsaFZQLmZjitz/IGF+WL3 MSHMNExSeyHu3TuuGx0HlZMDCCeT9RgjkRdJcOR2DGHoDcQqpHTL 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 Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6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04PqPjnYbv5UWuDd2eyzGjrrFOsJEi8OK2d2j4FfF++ AzOMdW09JVqejQARAQABwsF2BBgBCAAgFiEEbF+pj/I7JePKMl6Fct6KD1TwOgwFAl/0ZFUC GwwACgkQct6KD1TwOgxUfg//eAoYc0Vm4NrxymfcY30UjHVD0LgSvU8kUmXxil3qhFPS7KA+ y7tgcKLHOkZkXMX5MLFcS9+SmrAjSBBV8omKoHNo+kfFx/dUAtz0lot8wNGmWb+NcHeKM1eb nwUMOEa1uDdfZeKef/U/2uHBceY7Gc6zPZPWgXghEyQMTH2UhLgeam8yglyO+A6RXCh+s6ak Wje7Vo1wGK4eYxp6pwMPJXLMsI0ii/2k3YPEJPv+yJf90MbYyQSbkTwZhrsokjQEaIfjrIk3 rQRjTve/J62WIO28IbY/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> 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, };