Re: [PATCH -next] drm/nouveau: uapi: fix kerneldoc warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vegard,

On 12/25/23 09:08, Randy Dunlap wrote:
> 
> 
> On 12/25/23 00:30, Vegard Nossum wrote:
>>
>> On 25/12/2023 08:40, Randy Dunlap wrote:
>>> I do see one thing that I don't like in the generated html output.
>>> It's not a problem with this patch.
>>> The #defines for DRM_NOUVEAU_VM_BIND_OP_MAP etc. have a ';' at the
>>> end of each line:
>>>
>>> struct drm_nouveau_vm_bind_op {
>>>      __u32 op;
>>> #define DRM_NOUVEAU_VM_BIND_OP_MAP 0x0;
>>> #define DRM_NOUVEAU_VM_BIND_OP_UNMAP 0x1;
>>>      __u32 flags;
>>> #define DRM_NOUVEAU_VM_BIND_SPARSE (1 << 8);
>>>      __u32 handle;
>>>      __u32 pad;
>>>      __u64 addr;
>>>      __u64 bo_offset;
>>>      __u64 range;
>>> };
>>
>> Do we actually ever want preprocessor directives to appear inside
>> definitions in the output? If not, I think this should work:
> 
> Not necessarily.
> 
>> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
>> index 3cdc7dba37e3..61425fc9645e 100755
>> --- a/scripts/kernel-doc
>> +++ b/scripts/kernel-doc
>> @@ -1259,6 +1259,8 @@ sub dump_struct($$) {
>>                 $clause =~ s/\s+$//;
>>                 $clause =~ s/\s+/ /;
>>                 next if (!$clause);
>> +               # skip preprocessor directives
>> +               next if $clause =~ m/^#/;
>>                 $level-- if ($clause =~ m/(\})/ && $level > 1);
>>                 if (!($clause =~ m/^\s*#/)) {
>>                         $declaration .= "\t" x $level;
>>
>>
> 
> but that didn't work for me.
> I don't have time to look into it any more today.  :)

I retested this patch. I must have really messed up my testing
in the first round. This now LGTM. Thanks.

Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Tested-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

-- 
#Randy




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux