From patchwork Fri Jan 18 14:03:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10770317 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 449051390 for ; Fri, 18 Jan 2019 14:04:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31D1C288F6 for ; Fri, 18 Jan 2019 14:04:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2652828DA4; Fri, 18 Jan 2019 14:04:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C11DD288F6 for ; Fri, 18 Jan 2019 14:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727469AbfARODj (ORCPT ); Fri, 18 Jan 2019 09:03:39 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51449 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727285AbfARODj (ORCPT ); Fri, 18 Jan 2019 09:03:39 -0500 Received: by mail-wm1-f65.google.com with SMTP id b11so4618190wmj.1; Fri, 18 Jan 2019 06:03:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sEQntTSMSzloJbJKItQL/Y0eCsx+0HRyKgqFsac2X4A=; b=cPe1W2ukeE/BxfcSLkU4cf2uNzCL4X2WMZ6EcEj/Q8GTgGYMJf8XxHolt76sPRzxsN gkVeLuJi3fsmr3N0pcCcnUi1zl0xlVcQytXZJjcfkmB6BVUfytc3x+Df9jb4ikgcYsBZ rTW1zsNY5Faq9hvvQIWR8pFJu43sLi5zXu0wi1tb1xYtaS+GvPBsh0t8XxgVqOpJYukK dkiYAFWmSVTFeZ8MsLooULG2ogeLquVjU595O6zag6IXUItjouX9A3eOTpXulR62FRVi Xtnh4Hydt5lfgqMNwXUwJgm4b0fk9NE7k4aPYfSS8wB4bQAiZ6qz3fhyBg6OWkS4Us0L sCIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sEQntTSMSzloJbJKItQL/Y0eCsx+0HRyKgqFsac2X4A=; b=K+ZC1Yzq7vLO0w1wflGlw9xwfym9eOX/KyGB+frptYPTKVhcInvM0gKUoHivIiCj0t tJQ3Z1ZvPfm3eu8E7Zc+CBNtKmOOvAgGlsyiHhGhK2ifwe6xLLZuS3BzooPbW/dzMNqq 1D9TfLxECvbQt9DR/uFGdoPBiKmE2HToSdluN37YhkhQelmZaLUNhEBiReG8CrkrfQWl yEmFhqAURFlgU+W7bzcDK+3us+Jw6y258NnfB1O++kNNDV83wNbvpIwaBG/sx/xbDpGz WKa3WXDWjr9xIeRpN5zVFG/1N/4lzSrZ4pDPvTL1jeTmwxlZjqZETUZL9TdLSlbhDrGA v9HA== X-Gm-Message-State: AJcUukfowuAeHchoXkX4ONcfmdeZho5enUvNMXOEjBDF/Bw+yO2/6gYS pIWvin6UIBxdWQsFJ0wdOAM= X-Google-Smtp-Source: ALg8bN6CBfjl98Yk5c5w8yTwqnQVs4NK7yvhHiHIWNK4Esfs2hBofypR91EnZNxQUEbEFm91/bCGYw== X-Received: by 2002:a1c:4108:: with SMTP id o8mr15369849wma.91.1547820217059; Fri, 18 Jan 2019 06:03:37 -0800 (PST) Received: from Red.local ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id g197sm8464676wmd.29.2019.01.18.06.03.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 06:03:36 -0800 (PST) From: Corentin Labbe To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 1/7] hwmon: adm1029: Remove write to FFF paragraph Date: Fri, 18 Jan 2019 15:03:23 +0100 Message-Id: <20190118140329.18970-2-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190118140329.18970-1-clabbe.montjoie@gmail.com> References: <20190118140329.18970-1-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As suggested by checkpatch, remove the "write to FFF" paragraph. Signed-off-by: Corentin Labbe --- drivers/hwmon/adm1029.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index 8c5cdb560258..3dd4c84ec89e 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -19,10 +19,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include From patchwork Fri Jan 18 14:03:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10770315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F3376C5 for ; Fri, 18 Jan 2019 14:04:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DC4F288F6 for ; Fri, 18 Jan 2019 14:04:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 521C728D51; Fri, 18 Jan 2019 14:04:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EDD8288F6 for ; Fri, 18 Jan 2019 14:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727481AbfAROEK (ORCPT ); Fri, 18 Jan 2019 09:04:10 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40597 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727080AbfARODk (ORCPT ); Fri, 18 Jan 2019 09:03:40 -0500 Received: by mail-wr1-f65.google.com with SMTP id p4so15192884wrt.7; Fri, 18 Jan 2019 06:03:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IrXf9aiRakHb+ciyKcO/4OLDAyZp5iDcsk5OFIZkBaA=; b=BME3C63u5T7m0M4cxqVV4yvUDQDw8S1K8PHbxgke2dvfTWiaAkUKTHMIYaVi60qHZj SJps5ddXj2o/c2XDeaVGfQ+lNx4WFZmRJ2WPJAU6zrtFVCRReMwtGkYCNyusrnwa72Hn fZ9VXB+QvsClBSc+7KDn4O1O9lpwfJ+Ja5kZuJKbIuUf0FEyNDp7wUXUfPetEObSlWa7 TkTIcfzHDpl6Rdwylfkt9mnVIiuGH9YyVeR1KubQNFmBziNRGLTn34z0C7/2NzOAFgsP eiHw8NezVL6UebwUD0AS/hKrEVZ0G0VZUAm2rC0dst9Al0EibBBRb3BGfpXW1ux5tfz9 85lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IrXf9aiRakHb+ciyKcO/4OLDAyZp5iDcsk5OFIZkBaA=; b=dNUVqqCttxqSf+OSVFEZEiefLMOWMRRTghEo7hgOS9i/+X4bJkg4RIWA6jypNGiv0D uHQ1sQZXbb+ZIJ5mDuSTrW3amA6UDPuHSMqKOZPXpQZX4GsXwRvsaJWoR+WNMXv7GgE8 AE2j/eaPUpe/B9b1GaP17KbRAREuYrZRFNyJ2VZI7JncVhy/HKzC6I+94FyZMM4Htd+H 5ZOR/WFtwPua5MhTNj15AviliufxoXgINy8AWXOf9ocBHDXaVYsuNuQLi87Zdrdd7Ul9 rn3Iux4JXGD4PbsCIgqmjIP54F2vj34bnBVECrq/M/shTlDnBTRBePPkGu4JwjjoCadR yd6w== X-Gm-Message-State: AJcUukc1WdXhDe70S5VPa3/ztfRDjA9i0tdp7yTZRmMVqvWpC1JrK+BG k7QeiTe9ealpNlcaOmsBgwE= X-Google-Smtp-Source: ALg8bN4Ibfx1SpkQFYRPqhuitnopJ4YSpYZl0vWwqxLVq0Ek3uBVrusTSd9ilf3e3+WbdO9BxO2qFA== X-Received: by 2002:adf:ecc8:: with SMTP id s8mr16283513wro.208.1547820218147; Fri, 18 Jan 2019 06:03:38 -0800 (PST) Received: from Red.local ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id g197sm8464676wmd.29.2019.01.18.06.03.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 06:03:37 -0800 (PST) From: Corentin Labbe To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 2/7] hwmon: adm1029: Add SPDX header Date: Fri, 18 Jan 2019 15:03:24 +0100 Message-Id: <20190118140329.18970-3-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190118140329.18970-1-clabbe.montjoie@gmail.com> References: <20190118140329.18970-1-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch addes SPDX header to adm1029 Signed-off-by: Corentin Labbe --- drivers/hwmon/adm1029.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index 3dd4c84ec89e..381bfae6b04b 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * adm1029.c - Part of lm_sensors, Linux kernel modules for hardware monitoring * From patchwork Fri Jan 18 14:03:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10770313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D89981390 for ; Fri, 18 Jan 2019 14:04:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C77D2288F6 for ; Fri, 18 Jan 2019 14:04:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBA2428D51; Fri, 18 Jan 2019 14:04:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F040288F6 for ; Fri, 18 Jan 2019 14:04:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727324AbfAROEE (ORCPT ); Fri, 18 Jan 2019 09:04:04 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33839 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727489AbfARODl (ORCPT ); Fri, 18 Jan 2019 09:03:41 -0500 Received: by mail-wr1-f67.google.com with SMTP id j2so15273423wrw.1; Fri, 18 Jan 2019 06:03:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NUYEzC/vmFZgItCQvOymRNmQxHG9/z8q+s/lyY68E14=; b=Wt/puWrCW+zAnEqKzUdMLeqWq0K7shRYilkopyRSSqaUG4WD0389NBCYrRjlDfcCo8 PunE6m8ZlvUeBnF6nYo8Y5cS7V0VHtsuYwi4o2vDXMfGUOMSePuM9Im5A2lcvELb8THQ x9W+9nDjRv8wyh1+o+4To17CF6RfbuY5F4LAh4j4Y39KzEh1YeqIZ9VO7a4tsrdKj4LK uRq04YKa2g4+PNv26eOsPVXlREjV++skVvTRKKEnZynNPQPVbRntE/vFgq9GcVTy8CSo 4GrIxdLRy+ZZn0Qhp0A2YHI0gBUDkUeUUBId5BkHlFfHTC7wz7B/qT3I5Uj+ttCdetNk k6rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NUYEzC/vmFZgItCQvOymRNmQxHG9/z8q+s/lyY68E14=; b=d2y+qJ4NM71TDbHG0KGcFmAJgeddQpxsAfg86rhf4MUi/JSz3QZa8GmOHlS4OUZvz5 8sJs2Quvoj3IqfqUTdBC/Wffsb2Co3HmwEd27jiRlummW7eVrawr76vOibkCEVTpx7Ic oOOGbPISSI3uy9/w/uEqnCDtbxxGMsWBfHjZKNX6gPX7Xdp8o96nD6FJcS1MgvUv+i+N 7k5OSRS37nqmUQZoDgBgtwxw9IreNhF7AdQJXvc7Wg1B8Ru3VM/OM1WkKFrO/6kutQuc ogsJidUEd6+t4Oe/5nCIuW95ahlfQYmtmmNz3/DKHJzAnKcv5nnO3OEgGXutDcxMDZXT /o8Q== X-Gm-Message-State: AJcUukfZ0PP/BmPDLW6dXI8KMBZDASjwFh6T08n8tgdjG/bFYEk+kXoG pf3nNVr+EZYLLkfsJw2YM4c= X-Google-Smtp-Source: ALg8bN7H25nEZBKyEMbp24Ela+aOF+2ayivG3+FpXe7s5pVbXj8dKkkOzdlhrQFax49TKGoc+F7eqw== X-Received: by 2002:adf:b201:: with SMTP id u1mr16428812wra.165.1547820219274; Fri, 18 Jan 2019 06:03:39 -0800 (PST) Received: from Red.local ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id g197sm8464676wmd.29.2019.01.18.06.03.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 06:03:38 -0800 (PST) From: Corentin Labbe To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 3/7] hwmon: adm1029: replace S_IXXX macros by their numeric values Date: Fri, 18 Jan 2019 15:03:25 +0100 Message-Id: <20190118140329.18970-4-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190118140329.18970-1-clabbe.montjoie@gmail.com> References: <20190118140329.18970-1-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As requested by checkpatch, this patch replace S_IXXX macros by their numeric values. Signed-off-by: Corentin Labbe --- drivers/hwmon/adm1029.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index 381bfae6b04b..092f16ad774f 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -250,32 +250,27 @@ static ssize_t set_fan_div(struct device *dev, return count; } -/* - * Access rights on sysfs. S_IRUGO: Is Readable by User, Group and Others - * S_IWUSR: Is Writable by User. - */ -static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL, 0); -static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, show_temp, NULL, 1); -static SENSOR_DEVICE_ATTR(temp3_input, S_IRUGO, show_temp, NULL, 2); +/* Access rights on sysfs. */ +static SENSOR_DEVICE_ATTR(temp1_input, 0444, show_temp, NULL, 0); +static SENSOR_DEVICE_ATTR(temp2_input, 0444, show_temp, NULL, 1); +static SENSOR_DEVICE_ATTR(temp3_input, 0444, show_temp, NULL, 2); -static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, show_temp, NULL, 3); -static SENSOR_DEVICE_ATTR(temp2_max, S_IRUGO, show_temp, NULL, 4); -static SENSOR_DEVICE_ATTR(temp3_max, S_IRUGO, show_temp, NULL, 5); +static SENSOR_DEVICE_ATTR(temp1_max, 0444, show_temp, NULL, 3); +static SENSOR_DEVICE_ATTR(temp2_max, 0444, show_temp, NULL, 4); +static SENSOR_DEVICE_ATTR(temp3_max, 0444, show_temp, NULL, 5); -static SENSOR_DEVICE_ATTR(temp1_min, S_IRUGO, show_temp, NULL, 6); -static SENSOR_DEVICE_ATTR(temp2_min, S_IRUGO, show_temp, NULL, 7); -static SENSOR_DEVICE_ATTR(temp3_min, S_IRUGO, show_temp, NULL, 8); +static SENSOR_DEVICE_ATTR(temp1_min, 0444, show_temp, NULL, 6); +static SENSOR_DEVICE_ATTR(temp2_min, 0444, show_temp, NULL, 7); +static SENSOR_DEVICE_ATTR(temp3_min, 0444, show_temp, NULL, 8); -static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0); -static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1); +static SENSOR_DEVICE_ATTR(fan1_input, 0444, show_fan, NULL, 0); +static SENSOR_DEVICE_ATTR(fan2_input, 0444, show_fan, NULL, 1); -static SENSOR_DEVICE_ATTR(fan1_min, S_IRUGO, show_fan, NULL, 2); -static SENSOR_DEVICE_ATTR(fan2_min, S_IRUGO, show_fan, NULL, 3); +static SENSOR_DEVICE_ATTR(fan1_min, 0444, show_fan, NULL, 2); +static SENSOR_DEVICE_ATTR(fan2_min, 0444, show_fan, NULL, 3); -static SENSOR_DEVICE_ATTR(fan1_div, S_IRUGO | S_IWUSR, - show_fan_div, set_fan_div, 0); -static SENSOR_DEVICE_ATTR(fan2_div, S_IRUGO | S_IWUSR, - show_fan_div, set_fan_div, 1); +static SENSOR_DEVICE_ATTR(fan1_div, 0644, show_fan_div, set_fan_div, 0); +static SENSOR_DEVICE_ATTR(fan2_div, 0644, show_fan_div, set_fan_div, 1); static struct attribute *adm1029_attrs[] = { &sensor_dev_attr_temp1_input.dev_attr.attr, From patchwork Fri Jan 18 14:03:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10770305 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 28F681390 for ; Fri, 18 Jan 2019 14:03:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 183872E5D2 for ; Fri, 18 Jan 2019 14:03:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BAC92E694; Fri, 18 Jan 2019 14:03:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADB012E5D2 for ; Fri, 18 Jan 2019 14:03:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727481AbfARODo (ORCPT ); Fri, 18 Jan 2019 09:03:44 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41876 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727524AbfARODm (ORCPT ); Fri, 18 Jan 2019 09:03:42 -0500 Received: by mail-wr1-f65.google.com with SMTP id x10so15157635wrs.8; Fri, 18 Jan 2019 06:03:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vCzxSPy+FzZRjZn8HTA+OyQdWgf2KeAGuCfMKZTF/eE=; b=Dn5D22rdXlUC6LOdZ47CDE0REV4rkFHQYoewqEmLB5+xhG3c/URKIKSJeBu2IrTuhZ uWGsEmlBX/4jOxv/GYapduBe89+uM5VBcoGsr+icLa91eG9bxHq2Kt0WqazBmNkKZG3a NpeoGd4cycMby8azEw0+RWujKsZlXSo/YGyv4JOHV4SdyT32hJBRoc8Vk0wASWPWjyEv 0c8eyWfVuVgX+Twq5CltUZ3D3ztJ1aclyxYiKos7VTCbm/9+vQ2agPQHf22nwtCFxkg4 DZdSuJn9/W9OBEOKXbsGPlnDCqHM2+nUS1XTMOTE8zW5tOEHHSgl7zUy5GDXFlR8QivK PoVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vCzxSPy+FzZRjZn8HTA+OyQdWgf2KeAGuCfMKZTF/eE=; b=oi6ClTGrucA08grSGXY9Kq7nMklHcjKGkQPQcV/VxaIgkmJQPys8+9Z9946gPghBMr ld4T/3NFDABqBFmCs3zyFq88fyWt0sAfc6jsqWEgNpOnYk9heVGnlL77AwB6VokVK8K/ iDRv0FZDWL5M0ToTV5/UhoWlyxVl5etcxQQMXRwSPv3a0wMsNR1iRT90z1zYykAB20S2 xvtS1I2muxZ9Ay+KKDPHyMfrOj/h9Hob3jngP9ihEQHuIUAGbfTC+HaUghssjoOYID6/ 25tU1OLG53A51hIfNsnuYAUTsa8Cs8VxTK4RO1DnODlm3qQ64lVx2Xb2BBQLaN0ESFej DCCQ== X-Gm-Message-State: AJcUukfPfMtkgigThelCLRpKjhjYrhaVVSiJJ4cG8Nv14OwEaSkR6Gz0 20PA7S46SOuUea62nrEE900= X-Google-Smtp-Source: ALg8bN4U3nqZAn5zFGzeXhSPpMnuC3pPR08rqSo/CW4odgYwwnO+fxSiLg5fsj2KmPUmc2ZGvu5qVQ== X-Received: by 2002:a5d:6152:: with SMTP id y18mr17624308wrt.141.1547820220427; Fri, 18 Jan 2019 06:03:40 -0800 (PST) Received: from Red.local ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id g197sm8464676wmd.29.2019.01.18.06.03.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 06:03:39 -0800 (PST) From: Corentin Labbe To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 4/7] hwmon: adm1029: Add blank line after declarations Date: Fri, 18 Jan 2019 15:03:26 +0100 Message-Id: <20190118140329.18970-5-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190118140329.18970-1-clabbe.montjoie@gmail.com> References: <20190118140329.18970-1-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As requested by checkpatch, this patch adds a blank line after declarations Signed-off-by: Corentin Labbe --- drivers/hwmon/adm1029.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index 092f16ad774f..f9f4f1f4a4c7 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -171,6 +171,7 @@ show_temp(struct device *dev, struct device_attribute *devattr, char *buf) { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct adm1029_data *data = adm1029_update_device(dev); + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[attr->index])); } @@ -180,6 +181,7 @@ show_fan(struct device *dev, struct device_attribute *devattr, char *buf) struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct adm1029_data *data = adm1029_update_device(dev); u16 val; + if (data->fan[attr->index] == 0 || (data->fan_div[attr->index] & 0xC0) == 0 || data->fan[attr->index] == 255) { @@ -196,6 +198,7 @@ show_fan_div(struct device *dev, struct device_attribute *devattr, char *buf) { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct adm1029_data *data = adm1029_update_device(dev); + if ((data->fan_div[attr->index] & 0xC0) == 0) return sprintf(buf, "0\n"); return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); @@ -210,6 +213,7 @@ static ssize_t set_fan_div(struct device *dev, u8 reg; long val; int ret = kstrtol(buf, 10, &val); + if (ret < 0) return ret; From patchwork Fri Jan 18 14:03:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10770311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE7031390 for ; Fri, 18 Jan 2019 14:04:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC89A288F6 for ; Fri, 18 Jan 2019 14:04:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B094C28D51; Fri, 18 Jan 2019 14:04:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A9A0288F6 for ; Fri, 18 Jan 2019 14:04:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727562AbfARODo (ORCPT ); Fri, 18 Jan 2019 09:03:44 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:50281 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727285AbfARODn (ORCPT ); Fri, 18 Jan 2019 09:03:43 -0500 Received: by mail-wm1-f68.google.com with SMTP id n190so4631504wmd.0; Fri, 18 Jan 2019 06:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=52hWXrVesE9hsYVcvtF6fWpIkVgqCxxIYdkUhzqrpz8=; b=EooudYQjYAyQVnH01dtyFpFmvjNbyz5EvGFVvYLY2VvATnvqjEY01XCZ1/PHkmq60T QUJOoHTJt1i2OPCZY1HELOGT1zMHL8Rq7uJO04W60uPo8soxOXurj27qP/ft7/xOsCVK 2m33r5yQfb2cisVOxJeAdyQG01mF9iaollNmF2ZTNFpGMAzxv0DAacaUI1Hl3yjYYT9P 5teW7gk/TBZevv7h6mPHeukCTwj0aUTQYxIX3BK54iJ8ufSlmLpjVOjp9jPO5yEtsvYo KKnPEcRiwNllQygPHuJRja4IHRRqNcvYowloif1boMaajzcx7WW82vGu/g56RH1Ed4Ej JxYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=52hWXrVesE9hsYVcvtF6fWpIkVgqCxxIYdkUhzqrpz8=; b=fq1frvln0LetXNV/1pqR/Gf71CTLy1+UAWBg/TXTmUoKVw9Nlx9xp85kwK/dMXxaFr cMxLYMMKv/K5sQvfdIw8+HgCaOJ7GUw1lF1yqcnotU+O2PRiWJSejHBQp9hJ6GfRiF+k 77CQ9ODvBTrSqMQsCpRv23xxXGzHmZ00PL5traKFewtYCsDXAWPPUaeKbSJr8/EfDGV5 cU3vtFyYuisQ67PA+mEsRyF27lZF+e1EfRR1w8PL3L+YLNFxSb2DhTp0q/kpTdI0a1tr xCW/IKjzSb9tjx1aD4EWRZAnprtIl3noOfBMugpUwibHUf69YZuvTSYsaCimwDAsNTG2 f/+Q== X-Gm-Message-State: AJcUukf8zTV9nvc60Q8ZuSh0alZr4tzrr1aVFdMvZlphEAcSWREAkzCa PUV9Ky1+RY1kAQggO4F0FwM= X-Google-Smtp-Source: ALg8bN4ZpocWfDxw4K8mJso8mLxXVLfgDK3T6BJUwS3dX+JelgVMkM1ikufi55+U9o4Fbgn1Vzrzig== X-Received: by 2002:a1c:f319:: with SMTP id q25mr15832227wmq.151.1547820221550; Fri, 18 Jan 2019 06:03:41 -0800 (PST) Received: from Red.local ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id g197sm8464676wmd.29.2019.01.18.06.03.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 06:03:41 -0800 (PST) From: Corentin Labbe To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 5/7] hwmon: adm1029: Fix Logical continuations should be on the previous line checkpatch warning Date: Fri, 18 Jan 2019 15:03:27 +0100 Message-Id: <20190118140329.18970-6-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190118140329.18970-1-clabbe.montjoie@gmail.com> References: <20190118140329.18970-1-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patchs fix the "Logical continuations should be on the previous line" checkpatch warning. Signed-off-by: Corentin Labbe --- drivers/hwmon/adm1029.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index f9f4f1f4a4c7..4339f6b864a1 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -131,8 +131,7 @@ static struct adm1029_data *adm1029_update_device(struct device *dev) * Use the "cache" Luke, don't recheck values * if there are already checked not a long time later */ - if (time_after(jiffies, data->last_updated + HZ * 2) - || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { int nr; dev_dbg(&client->dev, "Updating adm1029 data\n"); @@ -182,9 +181,9 @@ show_fan(struct device *dev, struct device_attribute *devattr, char *buf) struct adm1029_data *data = adm1029_update_device(dev); u16 val; - if (data->fan[attr->index] == 0 - || (data->fan_div[attr->index] & 0xC0) == 0 - || data->fan[attr->index] == 255) { + if (data->fan[attr->index] == 0 || + (data->fan_div[attr->index] & 0xC0) == 0 || + data->fan[attr->index] == 255) { return sprintf(buf, "0\n"); } @@ -325,8 +324,8 @@ static int adm1029_detect(struct i2c_client *client, nb_fan_support = i2c_smbus_read_byte_data(client, ADM1029_REG_NB_FAN_SUPPORT); /* 0x41 is Analog Devices */ - if (man_id != 0x41 || (temp_devices_installed & 0xf9) != 0x01 - || nb_fan_support != 0x03) + if (man_id != 0x41 || (temp_devices_installed & 0xf9) != 0x01 || + nb_fan_support != 0x03) return -ENODEV; if ((chip_id & 0xF0) != 0x00) { From patchwork Fri Jan 18 14:03:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10770307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F4476C5 for ; Fri, 18 Jan 2019 14:03:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78A75288F6 for ; Fri, 18 Jan 2019 14:03:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68C7028D51; Fri, 18 Jan 2019 14:03:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A723288F6 for ; Fri, 18 Jan 2019 14:03:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727622AbfARODp (ORCPT ); Fri, 18 Jan 2019 09:03:45 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51462 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727553AbfARODp (ORCPT ); Fri, 18 Jan 2019 09:03:45 -0500 Received: by mail-wm1-f68.google.com with SMTP id b11so4618462wmj.1; Fri, 18 Jan 2019 06:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w7Ai0hltg2jalPdM8DZ6LIbqR1s61sezTuxMf4F3h7I=; b=VFTqonkvdFADx/zms1yRuBIFRbi79hFhXVsaEYJbVAkJWYqlTgDLYefVjgziLNb0P8 w1Ngu+7kXmZOoh//mKJQjG16H7DsWZwj2kbsCP6o9U8l9dCzwFzNt1Po4QaShTYja1bg lKJjHw/93AjrUTgdLb3+plwvo1qv3l2RsaSSbzYhnS5KYs5SVlc23D8CSbzyiQPRMsZ9 kOHI5oT5kyIoZfGG56NMDuhJEhbdSswcm4ZTWtIPFrOcP1TBidNYhDANZJbG0YsfR0rn TrS2V5pnK3EFGIGQR/hydt4IyO6SaKQjT6aVV5IlHMXX/T/TMylS4rTB8pD8FHUfMy7g y/ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w7Ai0hltg2jalPdM8DZ6LIbqR1s61sezTuxMf4F3h7I=; b=rJviwlOVK5SCunIMniwKZpQSaPiGhbOJcYKf78HpzkR4vKXYT1e8VYy4+I1msda/xk WXtV5buTlrdLYa32AhYs8gX6GDeSK/NoK7udK5Zv9apQxpl+kMXeV8jd9dX0K83hqk+e BosWVkclbio4fCjQniZHKR7a3N+hPG1KCckdcnjHB2Dw1CF7RqOdnRDj/qlL3juuxoWo pef8c/iq3F9xTk4Tvo34k9t9e4+kDMjiG3cpMfQuZoqrMVdeZkilw627X1dTXT1/xDwq uNgK4Kk5GF3D+DGHCCqjc7XRZ25Q7zP6oV7HdTQbWPLO95ErfDzBbYmi7cYtznCPAVN4 MY/Q== X-Gm-Message-State: AJcUukfcAJn/mJuOc3hKnxwhZI8e0j4RQ15gfJCi1eV7qv6VeOvOQ2Xu XH+j7mVNhkC15qxjDSPgMps= X-Google-Smtp-Source: ALg8bN61yhfhaVfJZB5OHdnPNJtooAJF3HS3D61o39/mudIqtH5joxBW5n45rul7F23Wn10eDdFLpg== X-Received: by 2002:a1c:8548:: with SMTP id h69mr14987483wmd.11.1547820222613; Fri, 18 Jan 2019 06:03:42 -0800 (PST) Received: from Red.local ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id g197sm8464676wmd.29.2019.01.18.06.03.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 06:03:42 -0800 (PST) From: Corentin Labbe To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 6/7] hwmon: adm1029: Fix function alignment Date: Fri, 18 Jan 2019 15:03:28 +0100 Message-Id: <20190118140329.18970-7-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190118140329.18970-1-clabbe.montjoie@gmail.com> References: <20190118140329.18970-1-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fix the "Alignment should match open parenthesis" checkpatch warning. Signed-off-by: Corentin Labbe --- drivers/hwmon/adm1029.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index 4339f6b864a1..e9fe4fc3489e 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -203,8 +203,8 @@ show_fan_div(struct device *dev, struct device_attribute *devattr, char *buf) return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[attr->index])); } -static ssize_t set_fan_div(struct device *dev, - struct device_attribute *devattr, const char *buf, size_t count) +static ssize_t set_fan_div(struct device *dev, struct device_attribute *devattr, + const char *buf, size_t count) { struct adm1029_data *data = dev_get_drvdata(dev); struct i2c_client *client = data->client; @@ -322,7 +322,7 @@ static int adm1029_detect(struct i2c_client *client, temp_devices_installed = i2c_smbus_read_byte_data(client, ADM1029_REG_TEMP_DEVICES_INSTALLED); nb_fan_support = i2c_smbus_read_byte_data(client, - ADM1029_REG_NB_FAN_SUPPORT); + ADM1029_REG_NB_FAN_SUPPORT); /* 0x41 is Analog Devices */ if (man_id != 0x41 || (temp_devices_installed & 0xf9) != 0x01 || nb_fan_support != 0x03) From patchwork Fri Jan 18 14:03:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10770309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B51E6C5 for ; Fri, 18 Jan 2019 14:03:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0955B288F6 for ; Fri, 18 Jan 2019 14:03:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED67C28D51; Fri, 18 Jan 2019 14:03:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A50B2288F6 for ; Fri, 18 Jan 2019 14:03:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727661AbfARODx (ORCPT ); Fri, 18 Jan 2019 09:03:53 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38132 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727556AbfARODp (ORCPT ); Fri, 18 Jan 2019 09:03:45 -0500 Received: by mail-wr1-f66.google.com with SMTP id v13so15211677wrw.5; Fri, 18 Jan 2019 06:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k2UWdEyGVqVyvqUQDZYk9f7eNmmGxd41TJ57on6Onws=; b=CdrdLCFs59tIk6shFskgU3fq/ZOkzyqz8UdY3d2jlho/svBXcx0oyfoja5LsYTisFs kdK3n7+mb9xhLjEWFyPGShjHJxS2fCw4ZJD+wGh7Lub5A2RunIXitqwp8hpcw8/3PSPN cYgb8WUS2HeOflTiG9uVYdRj66FBLVBBrEI+98MgEhNEJuQSSlqawH/FgrK4H4CbFcrz KM//nenqpZNAR3ObsPYTdmyFymD7+fupMZ5f0qYIOjhXNrL6yxJo2DBDnsiqxYhsczFj f1JIoTPATVIM7V87nw/tlhXvFNIWPOvpjP9LNjXKYuGtwsA07A9V4xHIsGnO5Wd5vJTl Fj1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k2UWdEyGVqVyvqUQDZYk9f7eNmmGxd41TJ57on6Onws=; b=eDbVKhCeHDoNN6lBMNGkRVJzLJuHxFR4FReFUVmh8gf0aL9Ydd8Z+/j9VY3VpKpRNN Pioex8eqzU2FGnwJnQE/QP0k8yqPrQHlNsKtjxl5EU08zefANxZ0t0JKYIiPsRTuGkzu z2WdynC4+7cZBWKC46FLPjSV4xC9lHUrC8akNLK4W71E9J1ofUyxUEDhLhB2q2yNurhT IJ6UrM6OYYjiUCsNRFIDDjEdWj6u+wBX3QlFdKF4OuidAoS1veVhe7WdjKAww0qlvqts QmfRxJknGzKCyvd4WVVor2GunbQP7m9V/TKd04rPR/XhJQ+Dihp2/Y6MSLznqJM3HsaO LhlA== X-Gm-Message-State: AJcUukc1LfgZHXJB21gqYUkrym8KuPPGZZezquVeSEJhzAy2ooIwpRnC ddH1H1qvyBqUFjyV8v28oZE= X-Google-Smtp-Source: ALg8bN7XJCF11PJwLQRA1J01hPvVewwFu+RcGUTSTv0rDKFm86Fm8nokV7AMqHmFnv+g/5ofV21knQ== X-Received: by 2002:adf:b307:: with SMTP id j7mr17625353wrd.46.1547820223662; Fri, 18 Jan 2019 06:03:43 -0800 (PST) Received: from Red.local ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id g197sm8464676wmd.29.2019.01.18.06.03.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 06:03:43 -0800 (PST) From: Corentin Labbe To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 7/7] hwmon: adm1029: Add a comment for locking mutex Date: Fri, 18 Jan 2019 15:03:29 +0100 Message-Id: <20190118140329.18970-8-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190118140329.18970-1-clabbe.montjoie@gmail.com> References: <20190118140329.18970-1-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Checkpatch complains that mutex does not have any comment. This patch fix that. Signed-off-by: Corentin Labbe --- drivers/hwmon/adm1029.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index e9fe4fc3489e..e561279aea21 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -108,7 +108,7 @@ static const u8 ADM1029_REG_FAN_DIV[] = { struct adm1029_data { struct i2c_client *client; - struct mutex update_lock; + struct mutex update_lock; /* protect register access */ char valid; /* zero until following fields are valid */ unsigned long last_updated; /* in jiffies */