From patchwork Sun Sep 13 13:21:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 11772329 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 12DD9112E for ; Sun, 13 Sep 2020 13:23:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E605421974 for ; Sun, 13 Sep 2020 13:23:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600003407; bh=R+VVRIk6l5/l6g7174w37YKlgtuyfIO0RSzMT5FXTIA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=C67dR0HeBVYIzuGbGpY917KpUj4B+ysIr9sXo+0R4DR6cgcFi32/1HLf6H7UJ6kcQ 0ZblwFSj9MO1bBRkD6RcdjK82G0qxVNzwde03FBVjqlOQoLxZ978RbseKywG+SLUEz i0rHduAlAMm5IQM+2nV5BiwV2Vz/Cj6JpxhzT+Aw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725935AbgIMNXZ (ORCPT ); Sun, 13 Sep 2020 09:23:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:53146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbgIMNXU (ORCPT ); Sun, 13 Sep 2020 09:23:20 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B761A217BA; Sun, 13 Sep 2020 13:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600003400; bh=R+VVRIk6l5/l6g7174w37YKlgtuyfIO0RSzMT5FXTIA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RnG6BUFwF0yWoEWPGJT5TP7mgyWKobRwGJThw865NZA7nGdUvSRd0SUoKd8kkF+d9 WjjL8jlAQlmVZcuPUKb2AfLiDsTMMr/RjZDPtOXMvXzQuSkohVQHxnjenHVvaGM0Si nUsrzrxoLitY1F3M2vGlQmlT8XF1nm2PiI95Npd4= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Lee Jones , Jonathan Cameron , Alexandru Ardelean Subject: [PATCH 1/3] iio:imu:adis16400: Sort out missing kernel doc. Date: Sun, 13 Sep 2020 14:21:13 +0100 Message-Id: <20200913132115.800131-2-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200913132115.800131-1-jic23@kernel.org> References: <20200913132115.800131-1-jic23@kernel.org> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron I'd like to be enable W=1 for all IIO builds as it catches real issues as well as more minor documentation issues such as this (also good to fix though!) drivers/iio/imu/adis16400.c:183: warning: Function parameter or member 'avail_scan_mask' not described in 'adis16400_state' Signed-off-by: Jonathan Cameron Cc: Alexandru Ardelean Acked-by: Alexandru Ardelean --- drivers/iio/imu/adis16400.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c index 1ebe3e50d3e6..140cfc65ee8c 100644 --- a/drivers/iio/imu/adis16400.c +++ b/drivers/iio/imu/adis16400.c @@ -173,6 +173,8 @@ struct adis16400_chip_info { * @variant: chip variant info * @filt_int: integer part of requested filter frequency * @adis: adis device + * @avail_scan_mask: NULL terminated array of bitmaps of channels + * that must be enabled together **/ struct adis16400_state { struct adis16400_chip_info *variant; From patchwork Sun Sep 13 13:21:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 11772331 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 7889E1580 for ; Sun, 13 Sep 2020 13:23:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 57718217BA for ; Sun, 13 Sep 2020 13:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600003407; bh=cQSegIGnq/fGyRw7bxvadcK0q+DtJP5n+d3spObLNK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=l/L4jMKKrbIAijt1cCOTi0fjpuSzousEqJc9pbDeD2gQkQhmypgZSP2MNpDUSd/R7 gDLsiXkptv8rYx95syo67YNrjOMa5or7fD25jp8SAsHyc5gdmmFOK4ap4hLBpPAZhO BHAhqhhD/Dela+ua1x87iXWCgIFzoXc72ClHEPSM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725931AbgIMNX0 (ORCPT ); Sun, 13 Sep 2020 09:23:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:53156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbgIMNXW (ORCPT ); Sun, 13 Sep 2020 09:23:22 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F0BC221974; Sun, 13 Sep 2020 13:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600003401; bh=cQSegIGnq/fGyRw7bxvadcK0q+DtJP5n+d3spObLNK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pnGbm/Tjz44TN9sjhyWBhMfNmSUGaXtqZeKRvMZYLeCPDJNXWTL+5PsBf61d4Ut/U TEoB9lKAFioCQm7NOznbYvu7iNcQNLnkjaKbVgVZsGWypG1YOQznirp76f7P7xJqIn y0V95kGoUX1QKMZNgQnSgISJfV3cvBAHCltJyEbU= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Lee Jones , Jonathan Cameron Subject: [PATCH 2/3] iio: Add __printf() attributes to various allocation functions Date: Sun, 13 Sep 2020 14:21:14 +0100 Message-Id: <20200913132115.800131-3-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200913132115.800131-1-jic23@kernel.org> References: <20200913132115.800131-1-jic23@kernel.org> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron A partial set of these was added to IIO a long time back. This fills in some gaps in coverage highlighted by building with W=1 Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean --- drivers/iio/industrialio-trigger.c | 2 +- include/linux/iio/iio.h | 4 ++-- include/linux/iio/trigger_consumer.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c index 6f16357fd732..adfe023cad48 100644 --- a/drivers/iio/industrialio-trigger.c +++ b/drivers/iio/industrialio-trigger.c @@ -516,7 +516,7 @@ static void iio_trig_subirqunmask(struct irq_data *d) trig->subirqs[d->irq - trig->subirq_base].enabled = true; } -static struct iio_trigger *viio_trigger_alloc(const char *fmt, va_list vargs) +__printf(1, 0) static struct iio_trigger *viio_trigger_alloc(const char *fmt, va_list vargs) { struct iio_trigger *trig; int i; diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index e2df67a3b9ab..a02a3efad794 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@ -691,8 +691,8 @@ static inline void *iio_priv(const struct iio_dev *indio_dev) void iio_device_free(struct iio_dev *indio_dev); struct iio_dev *devm_iio_device_alloc(struct device *parent, int sizeof_priv); -struct iio_trigger *devm_iio_trigger_alloc(struct device *dev, - const char *fmt, ...); +__printf(2, 3) struct iio_trigger *devm_iio_trigger_alloc(struct device *dev, + const char *fmt, ...); /** * iio_buffer_enabled() - helper function to test if the buffer is enabled * @indio_dev: IIO device structure for device diff --git a/include/linux/iio/trigger_consumer.h b/include/linux/iio/trigger_consumer.h index 3aa2f132dd67..2c05dfad88d7 100644 --- a/include/linux/iio/trigger_consumer.h +++ b/include/linux/iio/trigger_consumer.h @@ -38,7 +38,7 @@ struct iio_poll_func { }; -struct iio_poll_func +__printf(5, 6) struct iio_poll_func *iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p), irqreturn_t (*thread)(int irq, void *p), int type, From patchwork Sun Sep 13 13:21:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 11772327 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 DAA7A59D for ; Sun, 13 Sep 2020 13:23:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8B0C2158C for ; Sun, 13 Sep 2020 13:23:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600003406; bh=41WTgoOcWayQaiGm5nUrMD4GkMsxkxjsSsEDujfc/0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0wX98FuvaeQAoRSVKghKjhTgIZvNVk7/Tr8wYftD97hM7U0AW98HtwGY3CzGEzYbC fxCkt2VsJSheF//J2VxAb3EXf53q/YYdoSjADG/JxKbgLvgk+BVjuk7XjQ6+uizIRD gGhtLdG4jPMhJEm7029ZWyhIJmUJX3OjQcJeHrnk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725939AbgIMNXY (ORCPT ); Sun, 13 Sep 2020 09:23:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:53166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725935AbgIMNXX (ORCPT ); Sun, 13 Sep 2020 09:23:23 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1AC5921D80; Sun, 13 Sep 2020 13:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600003402; bh=41WTgoOcWayQaiGm5nUrMD4GkMsxkxjsSsEDujfc/0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xZi9vtPjTOXtwl4DDd5iqkc8dfP3BTDf9FiOplhW1Du+mT2r5UMWUq4x+E1xTgKGl E41Lb7Kf05CuPpcm2cRry+DvnPoN5DZKxXLxyWSfzWQq718bqG1Ls2YMouzziQTx8b rLPiKQTVqQJoDtJn4RzLMXAoxGaxHnxsRhPAixQ0= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Lee Jones , Jonathan Cameron Subject: [PATCH 3/3] iio:core: Tidy up kernel-doc. Date: Sun, 13 Sep 2020 14:21:15 +0100 Message-Id: <20200913132115.800131-4-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200913132115.800131-1-jic23@kernel.org> References: <20200913132115.800131-1-jic23@kernel.org> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron One comment isn't kernel-doc at all, but starts with /** and another is simply missing a parameter that was introduced recently. Signed-off-by: Jonathan Cameron Acked-by: Alexandru Ardelean --- drivers/iio/industrialio-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 8ddc6dfc8ed4..6e388293c828 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -170,7 +170,7 @@ static const char * const iio_chan_info_postfix[] = { }; #if defined(CONFIG_DEBUG_FS) -/** +/* * There's also a CONFIG_DEBUG_FS guard in include/linux/iio/iio.h for * iio_get_debugfs_dentry() to make it inline if CONFIG_DEBUG_FS is undefined */ @@ -1525,6 +1525,7 @@ struct device_type iio_device_type = { /** * iio_device_alloc() - allocate an iio_dev from a driver + * @parent: Parent device. * @sizeof_priv: Space to allocate for private structure. **/ struct iio_dev *iio_device_alloc(struct device *parent, int sizeof_priv)