lkml.org 
[lkml]   [2024]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Patch v3 2/2] memory: tegra: make sid and broadcast regions optional
From

> On 12/04/2024 15:05, Sumit Gupta wrote:
>> MC SID and Broadbast channel register access is restricted for Guest VM.
>
> Same typo
>
Thank you for catching. Will correct in v4.

>> In Tegra MC driver, consider both the regions as optional and skip
>> access to restricted registers from Guest if a region is not present
>> in Guest DT.
>>
>
> ...
>
>>
>> static inline u32 mc_readl(const struct tegra_mc *mc, unsigned long offset)
>> diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c
>> index 1b3183951bfe..716582255eeb 100644
>> --- a/drivers/memory/tegra/tegra186.c
>> +++ b/drivers/memory/tegra/tegra186.c
>> @@ -26,20 +26,16 @@
>> static int tegra186_mc_probe(struct tegra_mc *mc)
>> {
>> struct platform_device *pdev = to_platform_device(mc->dev);
>> + struct resource *res;
>> unsigned int i;
>> - char name[8];
>> + char name[14];
>
> How is it relevant? I don't see this being used in your diff.
>
>
> Best regards,
> Krzysztof
>

Did this change for below warning coming with 'W=1'.

./drivers/memory/tegra/tegra186.c: In function tegra186_mc_probe:
./drivers/memory/tegra/tegra186.c:51:49: warning: %u directive output
may be truncated writing between 1 and 10 bytes into a region of size 6
[8;;https://gc
c.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-truncation=-Wformat-truncation=8;;]
51 | snprintf(name, sizeof(name), "ch%u", i);
| ^~
./drivers/memory/tegra/tegra186.c:51:46: note: directive argument in
the range [0, 4294967294]
51 | snprintf(name, sizeof(name), "ch%u", i);
| ^~~~~~
./drivers/memory/tegra/tegra186.c:51:17: note: snprintf output between
4 and 13 bytes into a destination of size 8
51 | snprintf(name, sizeof(name), "ch%u", i);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thank you,
Sumit Gupta

\
 
 \ /
  Last update: 2024-05-27 17:56    [W:0.220 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site