From: Karol Lewandowski <k.lewandowsk@samsung.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: m.szyprowski@samsung.com, ben-linux@fluff.org,
thomas.abraham@linaro.org, linux-kernel@vger.kernel.org,
linux-i2c@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
linux-samsung-soc@vger.kernel.org, t.stanislaws@samsung.com,
kyungmin.park@samsung.com, broonie@opensource.wolfsonmicro.com,
"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>
Subject: Re: [PATCH 1/2] i2c-s3c2410: Rework device type handling
Date: Wed, 25 Apr 2012 13:38:55 +0200 [thread overview]
Message-ID: <4F97E24F.5030500@samsung.com> (raw)
In-Reply-To: <20120424144407.GA9007@pengutronix.de>
On 24.04.2012 16:44, Wolfram Sang wrote:
> On Tue, Apr 24, 2012 at 10:40:49AM +0200, Karol Lewandowski wrote:
>> On 23.04.2012 20:20, Wolfram Sang wrote:
>>>> + if (pdev->dev.of_node) {
>>>> + const struct of_device_id *match;
>>>> + match = of_match_node(&s3c24xx_i2c_match, pdev->dev.of_node);
>>>
>>> I'd appreciate a comment explaining why match can't be NULL here (as to
>>> my understanding, it can't). Or just check for it, but this way it looks
>>> a bit fishy and people (hopefully ;)) will ask about it.
>>
>>
>> My understanding is that it can't be null for exactly same reason why
>> platform_get_device_id(pdev) can't be null either (see below).
>>
>> I.e. prerequisite for this code to be run at all (as it's called from
>> driver's .probe()) is to be already matched against very same match
>> table.
>
> Yes, I agree. Yet, this is not obvious and people might try to fix it
> (especially since programs like smatch report it as potentially
> dangerous). Ah, whatever, I could simply apply the fix then :) OK.
Great! I hope it won't cause any problems. :)
Regards,
--
Karol Lewandowski | Samsung Poland R&D Center | Linux/Platform
next prev parent reply other threads:[~2012-04-25 12:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 16:23 [PATCH v4 0/2] i2c-s3c2410: Updates for exynos4210 and DT-based systems Karol Lewandowski
2012-04-23 16:24 ` [PATCH 1/2] i2c-s3c2410: Rework device type handling Karol Lewandowski
2012-04-23 18:20 ` Wolfram Sang
2012-04-24 8:40 ` Karol Lewandowski
2012-04-24 14:44 ` Wolfram Sang
2012-04-25 11:38 ` Karol Lewandowski [this message]
2012-04-23 16:24 ` [PATCH 2/2] i2c-s3c2410: Add HDMIPHY quirk for S3C2440 Karol Lewandowski
-- strict thread matches above, loose matches on Subject: below --
2012-03-09 17:04 [PATCH 0/2] i2c-s3c2410: Updates for exynos4210 and DT-based systems Karol Lewandowski
2012-03-09 17:04 ` [PATCH 1/2] i2c-s3c2410: Rework device type handling Karol Lewandowski
2012-03-12 5:58 ` Thomas Abraham
2012-03-12 13:16 ` Karol Lewandowski
2012-03-12 14:21 ` Thomas Abraham
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=4F97E24F.5030500@samsung.com \
--to=k.lewandowsk@samsung.com \
--cc=ben-linux@fluff.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=kyungmin.park@samsung.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=t.stanislaws@samsung.com \
--cc=thomas.abraham@linaro.org \
--cc=w.sang@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox