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]
Date:	Sat, 2 Jul 2016 14:04:29 +0900
From:	Chanwoo Choi <cwchoi00@...il.com>
To:	Davidlohr Bueso <dave@...olabs.net>
Cc:	peterz@...radead.org, mingo@...nel.org, davem@...emloft.net,
	Chanwoo Choi <cw00.choi@...sung.com>,
	dougthompson@...ssion.com, bp@...en8.de, mchehab@....samsung.com,
	Greg KH <gregkh@...uxfoundation.org>, pfg@....com,
	jikos@...nel.org, hans.verkuil@...co.com, awalls@...metrocast.net,
	dledford@...hat.com, sean.hefty@...el.com, kys@...rosoft.com,
	heiko.carstens@...ibm.com, James.Bottomley@...senpartnership.com,
	sumit.semwal@...aro.org, schwidefsky@...ibm.com,
	linux-kernel <linux-kernel@...r.kernel.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 03/12] PM,devfreq: Employ atomic_fetch_inc()

Hi Davidlohr,


Acked-by: Chanwoo Choi <cw00.choi@...sung.com>

Thanks,
Chanwoo Choi


2016-06-21 5:05 GMT+09:00 Davidlohr Bueso <dave@...olabs.net>:
> Now that we have fetch_inc() we can stop using inc_return() - 1.
>
> These are very similar to the existing OP-RETURN primitives we already
> have, except they return the value of the atomic variable _before_
> modification.
>
> Cc: Chanwoo Choi <cw00.choi@...sung.com>
> Cc: linux-pm@...r.kernel.org
> Signed-off-by: Davidlohr Bueso <dbueso@...e.de>
> ---
>  drivers/devfreq/devfreq-event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c
> index 39b048eda2ce..45b02d3d7e7d 100644
> --- a/drivers/devfreq/devfreq-event.c
> +++ b/drivers/devfreq/devfreq-event.c
> @@ -329,7 +329,7 @@ struct devfreq_event_dev *devfreq_event_add_edev(struct device *dev,
>         edev->dev.class = devfreq_event_class;
>         edev->dev.release = devfreq_event_release_edev;
>
> -       dev_set_name(&edev->dev, "event.%d", atomic_inc_return(&event_no) - 1);
> +       dev_set_name(&edev->dev, "event.%d", atomic_fetch_inc(&event_no));
>         ret = device_register(&edev->dev);
>         if (ret < 0) {
>                 put_device(&edev->dev);
> --
> 2.6.6
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ