[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZN9H5jVjMSDfhCXz@smile.fi.intel.com>
Date:   Fri, 18 Aug 2023 13:28:54 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Bartosz Golaszewski <brgl@...ev.pl>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Kent Gibson <warthog618@...il.com>, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v2 2/6] gpio: cdev: open-code to_gpio_chardev_data()
On Thu, Aug 17, 2023 at 08:49:54PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> 
> This function is a wrapper around container_of(). It's used only once and
> we will have a second notifier soon, so instead of having two flavors of
> this helper, let's just open-code where needed.
...
> +	struct gpio_chardev_data *cdev = container_of(nb,
> +						      struct gpio_chardev_data,
> +						      lineinfo_changed_nb);
This way it's slightly better.
	struct gpio_chardev_data *cdev =
		container_of(nb, struct gpio_chardev_data, lineinfo_changed_nb);
-- 
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists
 
