All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Javier Martinez Canillas <javierm@redhat.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Lee Jones <lee.jones@linaro.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables
Date: Thu, 8 Aug 2019 16:00:16 +0200	[thread overview]
Message-ID: <9f03f364-77b1-3ee5-cd93-0908bf863380@metux.net> (raw)
In-Reply-To: <20190808132417.GU30120@smile.fi.intel.com>

On 08.08.19 15:24, Andy Shevchenko wrote:
> On Thu, Aug 08, 2019 at 03:12:47PM +0200, Enrico Weigelt, metux IT consult wrote:
>> On 06.08.19 19:12, Javier Martinez Canillas wrote:
>>
>>> Right, we could add a macro for that. Although it should probably be called
>>> I2C_OF_MODULE_DEVICE_TABLE() or something like that since is specific to OF.
>>
>> At that point it should be completely noop when OF is disabled, so we
>> also can get rid of many ifdef's.
> 
> Why?

For cases where drivers work w/ or w/o oftree. Not sure whether it
applies to i2c specifically, but there're other places where we still
need nasty ifdef's (eg. gpio-keyboard).

>> I've got some patch somewhere for introducing a MODULE_OF_TABLE() macro
>> as replacement for many MODULE_DEVICE_TABLE(of, ...) cases, which noops
>> when CONFIG_OF is disabled. (and similar ones for other table types).
> 
> It's simple wrong to have #ifdef CONFIG_OF without counterpart of_match_ptr().

Of course, but that's just a part of the story. (actually I'd prefer
using it everywhere, even if the driver only supports oftree).

> And taking into consideration that ID table itself doesn't depend to OF at all,
> why not simple drop that #ifdef and of_match_ptr() all together?

Consumes less space. Yes, it isn't much, but in some scenarios one needs
to heavily reduce the kernel size. And I wouldn't like to use
of_match_ptr() inside a MODULE_DEVICE_TABLE() call :o


--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

      reply	other threads:[~2019-08-08 14:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 19:39 [PATCH RFC] modpost: Support I2C Aliases from OF tables Kieran Bingham
2019-07-10 19:39 ` Kieran Bingham
2019-07-22 13:03 ` Javier Martinez Canillas
2019-07-31 19:44   ` Wolfram Sang
2019-08-01  2:17     ` Masahiro Yamada
2019-08-05 22:48       ` Javier Martinez Canillas
2019-08-06  7:30         ` Geert Uytterhoeven
2019-08-06 17:39           ` Javier Martinez Canillas
2019-08-05 22:25     ` Javier Martinez Canillas
2019-08-06  7:22       ` Geert Uytterhoeven
2019-08-06 17:12         ` Javier Martinez Canillas
2019-08-08 13:12           ` Enrico Weigelt, metux IT consult
2019-08-08 13:24             ` Andy Shevchenko
2019-08-08 14:00               ` Enrico Weigelt, metux IT consult [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=9f03f364-77b1-3ee5-cd93-0908bf863380@metux.net \
    --to=lkml@metux.net \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=javierm@redhat.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=wsa@the-dreams.de \
    --cc=yamada.masahiro@socionext.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.