All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Vaishali Thakkar <vthakkar1994@gmail.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [media] rc/keymaps: Add helper macro for rc_map_list boilerplate
Date: Fri, 18 Nov 2016 13:52:57 -0200	[thread overview]
Message-ID: <20161118135257.23edbc4b@vento.lan> (raw)
In-Reply-To: <20150711031737.GA12067@vaishali-Ideapad-Z570>

Em Sat, 11 Jul 2015 08:47:37 +0530
Vaishali Thakkar <vthakkar1994@gmail.com> escreveu:

> For simple modules that contain a single rc_map_list without any
> additional setup code then ends up being a block of duplicated
> boilerplate. This patch adds a new macro, module_rc_map_list(),
> which replaces the module_init()/module_exit() registrations with
> template functions.
> 
> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
> ---
>  include/media/rc-map.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/include/media/rc-map.h b/include/media/rc-map.h
> index 27763d5..07e765d 100644
> --- a/include/media/rc-map.h
> +++ b/include/media/rc-map.h
> @@ -96,6 +96,16 @@ struct rc_map_list {
>  	struct rc_map map;
>  };
>  
> +/**
> + * module_rc_map_list() - Helper macro for registering a RC drivers
> + * @__rc_map_list: rc_map_list struct
> + * Helper macro for RC drivers which do not do anything special in module
> + * init/exit. This eliminates a lot of boilerplate. Each module may only
> + * use this macro once, and calling it replaces module_init() and module_exit()
> + */
> +#define module_rc_map_list(__rc_map_list) \
> +	module_driver(__rc_map_list, rc_map_register, rc_map_unregister)
> +

What's the sense of adding it, if no driver is using the new macro?

It would make sense if you had sent it as part of a patch series
making it to be used by the existing drivers.

-- 
Thanks,
Mauro

      reply	other threads:[~2016-11-18 15:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-11  3:17 [PATCH] [media] rc/keymaps: Add helper macro for rc_map_list boilerplate Vaishali Thakkar
2016-11-18 15:52 ` Mauro Carvalho Chehab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161118135257.23edbc4b@vento.lan \
    --to=mchehab@osg.samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=vthakkar1994@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.