lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <TYZPR06MB6568197D19B5855A014A0ECBF1812@TYZPR06MB6568.apcprd06.prod.outlook.com>
Date: Fri, 16 Aug 2024 02:31:43 +0000
From: Jammy Huang <jammy_huang@...eedtech.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, "eajames@...ux.ibm.com"
	<eajames@...ux.ibm.com>, "mchehab@...nel.org" <mchehab@...nel.org>,
	"joel@....id.au" <joel@....id.au>, "andrew@...id.au" <andrew@...id.au>,
	"pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>
CC: "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"openbmc@...ts.ozlabs.org" <openbmc@...ts.ozlabs.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-aspeed@...ts.ozlabs.org"
	<linux-aspeed@...ts.ozlabs.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v4 2/2] media: aspeed: Allow to capture from SoC display
 (GFX)

Hi Krzysztof,

On 2024/8/14 下午 02:09, Krzysztof Kozlowski wrote:
>
> On 14/08/2024 02:54, Jammy Huang wrote:
> > +/*
> > + * Get regmap without checking res, such as clk/reset, that could
> > +lead to
> > + * conflict.
> > + */
> > +static struct regmap *aspeed_regmap_lookup(struct device_node *np,
> > +const char *property) {
> > +   struct device_node *syscon_np __free(device_node) =
> of_parse_phandle(np, property, 0);
> > +   struct regmap *regmap;
>
> Drop. The point of using __free was to make this very simple.
To be simpler, it will looks like this, right.

+       struct device_node *syscon_np __free(device_node) = of_parse_phandle(np, property, 0);
+
+       if (!syscon_np)
+               return ERR_PTR(-ENODEV);
+       return device_node_to_regmap(syscon_np);
>
> > +
> > +   if (!syscon_np)
> > +           return ERR_PTR(-ENODEV);
> > +
> > +   regmap = device_node_to_regmap(syscon_np);
> > +
> > +   return regmap;
> > +}
> > +
> >  static int aspeed_video_init(struct aspeed_video *video)  {
> >     int irq;
> >     int rc;
> >     struct device *dev = video->dev;
> >
> > +   video->scu = aspeed_regmap_lookup(dev->of_node, "aspeed,scu");
> > +   video->gfx = aspeed_regmap_lookup(dev->of_node, "aspeed,gfx");
>
> Still undocumented. Respond to previous comment and confirm that you
> understood it.
Sorry for misunderstanding. I will add document,
Documentation/devicetree/bindings/arm/aspeed/aspeed,video.yaml, later.

>
>
> Best regards,
> Krzysztof

************* Email Confidentiality Notice ********************
免責聲明:
本信件(或其附件)可能包含機密資訊,並受法律保護。如 台端非指定之收件者,請以電子郵件通知本電子郵件之發送者, 並請立即刪除本電子郵件及其附件和銷毀所有複印件。謝謝您的合作!

DISCLAIMER:
This message (and any attachments) may contain legally privileged and/or other confidential information. If you have received it in error, please notify the sender by reply e-mail and immediately delete the e-mail and any attachments without copying or disclosing the contents. Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ