All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Vladimir Zapolskiy <vz@mleia.com>
Cc: Luis Oliveira <Luis.Oliveira@synopsys.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-i2c@vger.kernel.org,
	devicetree <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ramiro.Oliveira@synopsys.com,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	CARLOS.PALMINHA@synopsys.com
Subject: Re: [PATCH] i2c: core: helper function to detect slave mode
Date: Sat, 7 Jan 2017 00:45:51 +0200	[thread overview]
Message-ID: <CAHp75Ve87TE3y6hg1bMxSFAPVcY3wPifGuvtpXNhBw5-eOnPrg@mail.gmail.com> (raw)
In-Reply-To: <73246c4a-504c-52d7-dde4-970a45dca0bd@mleia.com>

On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy <vz@mleia.com> wrote:
>> +     if (IS_BUILTIN(CONFIG_OF) && dev->of_node) {
>
> IS_BUILTIN(CONFIG_OF) looks excessive, check for non-NULL dev->of_node
> should be sufficient.

Sorry, but you missed the point.
This will enable compile time optimization and basically be collapsed to no-op.

>> +             }
>> +     } else if (IS_BUILTIN(CONFIG_ACPI) && ACPI_HANDLE(dev)) {
>> +             dev_dbg(dev, "ACPI slave is not supported yet\n");
>> +     }
>
> If so, then it might be better to drop else-if stub for now.

Please, don't.

-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Vladimir Zapolskiy <vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org>
Cc: Luis Oliveira
	<Luis.Oliveira-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
	Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Jarkko Nikula
	<jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Andy Shevchenko
	<andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Mika Westerberg
	<mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Ramiro.Oliveira-HKixBCOQz3hWk0Htik3J/w@public.gmane.org,
	Joao Pinto <Joao.Pinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
	CARLOS.PALMINHA-HKixBCOQz3hWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH] i2c: core: helper function to detect slave mode
Date: Sat, 7 Jan 2017 00:45:51 +0200	[thread overview]
Message-ID: <CAHp75Ve87TE3y6hg1bMxSFAPVcY3wPifGuvtpXNhBw5-eOnPrg@mail.gmail.com> (raw)
In-Reply-To: <73246c4a-504c-52d7-dde4-970a45dca0bd-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org>

On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy <vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> wrote:
>> +     if (IS_BUILTIN(CONFIG_OF) && dev->of_node) {
>
> IS_BUILTIN(CONFIG_OF) looks excessive, check for non-NULL dev->of_node
> should be sufficient.

Sorry, but you missed the point.
This will enable compile time optimization and basically be collapsed to no-op.

>> +             }
>> +     } else if (IS_BUILTIN(CONFIG_ACPI) && ACPI_HANDLE(dev)) {
>> +             dev_dbg(dev, "ACPI slave is not supported yet\n");
>> +     }
>
> If so, then it might be better to drop else-if stub for now.

Please, don't.

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-01-06 22:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05 17:24 [PATCH] i2c: core: helper function to detect slave mode Luis Oliveira
2017-01-05 17:24 ` Luis Oliveira
2017-01-06 16:29 ` Andy Shevchenko
2017-01-06 17:15   ` Luis Oliveira
2017-01-06 17:15     ` Luis Oliveira
2017-01-06 17:17     ` Andy Shevchenko
2017-01-06 17:17       ` Andy Shevchenko
2017-01-06 17:46       ` Luis Oliveira
2017-01-06 17:46         ` Luis Oliveira
2017-01-06 21:32         ` Andy Shevchenko
2017-01-06 21:32           ` Andy Shevchenko
2017-01-06 16:35 ` Rob Herring
2017-01-06 17:12   ` Luis Oliveira
2017-01-06 17:12     ` Luis Oliveira
2017-01-06 21:46 ` Vladimir Zapolskiy
2017-01-06 21:46   ` Vladimir Zapolskiy
2017-01-06 22:45   ` Andy Shevchenko [this message]
2017-01-06 22:45     ` Andy Shevchenko
2017-01-06 23:43     ` Vladimir Zapolskiy
2017-01-07  0:19       ` Andy Shevchenko
2017-01-07  0:19         ` Andy Shevchenko
2017-01-07  1:24         ` Vladimir Zapolskiy
2017-01-07  1:24           ` Vladimir Zapolskiy
2017-01-12 17:01           ` Andy Shevchenko
2017-01-16 10:32             ` Luis Oliveira
2017-01-16 10:32               ` Luis Oliveira
2017-01-16 23:14               ` Vladimir Zapolskiy
2017-01-16 23:14                 ` Vladimir Zapolskiy
2017-01-18 10:59                 ` Andy Shevchenko

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=CAHp75Ve87TE3y6hg1bMxSFAPVcY3wPifGuvtpXNhBw5-eOnPrg@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=CARLOS.PALMINHA@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Luis.Oliveira@synopsys.com \
    --cc=Ramiro.Oliveira@synopsys.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=vz@mleia.com \
    --cc=wsa@the-dreams.de \
    /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.