Re: [PATCH v2 2/6] soc: sifive: ccache: Rename SiFive L2 cache to Composable cache.

From: Conor.Dooley
Date: Tue Sep 06 2022 - 02:29:38 EST


On 06/09/2022 02:44, Zong Li wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> <Conor.Dooley@xxxxxxxxxxxxx> 於 2022年9月6日 週二 凌晨2:48寫道:
>>
>> Noticed a another thing, sorry..
>>
>> On 05/09/2022 09:31, Zong Li wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> From: Greentime Hu <greentime.hu@xxxxxxxxxx>
>>>
>>> Since composable cache may be L3 cache if pL2 cache exists, we should use
>>> its original name composable cache to prevent confusion.
>>>
>>> Apart from renaming, we also add the compatible "sifive,ccache0" into ID
>>> table.
>>>
>>> Signed-off-by: Greentime Hu <greentime.hu@xxxxxxxxxx>
>>> Signed-off-by: Zong Li <zong.li@xxxxxxxxxx>
>>> ---
>>> drivers/soc/sifive/Kconfig | 6 +-
>>> drivers/soc/sifive/Makefile | 2 +-
>>> .../{sifive_l2_cache.c => sifive_ccache.c} | 163 +++++++++---------
>>> .../{sifive_l2_cache.h => sifive_ccache.h} | 16 +-
>>> 4 files changed, 94 insertions(+), 93 deletions(-)
>>> rename drivers/soc/sifive/{sifive_l2_cache.c => sifive_ccache.c} (35%)
>>> rename include/soc/sifive/{sifive_l2_cache.h => sifive_ccache.h} (12%)
>>>
>>
>>> -static ssize_t l2_write(struct file *file, const char __user *data,
>>> +static ssize_t ccache_write(struct file *file, const char __user *data,
>>> size_t count, loff_t *ppos)
>>
>> You need to fix the alignment here as per checkpatch:
>> CHECK: Alignment should match open parenthesis
>> #112: FILE: drivers/soc/sifive/sifive_ccache.c:53:
>> +static ssize_t ccache_write(struct file *file, const char __user *data,
>> + size_t count, loff_t *ppos)
>>
>
> I'm not sure why I don't see that by checkpatch, but it looks that it
> is actually misalignment there, I would re-check all indents in
> source. Thanks.

You need to pass --strict to checkpatch to see it.

>
>>> {
>>> unsigned int val;
>>> @@ -57,75 +57,76 @@ static ssize_t l2_write(struct file *file, const char __user *data,
>>> if (kstrtouint_from_user(data, count, 0, &val))
>>> return -EINVAL;
>>> if ((val < 0xFF) || (val >= 0x10000 && val < 0x100FF))
>>> - writel(val, l2_base + SIFIVE_L2_ECCINJECTERR);
>>> + writel(val, ccache_base + SIFIVE_CCACHE_ECCINJECTERR);
>>> else
>>> return -EINVAL;
>>> return count;
>>> }
>>>