Re: [PATCH V3 03/20] nvdimm/label: Modify nd_label_base() signature

Neeraj Kumar
2025-09-22T15:53:04Z

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

On 19/09/25 04:34PM, Dave Jiang wrote:
>
>
>On 9/17/25 6:40 AM, Neeraj Kumar wrote:
>> nd_label_base() was being used after typecasting with 'unsigned long'. Thus
>> modified nd_label_base() to return 'unsigned long' instead of 'struct
>> nd_namespace_label *'
>>
>> Signed-off-by: Neeraj Kumar <s.neeraj@samsung.com>
>Reviewed-by: Dave Jiang <dave.jiang@intel.com>
>
>Just a nit below:
>
>
>> ---
>> drivers/nvdimm/label.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> -static struct nd_namespace_label *nd_label_base(struct nvdimm_drvdata *ndd)
>> +static unsigned long nd_label_base(struct nvdimm_drvdata *ndd)
>> {
>> void *base = to_namespace_index(ndd, 0);
>>
>> - return base + 2 * sizeof_namespace_index(ndd);
>> + return (unsigned long) (base + 2 * sizeof_namespace_index(ndd));
>
>Space is not needed between casting and the var. Also applies to other instances in this commit.
>
>DJ

Thanks Jonathan, Ira and Dave for RB tag. Sure, I will fix this in next
patch-set.

Regards,
Neeraj

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]