mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Liu Ying <victor.liu@nxp.com>,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com,
	andrzej.hajda@intel.com, neil.armstrong@linaro.org,
	rfoss@kernel.org, Laurent.pinchart@ideasonboard.com,
	jonas@kwiboo.se, jernej.skrabec@gmail.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch,
	peng.fan@nxp.com
Subject: Re: [PATCH v3 RESEND 2/2] drm/bridge: imx: Add i.MX93 parallel display format configuration support
Date: Fri, 16 Aug 2024 14:24:28 +0200	[thread overview]
Message-ID: <b247a843-0918-4cd1-b6f8-66caca3ecae3@kernel.org> (raw)
In-Reply-To: <613b4eb4-dbac-48a9-bcdd-79b4e94a7b66@nxp.com>

On 16/08/2024 11:44, Liu Ying wrote:
> On 08/16/2024, Krzysztof Kozlowski wrote:
>> On 16/08/2024 10:09, Liu Ying wrote:
>>> NXP i.MX93 mediamix blk-ctrl contains one DISPLAY_MUX register which
>>> configures parallel display format by using the "PARALLEL_DISP_FORMAT"
>>> field. Add a DRM bridge driver to support the display format configuration.
>>>
>>> Signed-off-by: Liu Ying <victor.liu@nxp.com>
>>> ---
>>
>> ...
>>
>>> +
>>> +static int imx93_pdfc_bridge_probe(struct platform_device *pdev)
>>> +{
>>> +	struct device *dev = &pdev->dev;
>>> +	struct imx93_pdfc *pdfc;
>>> +	int ret;
>>> +
>>> +	pdfc = devm_kzalloc(dev, sizeof(*pdfc), GFP_KERNEL);
>>> +	if (!pdfc)
>>> +		return -ENOMEM;
>>> +
>>> +	pdfc->regmap = syscon_node_to_regmap(dev->of_node->parent);
>>> +	if (IS_ERR(pdfc->regmap)) {
>>> +		ret = PTR_ERR(pdfc->regmap);
>>> +		if (ret != -EPROBE_DEFER)
>>> +			DRM_DEV_ERROR(dev, "failed to get regmap: %d\n", ret);
>>> +		return ret;
>>
>> Nope, you just open-coded dev_err_probe. Syntax is - return
>> dev_err_probe(). if you need wrapper for DRM, add such.
> 
> Will use dev_err_probe().
> 
>>
>>> +	}
>>> +
>>> +	pdfc->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0);
>>> +	if (IS_ERR(pdfc->next_bridge)) {
>>> +		ret = PTR_ERR(pdfc->next_bridge);
>>> +		if (ret != -EPROBE_DEFER)
>>> +			DRM_DEV_ERROR(dev, "failed to get next bridge: %d\n", ret);
>>> +		return ret;
>>
>> Ditto
> 
> Will use dev_err_probe().
> 
>>
>>
>>> +	}
>>> +
>>
>> ...
>>
>>> +MODULE_DESCRIPTION("NXP i.MX93 parallel display format configuration driver");
>>> +MODULE_AUTHOR("Liu Ying <victor.liu@nxp.com>");
>>> +MODULE_LICENSE("GPL v2");
>>> +MODULE_ALIAS("platform:" DRIVER_NAME);
>>
>> Which other driver needs this platform alias?
> 
> Quote include/linux/module.h:
> 
> "
> /* For userspace: you can also call me... */                                     
> #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)   
> "
> 
> Anything wrong with using MODULE_ALIAS() here?

Yes, it redundant. Do not answer with question to the question.

Are you adding random code that you cannot justify? It looks like this
if you cannot answer why do you need it.

Form letter:

You should not need MODULE_ALIAS() in normal cases. If you need it,
usually it means your device ID table is wrong (e.g. misses either
entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute
for incomplete ID table.

Best regards,
Krzysztof


      reply	other threads:[~2024-08-16 12:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16  8:09 [PATCH v3 RESEND 0/2] " Liu Ying
2024-08-16  8:09 ` [PATCH v3 RESEND 1/2] dt-bindings: soc: imx93-media-blk-ctrl: Add PDFC subnode to schema and example Liu Ying
2024-08-16  8:09 ` [PATCH v3 RESEND 2/2] drm/bridge: imx: Add i.MX93 parallel display format configuration support Liu Ying
2024-08-16  9:27   ` Krzysztof Kozlowski
2024-08-16  9:44     ` Liu Ying
2024-08-16 12:24       ` Krzysztof Kozlowski [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=b247a843-0918-4cd1-b6f8-66caca3ecae3@kernel.org \
    --to=krzk@kernel.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=victor.liu@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®