* [PATCH] iio: Move kernel-doc for iio_str_to_fixpoint() to iio.h
@ 2013-09-03 1:06 Peter Meerwald
2013-09-05 19:05 ` Lars-Peter Clausen
0 siblings, 1 reply; 4+ messages in thread
From: Peter Meerwald @ 2013-09-03 1:06 UTC (permalink / raw)
To: linux-iio; +Cc: Peter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
drivers/iio/industrialio-core.c | 10 ----------
include/linux/iio/iio.h | 11 +++++++++++
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 2cb4841..b27c4b5 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -409,16 +409,6 @@ static ssize_t iio_read_channel_info(struct device *dev,
}
}
-/**
- * iio_str_to_fixpoint() - Parse a fixed-point number from a string
- * @str: The string to parse
- * @fract_mult: Multiplier for the first decimal place, should be a power of 10
- * @integer: The integer part of the number
- * @fract: The fractional part of the number
- *
- * Returns 0 on success, or a negative error code if the string could not be
- * parsed.
- */
int iio_str_to_fixpoint(const char *str, int fract_mult,
int *integer, int *fract)
{
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 01edd67..d12518e 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -612,6 +612,17 @@ static inline struct dentry *iio_get_debugfs_dentry(struct iio_dev *indio_dev)
}
#endif
+
+/**
+ * iio_str_to_fixpoint() - Parse a fixed-point number from a string
+ * @str: The string to parse
+ * @fract_mult: Multiplier for the first decimal place, should be a power of 10
+ * @integer: The integer part of the number
+ * @fract: The fractional part of the number
+ *
+ * Returns 0 on success, or a negative error code if the string could not be
+ * parsed.
+ */
int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
int *fract);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: Move kernel-doc for iio_str_to_fixpoint() to iio.h
2013-09-03 1:06 [PATCH] iio: Move kernel-doc for iio_str_to_fixpoint() to iio.h Peter Meerwald
@ 2013-09-05 19:05 ` Lars-Peter Clausen
2013-09-08 15:02 ` Peter Meerwald
0 siblings, 1 reply; 4+ messages in thread
From: Lars-Peter Clausen @ 2013-09-05 19:05 UTC (permalink / raw)
To: Peter Meerwald; +Cc: linux-iio
On 09/03/2013 03:06 AM, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Usually the kernel-doc is kept with the implementation
> ---
> drivers/iio/industrialio-core.c | 10 ----------
> include/linux/iio/iio.h | 11 +++++++++++
> 2 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 2cb4841..b27c4b5 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -409,16 +409,6 @@ static ssize_t iio_read_channel_info(struct device *dev,
> }
> }
>
> -/**
> - * iio_str_to_fixpoint() - Parse a fixed-point number from a string
> - * @str: The string to parse
> - * @fract_mult: Multiplier for the first decimal place, should be a power of 10
> - * @integer: The integer part of the number
> - * @fract: The fractional part of the number
> - *
> - * Returns 0 on success, or a negative error code if the string could not be
> - * parsed.
> - */
> int iio_str_to_fixpoint(const char *str, int fract_mult,
> int *integer, int *fract)
> {
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index 01edd67..d12518e 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -612,6 +612,17 @@ static inline struct dentry *iio_get_debugfs_dentry(struct iio_dev *indio_dev)
> }
> #endif
>
> +
> +/**
> + * iio_str_to_fixpoint() - Parse a fixed-point number from a string
> + * @str: The string to parse
> + * @fract_mult: Multiplier for the first decimal place, should be a power of 10
> + * @integer: The integer part of the number
> + * @fract: The fractional part of the number
> + *
> + * Returns 0 on success, or a negative error code if the string could not be
> + * parsed.
> + */
> int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
> int *fract);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: Move kernel-doc for iio_str_to_fixpoint() to iio.h
2013-09-05 19:05 ` Lars-Peter Clausen
@ 2013-09-08 15:02 ` Peter Meerwald
2013-09-08 15:29 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Peter Meerwald @ 2013-09-08 15:02 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: linux-iio
> Usually the kernel-doc is kept with the implementation
ok; it is one of the few undocumented functions in iio.h hence I
suggested to move the documentation
> > ---
> > drivers/iio/industrialio-core.c | 10 ----------
> > include/linux/iio/iio.h | 11 +++++++++++
> > 2 files changed, 11 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/iio/industrialio-core.c
> > b/drivers/iio/industrialio-core.c
> > index 2cb4841..b27c4b5 100644
> > --- a/drivers/iio/industrialio-core.c
> > +++ b/drivers/iio/industrialio-core.c
> > @@ -409,16 +409,6 @@ static ssize_t iio_read_channel_info(struct device
> > *dev,
> > }
> > }
> >
> > -/**
> > - * iio_str_to_fixpoint() - Parse a fixed-point number from a string
> > - * @str: The string to parse
> > - * @fract_mult: Multiplier for the first decimal place, should be a power
> > of 10
> > - * @integer: The integer part of the number
> > - * @fract: The fractional part of the number
> > - *
> > - * Returns 0 on success, or a negative error code if the string could not
> > be
> > - * parsed.
> > - */
> > int iio_str_to_fixpoint(const char *str, int fract_mult,
> > int *integer, int *fract)
> > {
> > diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> > index 01edd67..d12518e 100644
> > --- a/include/linux/iio/iio.h
> > +++ b/include/linux/iio/iio.h
> > @@ -612,6 +612,17 @@ static inline struct dentry
> > *iio_get_debugfs_dentry(struct iio_dev *indio_dev)
> > }
> > #endif
> >
> > +
> > +/**
> > + * iio_str_to_fixpoint() - Parse a fixed-point number from a string
> > + * @str: The string to parse
> > + * @fract_mult: Multiplier for the first decimal place, should be a power
> > of 10
> > + * @integer: The integer part of the number
> > + * @fract: The fractional part of the number
> > + *
> > + * Returns 0 on success, or a negative error code if the string could not
> > be
> > + * parsed.
> > + */
> > int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
> > int *fract);
> >
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Peter Meerwald
+43-664-2444418 (mobile)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: Move kernel-doc for iio_str_to_fixpoint() to iio.h
2013-09-08 15:02 ` Peter Meerwald
@ 2013-09-08 15:29 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2013-09-08 15:29 UTC (permalink / raw)
To: Peter Meerwald, Lars-Peter Clausen; +Cc: linux-iio
Peter Meerwald <pmeerw@pmeerw.net> wrote:
>
>> Usually the kernel-doc is kept with the implementation
>
>ok; it is one of the few undocumented functions in iio.h hence I
>suggested to move the documentation
My fault as I did the others all wrong in the first place. There are good arguments either way but Lars is right that with the implementation is the most common choice.
Now, it would be good to clean this up once and for all if anyone wants to do the patches to move all docs to where they are implemented... It will be a lot of churn but right now I think the core is pretty quiet.
>
>> > ---
>> > drivers/iio/industrialio-core.c | 10 ----------
>> > include/linux/iio/iio.h | 11 +++++++++++
>> > 2 files changed, 11 insertions(+), 10 deletions(-)
>> >
>> > diff --git a/drivers/iio/industrialio-core.c
>> > b/drivers/iio/industrialio-core.c
>> > index 2cb4841..b27c4b5 100644
>> > --- a/drivers/iio/industrialio-core.c
>> > +++ b/drivers/iio/industrialio-core.c
>> > @@ -409,16 +409,6 @@ static ssize_t iio_read_channel_info(struct
>device
>> > *dev,
>> > }
>> > }
>> >
>> > -/**
>> > - * iio_str_to_fixpoint() - Parse a fixed-point number from a
>string
>> > - * @str: The string to parse
>> > - * @fract_mult: Multiplier for the first decimal place, should be
>a power
>> > of 10
>> > - * @integer: The integer part of the number
>> > - * @fract: The fractional part of the number
>> > - *
>> > - * Returns 0 on success, or a negative error code if the string
>could not
>> > be
>> > - * parsed.
>> > - */
>> > int iio_str_to_fixpoint(const char *str, int fract_mult,
>> > int *integer, int *fract)
>> > {
>> > diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
>> > index 01edd67..d12518e 100644
>> > --- a/include/linux/iio/iio.h
>> > +++ b/include/linux/iio/iio.h
>> > @@ -612,6 +612,17 @@ static inline struct dentry
>> > *iio_get_debugfs_dentry(struct iio_dev *indio_dev)
>> > }
>> > #endif
>> >
>> > +
>> > +/**
>> > + * iio_str_to_fixpoint() - Parse a fixed-point number from a
>string
>> > + * @str: The string to parse
>> > + * @fract_mult: Multiplier for the first decimal place, should be
>a power
>> > of 10
>> > + * @integer: The integer part of the number
>> > + * @fract: The fractional part of the number
>> > + *
>> > + * Returns 0 on success, or a negative error code if the string
>could not
>> > be
>> > + * parsed.
>> > + */
>> > int iio_str_to_fixpoint(const char *str, int fract_mult, int
>*integer,
>> > int *fract);
>> >
>> >
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio"
>in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-08 15:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 1:06 [PATCH] iio: Move kernel-doc for iio_str_to_fixpoint() to iio.h Peter Meerwald
2013-09-05 19:05 ` Lars-Peter Clausen
2013-09-08 15:02 ` Peter Meerwald
2013-09-08 15:29 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).