From patchwork Fri Oct 11 19:55:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13833108 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 CEE6019E998 for ; Fri, 11 Oct 2024 19:55:30 +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=1728676532; cv=none; b=ZZAoRXjzYGlcCL7KDiK5TyNcZcKL8jeiyo8BAWz7msRWCrQ49Iy4hWNzf1cTwaeMfDvCGHmpcA36MwYtqJ1ZpU/ZkmzdvVPWiiBv+lCVwa2YgjjWQzmzmlXmTHu41FnG0/3RZttFAem/DfkBxlb3pszI9WzxoX9FMZtO/b22wHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676532; c=relaxed/simple; bh=aWsMQjR/v5ohEZIb1Hl/3QWHGw0Ip8piXz18xNshJUI=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=Tk4JUiANUxeS7guDNWHUx2zObruywzSiZB454FonZZdbPa/aOCw83vO7HFqaJ++QMXfpcHjCcG5gh+28Zh/iV10VOJHEZW63YLbPlw9dxmhnsIytJJ/NFYNBrWhQLqW/8oxKeMO76Rci9kXbIZaoWVWE1c8N+5DtckV0AqTu240= 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=M9c4vX6x; 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="M9c4vX6x" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a99b1f43aceso272035566b.0 for ; Fri, 11 Oct 2024 12:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728676529; x=1729281329; 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=U2CB/z5aHTZgW9rkOkYSKRdlvRIgOp3XLYNGb8MCY4Y=; b=M9c4vX6xH7lXha9uisWRtb3iUpTUFaueofY12kij1Ui3d4AGzhjryFBY7+x7+yxJ55 LQo607gOAJHvtJ3SoLPUm46YVh9dPlKXNQ7ZL4uCeXTb/OdqoWA7jPwY5XKGazCnRdlO /t56eO5a5B91USolmEqzSZfVhXgcFfZi6++8ls6M7RYhhJb9FePlvbusCyGuMC9lzoYP WFeC7rTA/Wh9kuN9u2ssFHCmr0NXJ7izBNH9dVlslwgZy47vhlmBpM13Dp364g7tjUIV RMO6QCMoYVINz2gxxyjl0hhGHCyeiouX4xQ6xn48ybucEgQaoBQgCRUgm3hK5AR4RMvO 26TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728676529; x=1729281329; 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=U2CB/z5aHTZgW9rkOkYSKRdlvRIgOp3XLYNGb8MCY4Y=; b=BhCs7mxJ1QuGWdGpHz3q/03O6l7K4WljJvTWZBjacfUjDZ3Rej8FEaXGUe+HiQr3Vy 8doORG2nNKdsnpgLE71t4ykNUQ3bdZ5sxLzirBSka7a1yJpRM9FK3Swq595OqjqUNf8b mdEZVt1eeVpPwg7BM0RsYOykoguEtjk7HQjbVdJcQoIl2VXV0BgRP8h6kBIXYqly8lwP /vFgaIm0TobzOQiXUagAI6WLjoe+AhTDl2PYoqRW7JZN2hhvQekQeVBRT6P+xW0cKnTT kDgEnGbQ+ebHhjRpJ9WK7ht7KLA432w96/JIfILfKNzRUsa1+5feCJJY8fYME9TY8lCh Kfyg== X-Gm-Message-State: AOJu0YyOu8qUQ+4jPkHe94PZmR51sPq8qfeQp13FFoMzhy1Rv7Zww0sL Z2Y6UVFUQj6vdQorHIaIbvLeQsuJcbBswACTYY7cKYsnusZBMZ3qBcP7ew== X-Google-Smtp-Source: AGHT+IHks5xYSViIru7HYv3vKeMIb/9jiSYXndq5pQfIL8XbGopEdBe0Sf7JYcyDFv8aW1hoM1kZoQ== X-Received: by 2002:a17:907:97c1:b0:a91:158b:1c23 with SMTP id a640c23a62f3a-a99b87f3669mr325947066b.9.1728676529112; Fri, 11 Oct 2024 12:55:29 -0700 (PDT) Received: from ?IPV6:2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce? (dynamic-2a02-3100-afd7-9a00-94ac-542a-1cd2-c9ce.310.pool.telefonica.de. [2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a99a7f25eedsm246881966b.71.2024.10.11.12.55.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Oct 2024 12:55:28 -0700 (PDT) Message-ID: <2b1f2778-1127-4979-b02d-f75e16497ad7@gmail.com> Date: Fri, 11 Oct 2024 21:55:28 +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/8] hwmon: i5500_temp: Simplify specifying static visibility attribute From: Heiner Kallweit To: Jean Delvare , Guenter Roeck Cc: "linux-hwmon@vger.kernel.org" References: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@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 AJbfg8HZEK0ljV4M8nvdaiNixWAufrcZ+SD8zhbxl8GispK4F3Yo+20Y3UoZ7FcIidJWUUJL ax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/0EAuz5IkwkhYBT1MGIAvNSn9ivE5aRnBazugy0rTRkVggHvt3/7flFHlGVGpBHxFUwb /a4UjJBPtIwa4tWR8B1Ma36S8Jk456k2n1id7M0LQ+eqstmp6Y+UB+pt9NX6t0Slw1NCdYTW gJezWTVKF7pmTdXszXGxlc9kTrVUz04PqPjnYbv5UWuDd2eyzGjrrFOsJEi8OK2d2j4FfF++ 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: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Use new member visible of struct hwmon_ops to simplify specifying the static attribute visibility. 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..2a530da21 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, + .visible = 0444, .read = i5500_read, }; From patchwork Fri Oct 11 19:56:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13833109 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 462101D0E19 for ; Fri, 11 Oct 2024 19:56:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676616; cv=none; b=p4Mco9lzizWT7kWP+Qv5jqdzESLO3t1FGZZBqLLH2a3azDun2/e0PesJ70MAhlAX+YKQ4vj3Tb70eADzdbd38roxIIV0jEAuyIru48p+PTwpA8acMHxtUNyny6L7Y+H2+eOvcKoqhbXjk3TPQStW94k8Qohisr9reAuLMFcBmCo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676616; c=relaxed/simple; bh=g2Z5nllsgmxj1y7+SREPGoK4qScU6WDZHVW+crgNhIM=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=KyNvEGoCpeOfJZBAOT9zocgARR7siWkd040Ev6q87bDACZXv4EKd7lQF3Jf4zID9yREzcFZlkR2ML9CARfoIs1C8j4CA+npjZaf+keFKpPuItVir9Jk7yY3fW+JKHb+g7FHaWL57FxGEcJDu33c9bLjQCxp5KJsU05WCMye59ck= 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=fZ9UzwWE; arc=none smtp.client-ip=209.85.208.42 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="fZ9UzwWE" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5c94dd7e1c0so1194441a12.0 for ; Fri, 11 Oct 2024 12:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728676614; x=1729281414; 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=cZDsgvaMSMCDosVhYQ+jHb1gmxWEhWiVbisFT4Tb9Og=; b=fZ9UzwWEuZgJt6Ep3TdvZvMBz0gH8rWhOmQsoSCvxNwTe5mEY24ibtUEYXa4p9mpHH krPXO+SMLToPi0sL6UM7elItWWcnMffVu53F4S6+9nq4RhZ7F4ZUq2gLef/4Eb3NWoOn xvbtDxDgO+nyR/ZOW3HdsnKpJd7u37zPf7N1AexopmBvuBsiudOMfaJCN+JmEhZXX7Ih m7IJSUl/acVNgd5zR1ydCoH4TcKUzyHB/5q+1dS6ZYFQciB/sigYG2yJLJpi1BJ13r2F irwEFga1yxQBt1wtK2NIpe1q2BNpxewhInhmVeNFmqgcuVSIAHA+4sWdj2UPkHoJRMRK ZoFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728676614; x=1729281414; 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=cZDsgvaMSMCDosVhYQ+jHb1gmxWEhWiVbisFT4Tb9Og=; b=ElgXD0NRehlNMP92j2xsxu32kboaonUpccZ2gwDlX+DRGBW1ClAA5zeCzqJIJezcI0 QmXi+wYvwRxo3iFkgH17BhQ2DePy7Z0e2+Ejdcwa9aRsf8+FEMCvVZchl3nTO+kIDstt 24P9vvRLWfujbRGRJsF4nyylkFJqwC5KHkZ3YnT2GWOhF6YuYZAlu5GzHLmF+9EWmpnR dEmFMnwx3cs1ZT0LbGfmY5zorMc5ODSRdaJT5HcVvQ8OVFAPhmbL1NuZOt99ghoNahKK FT+6Sp4JFeqp0yBPPYyxZDGbFddhJ1EXejlvaPIGpXlN0ANSzpv5yVfb6tueI9udUJK2 TX5Q== X-Gm-Message-State: AOJu0Yy9I2InAeEqnYJwwrEd1AMK8F2Ulll7Fr2dBPiDodhe3tivoGgL m9uiiuAFhMnAQd7bGPy5qQw1rtZqDtdVaDdrYZ+rHFBBSTrLth8O X-Google-Smtp-Source: AGHT+IGVhZQubooyolf8IvFX44iyhcOLGv6x25Y50SUQfKbw9o7CbrDPWMQINQ0L56O/GDeI43Khug== X-Received: by 2002:a17:907:f18b:b0:a99:4e2e:6f58 with SMTP id a640c23a62f3a-a99e3cf8692mr66219066b.35.1728676613611; Fri, 11 Oct 2024 12:56:53 -0700 (PDT) Received: from ?IPV6:2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce? (dynamic-2a02-3100-afd7-9a00-94ac-542a-1cd2-c9ce.310.pool.telefonica.de. [2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5c93726094csm2216285a12.64.2024.10.11.12.56.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Oct 2024 12:56:52 -0700 (PDT) Message-ID: Date: Fri, 11 Oct 2024 21:56:52 +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/8] hwmon: surface_fan: Simplify specifying static visibility attribute From: Heiner Kallweit To: Jean Delvare , Guenter Roeck , Maximilian Luz , Ivor Wanders Cc: "linux-hwmon@vger.kernel.org" References: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@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 kP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XFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Use new member visible of struct hwmon_ops to simplify specifying the static attribute visibility. 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..aafb4ac92 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, + .visible = 0444, .read = surface_fan_hwmon_read, }; From patchwork Fri Oct 11 19:58:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13833110 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 4144E1CFEB8 for ; Fri, 11 Oct 2024 19:58:11 +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=1728676692; cv=none; b=GysmCSJtJXp5g5QSmvKgXsep2uwtO3vnjfIq+IsGpnaObpRQaLkQhrRfskcY/5DxLlX3u5rbuVN9GYfP0FklKMgDlqYDV0k+bq8dRjr5/P0KdeQJeb0BCJXOZZTWDiDqyUgF5O8F5gud73bF8gIdg7BU6R4b040a5m7+LeWZb1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676692; c=relaxed/simple; bh=HIUx5GEl5Z2eG7FJX1fpH3u0wmKFMT/Mns/qbDm/pCQ=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=rY3n0YhU+FeCoydozyAUSEwSIinjexNcnIxwhjJKOxq8U5uoPTYc2AvSepXvfJrFFGzlnRQYXuTqRUvxeMGBCIf5W/rFBd+rvgnhBA0zUn41V3RyPNb9s8g6atIkBQ88N7x6nwX5NinTKslAbo+S6dPNQVMtTCG80eGPIFhv0DI= 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=IMnOxvUs; 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="IMnOxvUs" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a99388e3009so323326066b.3 for ; Fri, 11 Oct 2024 12:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728676690; x=1729281490; 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=ex+QHl0yEf9dxvIiQMFMAsFSJuV29BlEcKRrdoFvs5k=; b=IMnOxvUsUTcECe+vMVL5FKxlA0KT/mdfP3SvIFZeu9Qs5oQGY5Fv/AEOL2j8RpvBtG gm1Cxvbln7tXMvhxA0vrPaTXenjLPEBf309CL3gZfo9WyH+MQpZHd+6eCJh9BPFWBL1a KVsdEupp/EB6xs7isyXZyEapHicSG5ZbeOrGa9THOXBnotOY6ZnbfP33rX+7asZ/Bnfn 5lUzBVtLGr5LlQdHCXVy/t7KVvEovWoRYsjQj0jQMNjaSeFlQobi0UdWBjGdgYqSRt0S HEEztfxO9JaRFDtuSflhGfflHcVgkPQqRH7ji6PMuGwfgNEKxk/B8+sLGAWinM86Mq4F 5yaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728676690; x=1729281490; 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=ex+QHl0yEf9dxvIiQMFMAsFSJuV29BlEcKRrdoFvs5k=; b=FYiYHdBYm3HEAZ+G12K0DRc938+aLtDdZVyiyTEOV8j6o890NeMKYwlmns8AHIP2el HQRqEfNYoxv9qCSBjq49DaR/y/t+Cu/ch4bPpVXahNUt9oxQCwwVKoEclKOH2wm4jzHJ EtYOP89qP4rYTCciXhF/6d0Nz1hoIPIvdRRJIKhVR0TxGZ60SO0jUPcF3QwjZmpXYx4h 6mbuv3VBxhJD6sch8w5sF5Mmm43hC15bOhMP5yMxhU6QOWic7rJ1Thj9LTgC4CTJL/Rg qlqzr8/xU9eABWoHdA7LUO5G9iQTY8Vp0J27WLZCkTXi1MGPczgoVRsx2CmJbFUouAfN KJ2w== X-Gm-Message-State: AOJu0Yx/UL1g4JBdvVX9lEErPcL25Vs8v5cav/RMhGaMSQNVG2yDis57 o5AOirhzOFMUa+S6jwnDXgKXcSf4hfRk3f2kk4nwYArg1zkI2f8t X-Google-Smtp-Source: AGHT+IGPFD7mSlPINrELpoDWuf+IY/On/Ova1JFgD8l99xZkQBYWDipDfYUomOfwaPWnnjp8FDy8pQ== X-Received: by 2002:a17:907:d2c7:b0:a99:7a05:a652 with SMTP id a640c23a62f3a-a99b943b060mr311750166b.13.1728676689495; Fri, 11 Oct 2024 12:58:09 -0700 (PDT) Received: from ?IPV6:2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce? (dynamic-2a02-3100-afd7-9a00-94ac-542a-1cd2-c9ce.310.pool.telefonica.de. [2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a99a7f5cea5sm245094166b.96.2024.10.11.12.58.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Oct 2024 12:58:09 -0700 (PDT) Message-ID: <5c26d8cf-d6dc-46c5-be7c-fd8207b3f177@gmail.com> Date: Fri, 11 Oct 2024 21:58:09 +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/8] hwmon: sl28cpld: Simplify specifying static visibility attribute From: Heiner Kallweit To: Jean Delvare , Guenter Roeck , Michael Walle Cc: "linux-hwmon@vger.kernel.org" References: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@g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p6Y+UB+pt9NX6t0Slw1NCdYTW gJezWTVKF7pmTdXszXGxlc9kTrVUz04PqPjnYbv5UWuDd2eyzGjrrFOsJEi8OK2d2j4FfF++ 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: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Use new member visible of struct hwmon_ops to simplify specifying the static attribute visibility. Signed-off-by: Heiner Kallweit --- 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..454cc844f 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, + .visible = 0444, .read = sl28cpld_hwmon_read, }; From patchwork Fri Oct 11 19:59:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13833111 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B14811D0492 for ; Fri, 11 Oct 2024 19:59:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676771; cv=none; b=n+/OIArRRzr+GwDBb46uY6EYP+XPMUnNdo1l4jCoqtZXeNR3ZXNWoa0ApEJE8BQL90EdZevskA2p6iFyop3WkkNbeQfuF10l6nVi7pFLRxrHt1fu1/vwWZlevkehY/2lPFIHwMcVF+ayMJeROY7SWlobJ3ai6haquaSTepJn+X8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676771; c=relaxed/simple; bh=mjyC2vO9uUIhZQ4BcZzrxbv2ZqrPE5y0RCB92sV77M0=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=iF9U4AqgmWLnQdvBDZeN+2njGmFkq3AOA1BjOHczMlLKeQgr8mUzm5NZthIO/3pnodPKb2NaCKYYlxTYFLJmBz39q7inJJi8FGuvvTiI2mW3kW02wn27RgQfXbpxZpyC+pQKzb9wukXip1rMM+++AnIvp4KZs0Jw7ugy+4+3Y8Q= 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=Nkp4Lab0; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Nkp4Lab0" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a99ebb390a5so1836966b.1 for ; Fri, 11 Oct 2024 12:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728676768; x=1729281568; 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=DGqUx1ZsGPa8h1ot7WWpB/ncHsJ25w3V37H/bTcFPBw=; b=Nkp4Lab0m/OkdR0v2udSW6RkOA6tois4h0XMvKk3MYZwFKBhI2AbXrgMTAoJlubYv7 23IQkuoAlkTjyXpR2OhiJ1kBBF9y0qN78XHzzOKsyV5KWND8Uy4tW331F1jm3m3VpkKT MA6uVxXsXHuZyIHTvpsB4OSlRTwVgVNHaAIdB1mPyb6dk6a2IfPw2qAYRyLhXsuvRkva wqu9L308OgXyKg/v9aTH2H7CNnUfSE+CO/W7l0znyaOLCjTUJeRk+HwqNZbMpe/zX+ib 4/K1qZItPzq/AQJhILttWRDXMayiSmB5puij3LJ1tK4YyeiUeARGrHaEBpSaAGPpjFoH 3tbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728676768; x=1729281568; 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=DGqUx1ZsGPa8h1ot7WWpB/ncHsJ25w3V37H/bTcFPBw=; b=O3iEiXdHtlX00l0THQitgo1qY8h+hU+JNzGFs0JELnhZw7rUH37ATJWkwilvymokWP yXVxZnf1d5bFCm9tw2XmORfFo8CZ9jxUTxEFpde0fbeHnT/oBo5iyG4iicQwXETlJ/6Y 6m90Uzn9NpWZGCjHsUaKr+CQwQ3L2oAzyRJ3AICcGXTQbw5QoP2Q7di9YndAeaHFdvvu u64in7lIuYpmL8M5bpOKn3z4Qv4wTX4rDGP2R134TQIk/xbS0Jip/Bvb7LNZTYzmIxAM 6fy3R+ZrJ+DRCJwHre6sViwIUMI1w8h7UFLlJq4k9t0cOVE6HcjZVAkeeczRs0ZYcQh1 a6Ig== X-Gm-Message-State: AOJu0YxasZ3w3Qq5z3TClnuJM238bx2icgatQd+Z/9NK/PhmiwidM6Hy vP0wTS4vPuWssfjcbHgcWwJnwEuDj9JJ0BRmQTdob6oc8adSfez5 X-Google-Smtp-Source: AGHT+IFDeKMFr42Y9e/eqs9hbH5mcsthuH7Lx+mtXSPPy61YsjdDaj4OlO48VKL9TFOEJPNWip6ClA== X-Received: by 2002:a17:907:7da5:b0:a99:6265:ed35 with SMTP id a640c23a62f3a-a99b87f0becmr296813866b.10.1728676767798; Fri, 11 Oct 2024 12:59:27 -0700 (PDT) Received: from ?IPV6:2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce? (dynamic-2a02-3100-afd7-9a00-94ac-542a-1cd2-c9ce.310.pool.telefonica.de. [2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a99a80c02b9sm245718866b.138.2024.10.11.12.59.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Oct 2024 12:59:27 -0700 (PDT) Message-ID: Date: Fri, 11 Oct 2024 21:59:27 +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/8] hwmon: gsc: Simplify specifying static visibility attribute From: Heiner Kallweit To: Tim Harvey , Jean Delvare , Guenter Roeck Cc: "linux-hwmon@vger.kernel.org" References: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@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 cIivllReueG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uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Use new member visible of struct hwmon_ops to simplify specifying the static attribute visibility. 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..34aa17a23 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, + .visible = 0444, .read = gsc_hwmon_read, .read_string = gsc_hwmon_read_string, }; From patchwork Fri Oct 11 20:00:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13833117 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 DC7AA1D1500 for ; Fri, 11 Oct 2024 20:00:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676854; cv=none; b=apmQJZkOxXjv1EQna8o/I+viqCtmpc6t5SochYCzSM/I8x/RwUSN+bqnLpp6Iyvb7KrODVPS9EVOjITxLf3BYhB86eXvJ5qDT11mjC+UnlWCO+nCxcaEqDF75rcKTQte4lFaHAM2SPapOSZJsCRPoG2T1qChEQFLIlIQh9IDPmk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676854; c=relaxed/simple; bh=jb2K8UDcfBeSW8lORES97VPvEbFaTn883GjHqHOkRxk=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=JcGC6hzdsI3+dUVnfqIP6gAg8eEkbFKQCYdUcFjM58Dd8Kmfw6M2R9E3PB6ZScMByltp9FBIF9QS7jM6CIbXpYKdze37PyliJzjwz9t8WpLW+JyGh1lUKhMpdWLn2jdRjcB2LTLtBCURJ6oi18YomcZVHXDsqTVSohgMzo7PrRk= 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=FeGNvw+E; arc=none smtp.client-ip=209.85.208.45 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="FeGNvw+E" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5c89f3e8a74so3154194a12.0 for ; Fri, 11 Oct 2024 13:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728676851; x=1729281651; 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=D437GkmU+RusUDYzI0z+cKOugcVoV9c5q9FSP2Pkw0c=; b=FeGNvw+EK4xOQ5twZSt2Q8zy76OcaEQDDaLT+r7PmpDsVS9HsrH/yZT7MaaSJJse1e Q+Q8xgLFZZcpnDOtrSWzQNMRHM5oqznXBWdorMib8UELAbB1kzlKXfGjKtgEqRzNrmLU BU1iAu2pL0L3Tg14J7pz0SxW80HfpgYqYLaHu8at+T8LYikrAx4MNuCTbo3TM4p96rb6 Y869v023CCdfEE4Cjyx9LqKlMNhYBHU6MZQ1yN+JZeShKf9XTUfspKx6Zbza3A2T9mXE 2fUQaqzFRZJRQ41vitFnuhO8P1XNbdCQmNKheYACnf4FhPZ/KQM/BE5QJ8YWO5OVp/fn zeBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728676851; x=1729281651; 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=D437GkmU+RusUDYzI0z+cKOugcVoV9c5q9FSP2Pkw0c=; b=dnncAmtO4tLmaWQWUl9PrxRdCdJkNXCTrc9prGeI3fcVmkWqYOdBUrmYLBiA1YcYP2 aRL60J+FRwIpjdKcUIaiVXckhSwCXN8Y58LtOod2N0kuzDu1nEuQT55XREYRk1vIyC8a 2f+u8AppHbfTggPH49iOLSjLxukWCWLsrMkhTyJ1hPCKjRarmhfUTXxrN8ji065IaXpL PaLNPLAKbu10xCirqkqQKPBN5y8YOzMHbTk7kK+GzwE7GAi1TZeLNyItRoPV0k/U8ZSp PJ0A66pZLujW644WCpDLtiNG8EzGwfiYxvUDfZcD99iC+rAaBYO/FarCi6qWfupvN4OC Zl4Q== X-Gm-Message-State: AOJu0Yx9fyIqWnYO//2yt9yY0wRX5TAIvOprL8Q0Jyjt1HTqOkj47L8S ostbyiPyUP9EShCC/UCaF/1dCbLRjyHhfEpiCWhcs6xJaBdvxdhHCbdVFg== X-Google-Smtp-Source: AGHT+IF4rgShnrboygrR3ep8QC1Pu5tuYYKEniRnAzdN10hGetPF2UFsf6eB93XXqNJaLkJ18THZ+w== X-Received: by 2002:a05:6402:27d2:b0:5c9:47d9:ad21 with SMTP id 4fb4d7f45d1cf-5c95ac40c72mr220537a12.27.1728676850587; Fri, 11 Oct 2024 13:00:50 -0700 (PDT) Received: from ?IPV6:2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce? (dynamic-2a02-3100-afd7-9a00-94ac-542a-1cd2-c9ce.310.pool.telefonica.de. [2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5c93711add4sm2198223a12.22.2024.10.11.13.00.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Oct 2024 13:00:50 -0700 (PDT) Message-ID: Date: Fri, 11 Oct 2024 22:00:49 +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/8] hwmon: powerz: Simplify specifying static visibility attribute From: Heiner Kallweit To: Jean Delvare , Guenter Roeck , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Cc: "linux-hwmon@vger.kernel.org" References: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc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gxUfg//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: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Use new member visible of struct hwmon_ops to simplify specifying the static attribute visibility. Signed-off-by: Heiner Kallweit Acked-by: Thomas Weißschuh --- 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..4e663d5b4 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, + .visible = 0444, .read = powerz_read, .read_string = powerz_read_string, }; From patchwork Fri Oct 11 20:01: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: 13833118 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 CCE8A1D0F42 for ; Fri, 11 Oct 2024 20:02:00 +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=1728676922; cv=none; b=TW3cr8QJMwvfHK2Ecg259e6w7TpXFzAz5lKoAMeSt+0hXfp54xi7+RBRZoLbBOY89fPINOuOwkeZX+J16K9vPw6giDDMci32yOnfH/BbVtb3ZZJfXIg5jf51QXAXxXMvXHHS2uPnTX4KsrAXOKUlxJ47hZyOtmj4y3ONSXuZeGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676922; c=relaxed/simple; bh=nsWvAmwx+RtfNW83M3K++UwS3nYNGMdzYGpoYSlvUtI=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=mCJriMFhbAeCwmpoFqEfyQQlB25aNM5zxZDp9xIVN8U+JiVyHiW6yXf7p2Xmkwu55Gun3S6+aoBWGQYTiszhu4Kfugkq34jNugBLJR6COjCxxywjwUFDj352+3vH02hAZorDocJA2987v1qz5YDNp/c52vWsbfTh7M+PT3ZRb5c= 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=Ue8BE5a9; 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="Ue8BE5a9" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5c915308486so3219279a12.0 for ; Fri, 11 Oct 2024 13:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728676919; x=1729281719; 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=BDQSDW58lL1wX3XCxNH7M1Ks+4iYHlN3+NRWsca0C3g=; b=Ue8BE5a9wYEDk6b/UdQLwENJDM+JxrOyFv3mnte+LQvcpuC9EQfxXR4WngtruHwLc/ OW4LpkNP2e6UtQ5KtiXF8+aPFxyPHF00LTie0T3T3KUgxcdoh/gcb92H5Buf9FJ9inBn Ssey/Z/hcB+M2uMWwFCzx/StG/Tw1DX6nT02D++1OGi66HTlOd0LFss0RwerAT6lmmun NNBA9m8ObCDQpuzTwq1AJ5SAYnfTk41WfdOYOYF1IotDlIRmS2BbzxR452PSmQeHr969 eb48+B9bxdlMt/Vpg7iWuRUdHxZuFxh9lwmXQ+a81SiL8J/uGCacYEctClgBy/cBjJny MI4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728676919; x=1729281719; 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=BDQSDW58lL1wX3XCxNH7M1Ks+4iYHlN3+NRWsca0C3g=; b=TFrUwHvHAQAKRqPyUg9D+Sa2L8l8KvA5Qqd21zbYBt3itZnjt9TfUPU7ihNluGDpGF GGhev1mFbtJ936+GKTFk8ymW8O6cPWtuSyVho26jTBpSdqPTDUrel+PSWIY9D8iEwjOk H5fRWYhrvL1L7yb5w6qeJ3oITEVRF/Avdt4/Zf+nN4WMLsKARaBS4mmrtYewP32G5hCf g4Ds+F4NbvYt/8KrNh0simwDsfJZSWCspWnKBpj2Ngz0HnJ6XlPAW6hCCKtiXXKPBVFe BXr2uWakNyDakgr04DV6nObie7QG+YLCOYNNCKICu9+evm+nqF/aN8DOiWSC2HXLfvqY sOxw== X-Forwarded-Encrypted: i=1; AJvYcCUIFHl+9CisH1CdMkMTxTdjg4Z/veiMzXqvLRTvMX00NpkzGsAcHnj2SDCc9yo7Z8r6fP77/pfvsqirqw==@vger.kernel.org X-Gm-Message-State: AOJu0YxtmFdrx2dS0+C8K734UT5oDlu4p6CTdJVu2ndHOEzwEPsPWdQc ObNFxGyfjUmvFlQPzJVg3DOzAJqTiCRCI/AMY+sBpJMnekUW/hNk X-Google-Smtp-Source: AGHT+IGSgzy50+5C/g//3og+g/M2IXV8CCJul+nVOD7u0b97IBTr4WDL2UcZbSLMsCybkQpTD+0CyA== X-Received: by 2002:a17:907:d596:b0:a99:4159:7e31 with SMTP id a640c23a62f3a-a99b93cb3bcmr291855166b.33.1728676919090; Fri, 11 Oct 2024 13:01:59 -0700 (PDT) Received: from ?IPV6:2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce? (dynamic-2a02-3100-afd7-9a00-94ac-542a-1cd2-c9ce.310.pool.telefonica.de. [2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a99a80dc687sm246882566b.147.2024.10.11.13.01.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Oct 2024 13:01:57 -0700 (PDT) Message-ID: <4e8893a1-b080-4676-97b9-a48ac9ead28a@gmail.com> Date: Fri, 11 Oct 2024 22:01: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 6/8] hwmon: raspberrypi: Simplify specifying static visibility attribute From: Heiner Kallweit To: Jean Delvare , Guenter Roeck , Florian Fainelli Cc: Broadcom internal kernel review list , "linux-hwmon@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linux-rpi-kernel@lists.infradead.org References: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@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/8wgPAyopXOWOxbLsZ291fm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poCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Use new member visible of struct hwmon_ops to simplify specifying the static attribute visibility. 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..10ef1e1f9 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, + .visible = 0444, .read = rpi_read, }; From patchwork Fri Oct 11 20:03:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13833119 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 1EE1D1D0F49 for ; Fri, 11 Oct 2024 20:03:16 +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=1728676998; cv=none; b=DvTkBdJjsAuyZxDvD+hPcEyF2blKeBN1dsWNmj642hcznuN1yQeHiHhUKYbeIqVbTH4+EwjlkfMfl84SsssSW/QytTS5w1MX6WF6pjKMCzXXvOeAS2lfRJv7ur+KrMBaeRU+iuc0k2UTNOH3we7jO+VrzfR84SU5xNeCNhWX2ZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728676998; c=relaxed/simple; bh=EWSMT0OZU/llVl0RAk/i+5uYd+JCy/irmlzqd+QCdhA=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=vFUXzVgPAuVEl8+n0p1Df81eqmhaCJQc/UnaGeKeNQO6W6/8tg3woFEvgiU04vH3mpRB6s5Rnd6D255Ib9uvTEB3YIPysbxsYVjhb4Q6PnYdKmrZZjCjFBbDRGBKsWUlxwx7u+1qxy5BapAo3iYwpMOVKvlicRQ1RGNH9BKsr1s= 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=NVDlAoPj; 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="NVDlAoPj" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a99e3b3a411so44012466b.0 for ; Fri, 11 Oct 2024 13:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728676995; x=1729281795; 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=eDz3XI6jFYHfp4NzA95pcy5R9+V6hQKHOygvEK3KB/k=; b=NVDlAoPjUiY4Ofee5DupBCCADzDytff40B2MPpf7k983odtP/YXM3aS8k9TJAH6Ejl 1bZPbubpuUvxKo5ZCQrSWCFOJc3ppC4m+CocZGW34+Jak71B9YTqHd/+iZiP0Opi0K8a EtjTVzIT5s3SgnRlxtxV1lWAf/MhpUS5p6yv31RTZJNqDzHNfYFWMRKHDgVeR+JlUDe8 FzB56RiobEGNyoYavfZC21zO7gZ1paDUVaAVZxA25ZJtj184myndP+cDkiloZnJbKoRg Cum8yh+JttB7wz/cqqzkErBDlxX+g/6JrxWZOz/Bx5ZHc1wNeSI8jdIhq3xloCLqfqhL ud+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728676995; x=1729281795; 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=eDz3XI6jFYHfp4NzA95pcy5R9+V6hQKHOygvEK3KB/k=; b=dIdJ9cmD7w2IpsZ4OZoJLIbPvNR0hu6mpoTtOnwMWOayaPFSkxMA16cuNckXzcM4s5 6CO40RFHoalpIjMMQp3GlnciwWtTiRh7piWU1qwa+xLyCKNW9tMVhGeZhR4jlCK4LtRI LCMHx0tXUOrxRXb8Xwxgexy5R0wvmBiUBpWQFSfNRXgR4KR262JG6HsPDUK/pDH6R3u+ qAHiQcAtZvXPbjlH2/42GEgCSBIw0XBfv8U2HbKnTYIueRtJrHsf95IxYlbhiGq/XYYa l//HRS6Vb7WguMFIKI+HY9ArPdIax87B9VGCxzXfGZeREpMUcyEykT6csSB6YnglJR/e JomQ== X-Gm-Message-State: AOJu0Yxj3hJgvqhu5ZUFvzyR6BSmZhkqghZ4Iq+0ptxTYkJY27O11zsP EcwZqV7TB4F73bZyX1vQ1p9w2qu5kb1cjEalLGU8mtVUzZV2/F1nhnUphA== X-Google-Smtp-Source: AGHT+IEOIMpKk6h8g5dnIgoIe+r1R488jY8xsS02OL0Rk9krv9aiTTNsi3AkN605MxTYKgL2aDUCPA== X-Received: by 2002:a17:907:e241:b0:a8a:6db7:665d with SMTP id a640c23a62f3a-a99b885b42fmr334756466b.17.1728676995274; Fri, 11 Oct 2024 13:03:15 -0700 (PDT) Received: from ?IPV6:2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce? (dynamic-2a02-3100-afd7-9a00-94ac-542a-1cd2-c9ce.310.pool.telefonica.de. [2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a99a7f5c4c3sm246555766b.95.2024.10.11.13.03.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Oct 2024 13:03:14 -0700 (PDT) Message-ID: <8ef99170-b37d-4c9a-b3bf-59f4ea76cf29@gmail.com> Date: Fri, 11 Oct 2024 22:03:13 +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/8] hwmon: intel-m10-bmc: Simplify specifying static visibility attribute From: Heiner Kallweit To: Jean Delvare , Guenter Roeck , Xu Yilun , Tom Rix Cc: "linux-hwmon@vger.kernel.org" References: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3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AQABwsF2BBgBCAAgFiEEbF+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: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Use new member visible of struct hwmon_ops to simplify specifying the static attribute visibility. 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..e221f2c1f 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, + .visible = 0444, .read = m10bmc_hwmon_read, .read_string = m10bmc_hwmon_read_string, }; From patchwork Fri Oct 11 20:04:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13833120 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 20FA01CFEB8 for ; Fri, 11 Oct 2024 20:04:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728677077; cv=none; b=oBYcwU0iOab5/qWUPgQ95dGKXBQSIr5z8PyTOaLq0szBwwn6JYWE4FOe0t69RfK0sHHDpZFUir11h7/XAefVHcBC5n16uEJZNyX176yA3jjmcQ6MYLRkogEurYFhiB+WA6CWrd7MsJ9JfSca6pGVw1U1v7ETPGujO5tn6jMdBts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728677077; c=relaxed/simple; bh=14QfitH73aZqjSr2FWvNeZ8QDiUgaGRlyjP+8K5KKro=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=PLMeNKoO9Viy7rqSmh7FkylfCNb+qUfe37IjjybB1Om2/yuLddaixLYh3B8LdmSoUINjGdNrX9tK6PuuDZ9F8MF6n7vtg5QkXfKlX2yHVdcQThR+8YVgJ+i5ce+b4WQJ+QfceFAgNYIpyiVPtyWtZr7bS9/MG7YHFNk6QfIA6QU= 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=ALw4G/cy; arc=none smtp.client-ip=209.85.208.179 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="ALw4G/cy" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2fad5024b8dso28205411fa.1 for ; Fri, 11 Oct 2024 13:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728677074; x=1729281874; 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=IH03J0HFNDP/Jl0w2VxxzQlRmOuL3kJdY0NGhLlQEI0=; b=ALw4G/cywJRBJkaGML/HrH0+xTBlzeKudlijhN1fa2B7W2etvAqhPrX6plH0NxQ1mZ fomvryAK/ttxfUtWEtmBx+78oZ3AOhwIqEec/gveJNq5wWfexDo+R3qWTOlD7gZnL8/p Ko4FPHpsHbolt6nXD51UQQPWCjr3XhHsXhD34r+DxEfwXdpwzpnuYhrFAfKmnYy2MjqW Zu40tDrLsYovFEpxH9Pq4aQhwRdo/5hCLSmMwbjkxzTn1mSo2Kx24ftt+svmHAxDCS4d OOqpbFfZewkEhi63sUXcBvtHCJ0r27fbZbqM5QpRWjOLDutxRdWFFaSPp5PaUo3AcnCC Uk0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728677074; x=1729281874; 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=IH03J0HFNDP/Jl0w2VxxzQlRmOuL3kJdY0NGhLlQEI0=; b=Zu0X5L9YRPiIZ7B+wN1KUSYKiZFJUm9ystmMaJx2POoFbWJCutjTGnuxFDrxJCmUxE 8SviOfp14X+csyhG2RdWpB0+jOFqk8wABjFbHqUPqI7FrWK+H70i2yJ1yoFFInK+euSY i3vkL7SKf47vGSC6eohrAgkKz/Lp3RPXc6BIkg73Gt1osHTrEYXfB5hqWMWpBWiGCFAQ KMOZXNMcS2zEvirHwyu3GGbvgWRDvNgOL/yhg1saPDpPGO2/Vnk325aZUjnSd0XOIqc4 e/cpohuDvBAwGNOJAijLFdB4mlGYLUXdR/Nae/BITDhgLP1K9cxp03ETKvJSIm3GDYD0 p8Cg== X-Gm-Message-State: AOJu0YymFKvxw6faLxk8BLnyZCF8joyI5eOA0ZVd18S4XH+DiescNzwH n8TxhJIcfpw6HfifA1mAu465/XO3CC1j9vPQAouwIzPZBiHnEJppG3ZSIQ== X-Google-Smtp-Source: AGHT+IEUvE63MGsu4ANz2jqqOJTaOtOe4BTOVn99rCtptmpAWS2KpH1QlW5/V2wkhD01gSg3WYn4rA== X-Received: by 2002:a05:651c:19a5:b0:2f7:65b0:ff29 with SMTP id 38308e7fff4ca-2fb32ae7e0fmr20018321fa.38.1728677073907; Fri, 11 Oct 2024 13:04:33 -0700 (PDT) Received: from ?IPV6:2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce? (dynamic-2a02-3100-afd7-9a00-94ac-542a-1cd2-c9ce.310.pool.telefonica.de. [2a02:3100:afd7:9a00:94ac:542a:1cd2:c9ce]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5c937153a6asm2232626a12.49.2024.10.11.13.04.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Oct 2024 13:04:32 -0700 (PDT) Message-ID: <1ac2be2d-df4f-455a-900d-821fc7bd12c4@gmail.com> Date: Fri, 11 Oct 2024 22:04:31 +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/8] hwmon: nzxt-kraken2: Simplify specifying static visibility attribute From: Heiner Kallweit To: Jean Delvare , Guenter Roeck , Jonas Malaco Cc: "linux-hwmon@vger.kernel.org" References: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@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+V3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Y8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com> Use new member visible of struct hwmon_ops to simplify specifying the static attribute visibility. Signed-off-by: Heiner Kallweit Acked-by: Jonas Malaco --- 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 ed38645a1..034698232 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, + .visible = 0444, .read = kraken2_read, .read_string = kraken2_read_string, };