soc/tegra: Changes for v6.4-rc1

This contains minor fixes and cleanups. Note that one of the patches
 here includes ARM firmware changes, but I picked that up after checking
 with Sudeep and Rob because it didn't seem worth splitting it up any
 further.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmQuvZETHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zocJcD/4rQKJO2d2GWRIF09ACXudgPBWq3nTI
 L0Uny9Fou9ZITiknyDuXTZWeAqdyiThp1Ga9oqokinfbNQZnZRhs2nzghf7lamx+
 L0gjRsNuVjUmIVKHVdGzEhd/x3VW8uuLJMQKQA6ZjtC4WAS+H4IbDqGhIK/N4rTU
 wQS23UcQH3lOB7UghhncOYkZqU81SMI5Asgg/oMsCCALhEPxPpEt6pLcwRNJ6WgH
 cLMQ1+HGuhxijMBrCc680U6lnuK8QlTgUWIqtFO/4d8CFVtfnfjqYPuC6veSilVC
 uie+l64VxYlsDhCrSzILrUrw6LfQAef/YPUezMktm3eCk9dhaNNg+3Ww1sVzTX4c
 WFpYtpsTZ86H68EReXrXeXSE1wr8rXmk9qZJUvV195F3YdHePM1JZFso8j5JR6R0
 I3egea2iK94xxJL7tHrohfK7hJN0O3003ee4JHTMppveHgvvwX5gYzzd4F72zE1E
 7JVYUsKZdTtdc4wOQMSAgXR1FYTD+FVvlMnQivASiboowdk8dmuNoxLNWf+KfUH0
 UTfdDWpODbqQ1jMUj63mZBvk3tNih+avwu4rDzJeFdfqulccXv7MJACEEafUm1rc
 BXl72NK40AEIAdj81Jyjnt9eRvX31pLdgMVayXtu3gGSGvr3w4H5IqVIzkox7P5C
 w0DxKetnzpcwxQ==
 =xTHK
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmQ5RAsACgkQYKtH/8kJ
 UicOVBAAq5+jhbCsNKalqa6GE777b5NxmUK7AjjOuxCYXaOMk60hwEM8xm45tAL3
 meo7/mlVcL6Ai/YArybGbxzXkgtk44hPtsv/SWrtLgBnKDrwZea5ZoXchw4gq8Rp
 k+mxG0dtZI7eei4ACSA95lO2WwrZvu/ecwWq2PpgJXwC7YxuMcOvwuqPZsVcoWio
 22B8BPnOuhMsGXCBl90XymTd0OIYgCg0tgP5UaNLGTPxaKH8ijdBOHmcmUgMlXlE
 sIpaIS45PaC+wGoYEXZmEgyi5PwXLpfY6ieAYFUd/nTMwRnvT2hdSql94QAl96pa
 BIjnIqNOss7h7SJpGKkLX0kuGfmlPtNrmayJW8J2w1bAwpT7yPhNwaSxwdU8hBsU
 O9kyCMCqXJMMKwd3FUiu7gtH1PwhGH4CENiIgw1iEVB+6daRVoEWnhuSsIjs6L9u
 LAaesNGZNKMCr/49KofOGIVztTAqTqxCY1TJW1k25G0u5HeBcm55FqLgfeHcmoNV
 PXR6M171dRGWNfiuMEZRw3wGPPnYLTD9m0wRnzISIu8eRBb3RfZ74aj/b1PT5Kfq
 QENExAPQZu5quWHY06GqLciQ2vkdLxL1hd0oG72snWphoiVyagxooBUh8qqwhLZ5
 fJulOLX5UWMwJZAkAbw0mQZqNjF1Ai89njH3yi8qbzKSwRFb2QQ=
 =3Yhy
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.4-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers

soc/tegra: Changes for v6.4-rc1

This contains minor fixes and cleanups. Note that one of the patches
here includes ARM firmware changes, but I picked that up after checking
with Sudeep and Rob because it didn't seem worth splitting it up any
further.

* tag 'tegra-for-6.4-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: Use of_property_present() for testing DT property presence
  firmware: tegra: bpmp: Fix error paths in debugfs

Link: https://lore.kernel.org/r/20230406124804.970394-3-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2023-04-14 14:16:11 +02:00
commit 871e766df4
3 changed files with 12 additions and 8 deletions

View File

@ -403,7 +403,7 @@ out:
static int setup_shmem(struct device *dev, struct scmi_chan_info *cinfo,
struct scmi_optee_channel *channel)
{
if (of_find_property(cinfo->dev->of_node, "shmem", NULL))
if (of_property_present(cinfo->dev->of_node, "shmem"))
return setup_static_shmem(dev, cinfo, channel);
else
return setup_dynamic_shmem(dev, channel);

View File

@ -193,7 +193,7 @@ static int mrq_debug_read(struct tegra_bpmp *bpmp, const char *name,
},
};
u32 fd = 0, len = 0;
int remaining, err;
int remaining, err, close_err;
mutex_lock(&bpmp_debug_lock);
err = mrq_debug_open(bpmp, name, &fd, &len, 0);
@ -231,7 +231,9 @@ static int mrq_debug_read(struct tegra_bpmp *bpmp, const char *name,
*nbytes = len;
close:
err = mrq_debug_close(bpmp, fd);
close_err = mrq_debug_close(bpmp, fd);
if (!err)
err = close_err;
out:
mutex_unlock(&bpmp_debug_lock);
return err;
@ -319,7 +321,7 @@ static int bpmp_debug_show(struct seq_file *m, void *p)
},
};
u32 fd = 0, len = 0;
int remaining, err;
int remaining, err, close_err;
filename = get_filename(bpmp, file, fnamebuf, sizeof(fnamebuf));
if (!filename)
@ -353,7 +355,9 @@ static int bpmp_debug_show(struct seq_file *m, void *p)
}
close:
err = mrq_debug_close(bpmp, fd);
close_err = mrq_debug_close(bpmp, fd);
if (!err)
err = close_err;
out:
mutex_unlock(&bpmp_debug_lock);
return err;

View File

@ -764,19 +764,19 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
if (err < 0)
goto free_mrq;
if (of_find_property(pdev->dev.of_node, "#clock-cells", NULL)) {
if (of_property_present(pdev->dev.of_node, "#clock-cells")) {
err = tegra_bpmp_init_clocks(bpmp);
if (err < 0)
goto free_mrq;
}
if (of_find_property(pdev->dev.of_node, "#reset-cells", NULL)) {
if (of_property_present(pdev->dev.of_node, "#reset-cells")) {
err = tegra_bpmp_init_resets(bpmp);
if (err < 0)
goto free_mrq;
}
if (of_find_property(pdev->dev.of_node, "#power-domain-cells", NULL)) {
if (of_property_present(pdev->dev.of_node, "#power-domain-cells")) {
err = tegra_bpmp_init_powergates(bpmp);
if (err < 0)
goto free_mrq;