From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: [PATCH 2/3] iio: Add __printf() attributes to various allocation functions
Date: Sun, 13 Sep 2020 14:21:14 +0100 [thread overview]
Message-ID: <20200913132115.800131-3-jic23@kernel.org> (raw)
In-Reply-To: <20200913132115.800131-1-jic23@kernel.org>
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
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 <Jonathan.Cameron@huawei.com>
---
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,
--
2.28.0
next prev parent reply other threads:[~2020-09-13 13:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-13 13:21 [PATCH 0/3] IIO get to warning free for W=1 C=1 Jonathan Cameron
2020-09-13 13:21 ` [PATCH 1/3] iio:imu:adis16400: Sort out missing kernel doc Jonathan Cameron
2020-09-14 5:52 ` Alexandru Ardelean
2020-09-17 18:02 ` Jonathan Cameron
2020-09-13 13:21 ` Jonathan Cameron [this message]
2020-09-18 13:25 ` [PATCH 2/3] iio: Add __printf() attributes to various allocation functions Alexandru Ardelean
2020-09-19 12:08 ` Jonathan Cameron
2020-09-13 13:21 ` [PATCH 3/3] iio:core: Tidy up kernel-doc Jonathan Cameron
2020-09-18 12:48 ` Alexandru Ardelean
2020-09-19 11:51 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200913132115.800131-3-jic23@kernel.org \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=lee.jones@linaro.org \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.