Re: [PATCH] drm/print: cleanup coding style in drm_print.h

From: Joe Perches
Date: Mon Sep 05 2022 - 06:06:36 EST


On Mon, 2022-09-05 at 11:49 +0300, Jani Nikula wrote:
> On Mon, 05 Sep 2022, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> wrote:
> > On Mon, 05 Sep 2022, Jingyu Wang <jingyuwang_vip@xxxxxxx> wrote:
> > > Fix everything checkpatch.pl complained about in drm_print.h
>
> [...]
>
> > > static inline void
> > > -drm_vprintf(struct drm_printer *p, const char *fmt, va_list *va)
> > > +drm_vprintf(struct drm_printer *p, const char *fmt, va_list * va)
> >
> > Checkpatch is just confused here. Look at all the other params, why
> > would you add an extra space here?
>
> Joe, can you help me out here please, I can't figure out why checkpatch
> is complaining here:
>
> include/drm/drm_print.h:106: CHECK:SPACING: spaces preferred around that '*' (ctx:WxV)
> #106: FILE: include/drm/drm_print.h:106:
> +drm_vprintf(struct drm_printer *p, const char *fmt, va_list *va)

checkpatch doesn't know what a va_list is.

It's similar to the FILE typedef that also causes this output.

A recent link to add an exception for 'FILE' to checkpatch:

https://lore.kernel.org/all/20220902111923.1488671-1-mic@xxxxxxxxxxx/