From patchwork Thu Nov 12 09:57:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11899511 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F6F2921 for ; Thu, 12 Nov 2020 09:57:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 14262221FE for ; Thu, 12 Nov 2020 09:57:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bcdviuqN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727702AbgKLJ5W (ORCPT ); Thu, 12 Nov 2020 04:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726671AbgKLJ5V (ORCPT ); Thu, 12 Nov 2020 04:57:21 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAF28C0613D6 for ; Thu, 12 Nov 2020 01:57:20 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id h2so4733692wmm.0 for ; Thu, 12 Nov 2020 01:57:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yQkw2l9WIpkjYhKP7Ul2HuGuzOBTh63oL9grzgjK3CQ=; b=bcdviuqNSoOpm26doGhfbZW/J0FexDO8vOQFu7IWvGhijr7A8u/sPf4yBz6G5YiI8/ 6aTv7L3ClS2xuaXAsY0DOqQoIazieic2n99F8+j9ilpSKk7v5cpwI8/fG7yqnKA24x4D DDWg32nUnf3syXxMho4jlWnvBvGVEIe++06+6/CgScMkH/UkslPVucVVyCGTeEKIEnMh r8i7rHwEqz7bdohi9sIpIPSmNNfKVyNw2gKygfM9pMQPSGQKAdYKihwFb0oaoynZBCul 4Loctrxsw4UvrekgGLLjiUPjTR6R0Vr2mVddTXWJyZK0Q9Xrk5MBRUlDKr1nyBFVMXyt yhcA== 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=yQkw2l9WIpkjYhKP7Ul2HuGuzOBTh63oL9grzgjK3CQ=; b=Eqc5MMPF3JA+BY9duTIFHB4hgKOXFUfwy6vndPW4ejpApv63UA/OqfEZnwGBYN15pV QTV2BuagQdlXjdK54iWgdt7O69VHpDwwwHCjlbN8SVyPlOX5t2nQnAWV5SgAdd3nPp9d PAi3jawuMBk1izL/Hqh1rfjdgXcf0KrrD42AsZM/RPXR2lDysxEXmM7pFURkOzUoid34 zSsWmgwOGtXRwHo0O4vTUYUAOSpeZMxzJ8oOathL38TNv7AfMdbwRFC+RoG7D90wM9/L fOThiwZlY8phPPnqpT99cEyTA+issS3hTlJbqMCTJ/wFQ8ShoDHSAYMhhjDFeE7FmLOC z8gw== X-Gm-Message-State: AOAM531lh1/F5eHlkkzRdPbh9fAxZC71TAt+Fb3LrhgoGf5fDsE/w/io yqjeBkmkjAsGMq2GU9FJ2uhVTQ== X-Google-Smtp-Source: ABdhPJxoLAGJ14e0h61QfThiqt5zvB6EWwk8u8Mxfn0uS/id1tAexeu96ZnmI6IHXqr8oGCebTjY5A== X-Received: by 2002:a7b:c77a:: with SMTP id x26mr8804584wmk.63.1605175039365; Thu, 12 Nov 2020 01:57:19 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id n15sm6138792wrq.48.2020.11.12.01.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 01:57:18 -0800 (PST) From: Lee Jones To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, Lee Jones , Beniamin Bia , Michael Hennerich Subject: [PATCH 1/3] hwmon: adm1177: Fix kerneldoc attribute formatting Date: Thu, 12 Nov 2020 09:57:13 +0000 Message-Id: <20201112095715.1993117-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201112095715.1993117-1-lee.jones@linaro.org> References: <20201112095715.1993117-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Kerneldoc expects attributes/parameters to be in '@*.: ' format. Also fix repeated word "the the". Fixes the following W=1 kernel build warning(s): drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'client' not described in 'adm1177_state' drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'reg' not described in 'adm1177_state' drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'r_sense_uohm' not described in 'adm1177_state' drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'alert_threshold_ua' not described in 'adm1177_state' drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'vrange_high' not described in 'adm1177_state' Cc: Beniamin Bia Cc: Michael Hennerich Signed-off-by: Lee Jones --- drivers/hwmon/adm1177.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwmon/adm1177.c b/drivers/hwmon/adm1177.c index 6e8bb661894b9..0c5dbc5e33b46 100644 --- a/drivers/hwmon/adm1177.c +++ b/drivers/hwmon/adm1177.c @@ -25,11 +25,11 @@ /** * struct adm1177_state - driver instance specific data - * @client pointer to i2c client - * @reg regulator info for the the power supply of the device - * @r_sense_uohm current sense resistor value - * @alert_threshold_ua current limit for shutdown - * @vrange_high internal voltage divider + * @client: pointer to i2c client + * @reg: regulator info for the power supply of the device + * @r_sense_uohm: current sense resistor value + * @alert_threshold_ua: current limit for shutdown + * @vrange_high: internal voltage divider */ struct adm1177_state { struct i2c_client *client; From patchwork Thu Nov 12 09:57:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11899513 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C8C3138B for ; Thu, 12 Nov 2020 09:57:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6273B2222B for ; Thu, 12 Nov 2020 09:57:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HozFs56g" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727803AbgKLJ5Y (ORCPT ); Thu, 12 Nov 2020 04:57:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727707AbgKLJ5W (ORCPT ); Thu, 12 Nov 2020 04:57:22 -0500 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACF32C0617A7 for ; Thu, 12 Nov 2020 01:57:21 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id a3so4886318wmb.5 for ; Thu, 12 Nov 2020 01:57:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g6ib08VylLIp887er2WbX87dWDQQ8h8dYFMZ3eQ9PN0=; b=HozFs56gVtlvUaDwoQA81mhz9YzNKLovfrSxS1XWtah2rX6VfmUp1ZUWTMRla3xD2i Pw+gxhVyl9GlrbPDxC8stpfmdY7uoFYVCm4L591Fd+IXg94+wgowahNcONoxko73NRHV D6BR89TsbqbJBhCGAzq0t5rAQcS8KWc8zO+x6EGhZbz9vdzcNG1d0Cl1EfODQ5i/+6I7 kf8gIi3UYKhYCg6Ry+0Br9F4ej/cyswIMqHHYtfwI5CY4jdAvx0GgCrP3gXaiyZoOIWi bJ/JS80piWvCAGfgHlaNH6J7PmlnZyS+OKbZENwc0LyWMoIxlYDK4MIRt8rXhIZ522oM bjaQ== 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=g6ib08VylLIp887er2WbX87dWDQQ8h8dYFMZ3eQ9PN0=; b=Ta18sEUblaH123jJPNaqHtnnlBVZcF8XtIL0rj7agJ0YW4U2F7V74otLuNDTHbQqDA EJdiHH+eZr28+fjAj4FJGx93tFlkvcto3BTVXDrhM5gJYAzSv+b4+jlCUznf23yGvpSg mfAKBSwbSD8NGb/A8M9wXJvaBJV5kGoPMfdU3w3SaSEDj/HtYgIJOQXXL79OTp0qSy1m B0hI8+1FcT+F4vSQzLBjPTEqVqkDTmS3EjGGtrekZdMHeV9agYTxtOwPTCKWJApiruEe +E/+l3rQmhwCUklJ5qC+VR1S0qGhDVQMAxL1WhqBSLhdVZKjQKquhAH79kzUfpy/yTxN 7fdQ== X-Gm-Message-State: AOAM530lRu/TdWt3+A9xuiarYiJTaB1MZkHWIWqcw4TfskOGopETtn8I CJtZgKxLuesJ99I8la5y8wOdQw== X-Google-Smtp-Source: ABdhPJwU2CNaJeLuqmB3l3aFxSictglV1OWNtzh7++8qhkJnEj9D7RaSDvUaMSjTCYQwifUc5RUDBg== X-Received: by 2002:a1c:4d4:: with SMTP id 203mr8903096wme.153.1605175040398; Thu, 12 Nov 2020 01:57:20 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id n15sm6138792wrq.48.2020.11.12.01.57.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 01:57:19 -0800 (PST) From: Lee Jones To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, Lee Jones , "Andrew F. Davis" Subject: [PATCH 2/3] hwmon: ina3221: Demote seemingly unintentional kerneldoc header Date: Thu, 12 Nov 2020 09:57:14 +0000 Message-Id: <20201112095715.1993117-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201112095715.1993117-1-lee.jones@linaro.org> References: <20201112095715.1993117-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org This is the only use of kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/hwmon/ina3221.c:152: warning: Function parameter or member 'ina' not described in 'ina3221_summation_shunt_resistor' Cc: "Andrew F. Davis" Signed-off-by: Lee Jones --- drivers/hwmon/ina3221.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c index 41fb17e0d6416..72cfdc007e609 100644 --- a/drivers/hwmon/ina3221.c +++ b/drivers/hwmon/ina3221.c @@ -139,7 +139,7 @@ static inline bool ina3221_is_enabled(struct ina3221_data *ina, int channel) (ina->reg_config & INA3221_CONFIG_CHx_EN(channel)); } -/** +/* * Helper function to return the resistor value for current summation. * * There is a condition to calculate current summation -- all the shunt From patchwork Thu Nov 12 09:57:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11899515 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC971921 for ; Thu, 12 Nov 2020 09:57:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A05D02222A for ; Thu, 12 Nov 2020 09:57:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bdUZdwS1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727827AbgKLJ5d (ORCPT ); Thu, 12 Nov 2020 04:57:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726671AbgKLJ5X (ORCPT ); Thu, 12 Nov 2020 04:57:23 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBC2BC0613D1 for ; Thu, 12 Nov 2020 01:57:22 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id o15so5321229wru.6 for ; Thu, 12 Nov 2020 01:57:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iYp4liH6QtuFMXY8fnKB9zBXABbAMYcv+7gF3AlAZms=; b=bdUZdwS1oHyphT4MiY5fuJuSHleFsAMvbaM8db1XRxOT716qg1IRdUoVmUzFlpT+nG 9gCJlWNx2qumzMjuLRaz6pMapA8jN5KX/onENKyLqd8fmWQVqlLv37M7yNBMdHrkRG8m Ce5OzzdiOlLVY5UjDV4pXwSRUItbhrlVDg2LMZJkR3fMJMD8oE5J2qgMS78nCx1CGaSu QH/hVQwngfaP/pn80wu7WMQGUpJEHXNzTqFbiT4wzU+ewGsAccit57KiJOKZopKSq/eF f1X0STlN0+kct9AkS2v16Wwuo7yx6CR8xbmba8GcKm/9xfrIrx5jEKCM+6P7rSDFqHZO l/sA== 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=iYp4liH6QtuFMXY8fnKB9zBXABbAMYcv+7gF3AlAZms=; b=E9tF5uXps+P3QDxmL7e4vIsxt25NgJpMBIGSYLAj6A0qnKihlJ7PtZGr3caQlblcGo /8+/NTswZj8bEMIf8FqaXglyhhCGfJZ6O1+Je54XzG40RghktKoj5PJVQN7pExA1lvA9 wXC9+Vioc+Vrps31EOpb4YaxdRZX6KGGjnlsL874mgaWvAjSSkNk5Fg2+dFY39EsMu0D 6lPOddkfaEvJZi6HxUzR6v79egi8gbgM9ER8D5KxigH0erOHfksrubN4J80M1t4+Riqp VeKL319ez0HKcaJfQgNfOHZhUew/BIZYGSxR8LPvMkyHUq0eHI7yUwffpBU4tDoxIo5c RMEA== X-Gm-Message-State: AOAM530RGXs7KP/ZZLj5rK5PLIBxblrvj1dCxhVdWmzQFTiAuTtrcf/U 5KpZPZBey7F6tKx4UxsZdN5TUw== X-Google-Smtp-Source: ABdhPJxKfGioiUbjQWMEIpOjWDSlwsWsdf+ZB/gdqtMiJ065DaMLD1p6GwzO8zDSAzKlSqTxRNVq+Q== X-Received: by 2002:a5d:488b:: with SMTP id g11mr20538303wrq.210.1605175041676; Thu, 12 Nov 2020 01:57:21 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id n15sm6138792wrq.48.2020.11.12.01.57.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 01:57:20 -0800 (PST) From: Lee Jones To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, Lee Jones , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Neelesh Gupta , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/3] hwmon: ibmpowernv: Silence strncpy() warning Date: Thu, 12 Nov 2020 09:57:15 +0000 Message-Id: <20201112095715.1993117-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201112095715.1993117-1-lee.jones@linaro.org> References: <20201112095715.1993117-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Fixes the following W=1 kernel build warning(s): from drivers/hwmon/ibmpowernv.c:11: In function ‘strncpy’, inlined from ‘get_sensor_index_attr’ at drivers/hwmon/ibmpowernv.c:243:2, inlined from ‘create_device_attrs’ at drivers/hwmon/ibmpowernv.c:280:8: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Cc: Jean Delvare Cc: Guenter Roeck Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Neelesh Gupta Cc: linux-hwmon@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones --- drivers/hwmon/ibmpowernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c index a750647e66a47..8e3724728cce0 100644 --- a/drivers/hwmon/ibmpowernv.c +++ b/drivers/hwmon/ibmpowernv.c @@ -240,7 +240,7 @@ static int get_sensor_index_attr(const char *name, u32 *index, char *attr) if (err) return err; - strncpy(attr, dash_pos + 1, MAX_ATTR_LEN); + strscpy(attr, dash_pos + 1, MAX_ATTR_LEN); return 0; }