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] [day] [month] [year] [list]
Message-Id: <20090821135908.259b222f.randy.dunlap@oracle.com>
Date:	Fri, 21 Aug 2009 13:59:08 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>, gregkh@...e.de
Cc:	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	akpm <akpm@...ux-foundation.org>
Subject: [PATCH -next] staging/iio: fix duplicate dev_attr_name

From: Randy Dunlap <randy.dunlap@...cle.com>

device attr's should be static, otherwise duplicate identifiers are
created:

drivers/staging/iio/trigger/iio-trig-gpio.o:(.data+0x1c): multiple definition of `dev_attr_name'

Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
---
 drivers/staging/iio/accel/lis3l02dq_ring.c          |    2 +-
 drivers/staging/iio/trigger/iio-trig-gpio.c         |    2 +-
 drivers/staging/iio/trigger/iio-trig-periodic-rtc.c |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

--- linux-next-20090821.orig/drivers/staging/iio/accel/lis3l02dq_ring.c
+++ linux-next-20090821/drivers/staging/iio/accel/lis3l02dq_ring.c
@@ -441,7 +441,7 @@ static int lis3l02dq_data_rdy_trigger_se
 				 &t);
 	return ret;
 }
-DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
 
 static struct attribute *lis3l02dq_trigger_attrs[] = {
 	&dev_attr_name.attr,
--- linux-next-20090821.orig/drivers/staging/iio/trigger/iio-trig-gpio.c
+++ linux-next-20090821/drivers/staging/iio/trigger/iio-trig-gpio.c
@@ -46,7 +46,7 @@ static irqreturn_t iio_gpio_trigger_poll
 	return IRQ_HANDLED;
 }
 
-DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
 
 static struct attribute *iio_gpio_trigger_attrs[] = {
 	&dev_attr_name.attr,
--- linux-next-20090821.orig/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
+++ linux-next-20090821/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
@@ -81,10 +81,10 @@ static ssize_t iio_trig_periodic_read_na
 	return sprintf(buf, "%s\n", trig_info->name);
 }
 
-DEVICE_ATTR(name, S_IRUGO,
+static DEVICE_ATTR(name, S_IRUGO,
 	    iio_trig_periodic_read_name,
 	    NULL);
-DEVICE_ATTR(frequency, S_IRUGO | S_IWUSR,
+static DEVICE_ATTR(frequency, S_IRUGO | S_IWUSR,
 	    iio_trig_periodic_read_freq,
 	    iio_trig_periodic_write_freq);
 



---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
--
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