lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F566D7A.1030400@xenotime.net>
Date:	Tue, 06 Mar 2012 12:03:06 -0800
From:	Randy Dunlap <rdunlap@...otime.net>
To:	Lars-Peter Clausen <lars@...afoo.de>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jonathan Cameron <jic23@....ac.uk>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Michael Hennerich <michael.hennerich@...log.com>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-iio@...r.kernel.org
Subject: Re: [PATCH] staging:iio: Fix compile error without CONFIG_DEBUG_FS

On 03/06/2012 11:43 AM, Lars-Peter Clausen wrote:

> commit e553f182d ("staging: iio: core: Introduce debugfs support, add support
> for direct register access") added a '#if defined(CONFIG_DEBUG_FS)' around
> iio_read_channel_ext_info and iio_write_channel_ext_info causing the following
> compile error if CONFIG_DEBUG_FS is not defined.
> 
> 	drivers/staging/iio/industrialio-core.c:621:11: error: 'iio_read_channel_ext_info' undeclared (first use in this function)
> 	drivers/staging/iio/industrialio-core.c:623:11: error: 'iio_write_channel_ext_info' undeclared (first use in this function)
> 
> This patch fixes the issue by moving the functions out of the '#if
> defined(CONFIG_DEBUG_FS)' section again.
> 
> Reported-by: Randy Dunlap <rdunlap@...otime.net>
> Signed-off-by: Lars-Peter Clausen <lars@...afoo.de>


Acked-by: Randy Dunlap <rdunlap@...otime.net>

Thanks.


> ---
>  drivers/staging/iio/industrialio-core.c |   54 +++++++++++++++---------------
>  1 files changed, 27 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
> index 27695df..d303bfb 100644
> --- a/drivers/staging/iio/industrialio-core.c
> +++ b/drivers/staging/iio/industrialio-core.c
> @@ -227,33 +227,6 @@ static void iio_device_unregister_debugfs(struct iio_dev *indio_dev)
>  	debugfs_remove_recursive(indio_dev->debugfs_dentry);
>  }
>  
> -static ssize_t iio_read_channel_ext_info(struct device *dev,
> -				     struct device_attribute *attr,
> -				     char *buf)
> -{
> -	struct iio_dev *indio_dev = dev_get_drvdata(dev);
> -	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
> -	const struct iio_chan_spec_ext_info *ext_info;
> -
> -	ext_info = &this_attr->c->ext_info[this_attr->address];
> -
> -	return ext_info->read(indio_dev, this_attr->c, buf);
> -}
> -
> -static ssize_t iio_write_channel_ext_info(struct device *dev,
> -				     struct device_attribute *attr,
> -				     const char *buf,
> -					 size_t len)
> -{
> -	struct iio_dev *indio_dev = dev_get_drvdata(dev);
> -	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
> -	const struct iio_chan_spec_ext_info *ext_info;
> -
> -	ext_info = &this_attr->c->ext_info[this_attr->address];
> -
> -	return ext_info->write(indio_dev, this_attr->c, buf, len);
> -}
> -
>  static int iio_device_register_debugfs(struct iio_dev *indio_dev)
>  {
>  	struct dentry *d;
> @@ -297,6 +270,33 @@ static void iio_device_unregister_debugfs(struct iio_dev *indio_dev)
>  }
>  #endif /* CONFIG_DEBUG_FS */
>  
> +static ssize_t iio_read_channel_ext_info(struct device *dev,
> +				     struct device_attribute *attr,
> +				     char *buf)
> +{
> +	struct iio_dev *indio_dev = dev_get_drvdata(dev);
> +	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
> +	const struct iio_chan_spec_ext_info *ext_info;
> +
> +	ext_info = &this_attr->c->ext_info[this_attr->address];
> +
> +	return ext_info->read(indio_dev, this_attr->c, buf);
> +}
> +
> +static ssize_t iio_write_channel_ext_info(struct device *dev,
> +				     struct device_attribute *attr,
> +				     const char *buf,
> +					 size_t len)
> +{
> +	struct iio_dev *indio_dev = dev_get_drvdata(dev);
> +	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
> +	const struct iio_chan_spec_ext_info *ext_info;
> +
> +	ext_info = &this_attr->c->ext_info[this_attr->address];
> +
> +	return ext_info->write(indio_dev, this_attr->c, buf, len);
> +}
> +
>  static ssize_t iio_read_channel_info(struct device *dev,
>  				     struct device_attribute *attr,
>  				     char *buf)



-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ