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: <10661491.9ZT613bo8E@vostro.rjw.lan>
Date:	Tue, 25 Feb 2014 15:23:51 +0100
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>,
	Lan Tianyu <tianyu.lan@...el.com>,
	Lv Zheng <lv.zheng@...el.com>, Alan Cox <alan.cox@...el.com>,
	Mathias Nyman <mathias.nyman@...ux.intel.com>,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] gpio / ACPI: Rename acpi_gpio_evt_pin to acpi_gpio_event

On Monday, February 24, 2014 06:00:08 PM Mika Westerberg wrote:
> In order to consolidate _Exx, _Lxx and _EVT to use the same structure we
> make the structure name reflect that we are dealing with any event, not
> just _EVT.

It's just a rename, right?  Then please say in the changelog that no functional
changes should result from this.

> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> ---
>  drivers/gpio/gpiolib-acpi.c | 56 ++++++++++++++++++++++-----------------------
>  1 file changed, 28 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index 5f5f107c2099..cb99dc2c552e 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -19,7 +19,7 @@
>  
>  #include "gpiolib.h"
>  
> -struct acpi_gpio_evt_pin {
> +struct acpi_gpio_event {
>  	struct list_head node;
>  	acpi_handle *evt_handle;
>  	unsigned int pin;
> @@ -28,7 +28,7 @@ struct acpi_gpio_evt_pin {
>  
>  struct acpi_gpio_chip {
>  	struct gpio_chip *chip;
> -	struct list_head *evt_pins;
> +	struct list_head *events;
>  };
>  
>  static int acpi_gpiochip_find(struct gpio_chip *gc, void *data)
> @@ -79,9 +79,9 @@ static irqreturn_t acpi_gpio_irq_handler(int irq, void *data)
>  
>  static irqreturn_t acpi_gpio_irq_handler_evt(int irq, void *data)
>  {
> -	struct acpi_gpio_evt_pin *evt_pin = data;
> +	struct acpi_gpio_event *event = data;
>  
> -	acpi_execute_simple_method(evt_pin->evt_handle, NULL, evt_pin->pin);
> +	acpi_execute_simple_method(event->evt_handle, NULL, event->pin);
>  
>  	return IRQ_HANDLED;
>  }
> @@ -107,7 +107,7 @@ static void acpi_gpiochip_request_interrupts(struct acpi_gpio_chip *achip)
>  	struct gpio_chip *chip = achip->chip;
>  	struct acpi_resource *res;
>  	acpi_handle handle, evt_handle;
> -	struct list_head *evt_pins = NULL;
> +	struct list_head *events = NULL;
>  	acpi_status status;
>  	unsigned int pin;
>  	int irq, ret;
> @@ -126,10 +126,10 @@ static void acpi_gpiochip_request_interrupts(struct acpi_gpio_chip *achip)
>  
>  	status = acpi_get_handle(handle, "_EVT", &evt_handle);
>  	if (ACPI_SUCCESS(status)) {
> -		evt_pins = kzalloc(sizeof(*evt_pins), GFP_KERNEL);
> -		if (evt_pins) {
> -			INIT_LIST_HEAD(evt_pins);
> -			achip->evt_pins = evt_pins;
> +		events = kzalloc(sizeof(*events), GFP_KERNEL);
> +		if (events) {
> +			INIT_LIST_HEAD(events);
> +			achip->events = events;
>  		}
>  	}
>  
> @@ -168,19 +168,19 @@ static void acpi_gpiochip_request_interrupts(struct acpi_gpio_chip *achip)
>  				data = ev_handle;
>  			}
>  		}
> -		if (!handler && evt_pins) {
> -			struct acpi_gpio_evt_pin *evt_pin;
> +		if (!handler && events) {
> +			struct acpi_gpio_event *event;
>  
> -			evt_pin = kzalloc(sizeof(*evt_pin), GFP_KERNEL);
> -			if (!evt_pin)
> +			event = kzalloc(sizeof(*event), GFP_KERNEL);
> +			if (!event)
>  				continue;
>  
> -			list_add_tail(&evt_pin->node, evt_pins);
> -			evt_pin->evt_handle = evt_handle;
> -			evt_pin->pin = pin;
> -			evt_pin->irq = irq;
> +			list_add_tail(&event->node, events);
> +			event->evt_handle = evt_handle;
> +			event->pin = pin;
> +			event->irq = irq;
>  			handler = acpi_gpio_irq_handler_evt;
> -			data = evt_pin;
> +			data = event;
>  		}
>  		if (!handler)
>  			continue;
> @@ -207,23 +207,23 @@ static void acpi_gpiochip_request_interrupts(struct acpi_gpio_chip *achip)
>   */
>  static void acpi_gpiochip_free_interrupts(struct acpi_gpio_chip *achip)
>  {
> -	struct list_head *evt_pins;
> -	struct acpi_gpio_evt_pin *evt_pin, *ep;
> +	struct list_head *events;
> +	struct acpi_gpio_event *event, *ep;
>  	struct gpio_chip *chip = achip->chip;
>  
> -	if (!chip->dev || !chip->to_irq || !achip->evt_pins)
> +	if (!chip->dev || !chip->to_irq || !achip->events)
>  		return;
>  
> -	evt_pins = achip->evt_pins;
> -	achip->evt_pins = NULL;
> +	events = achip->events;
> +	achip->events = NULL;
>  
> -	list_for_each_entry_safe_reverse(evt_pin, ep, evt_pins, node) {
> -		devm_free_irq(chip->dev, evt_pin->irq, evt_pin);
> -		list_del(&evt_pin->node);
> -		kfree(evt_pin);
> +	list_for_each_entry_safe_reverse(event, ep, events, node) {
> +		devm_free_irq(chip->dev, event->irq, event);
> +		list_del(&event->node);
> +		kfree(event);
>  	}
>  
> -	kfree(evt_pins);
> +	kfree(events);
>  }
>  
>  struct acpi_gpio_lookup {
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
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