Re: [PATCH v3 1/6] pinctrl: Add pingroup and define PINCTRL_GRP

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

 



On Tue, May 31, 2022 at 07:35:44PM +0530, Basavaraj Natikar wrote:
> On 5/31/2022 2:49 PM, Andy Shevchenko wrote:
> > On Tue, May 31, 2022 at 02:13:17PM +0530, Basavaraj Natikar wrote:

...

> >> +/**
> >> + * struct pingroups - provides information on pingroup
> > Try `make W=1` against each of your patches from the series. Here is the kernel
> > doc issue.
> 
> shall address your comments in my next revision, I tried 'make W=1' could not hit the 
> kernel doc issue. Can you please elaborate a bit.

Hmm...

$ scripts/kernel-doc -none -v include/linux/pinctrl/pinctrl.h
...
include/linux/pinctrl/pinctrl.h:39: warning: expecting prototype for struct pingroups. Prototype was for struct pingroup instead

> >> + * @name: a name for pingroup
> >> + * @pins: an array of pins in the pingroup
> >> + * @npins: number of pins in the pingroup
> >> + */
> >> +struct pingroup {
> >> +	const char *name;
> >> +	const unsigned int *pins;
> >> +	unsigned int npins;
> > size_t probably would be better.
> >
> >> +};

...

> >> +/* Convenience macro to define a single named or anonymous pingroup */
> >> +#define PINCTRL_GRP(_name, _pins, _npins)	\
> > I think PINCTRL_PINGROUP would be more precise.
> >
> >> +((struct pingroup) {				\
> > No need to have space before { and compound literal means that it's not a GCC
> > expression, i.e. drop outer parentheses ().
> >
> >> +	.name = _name,				\
> >> +	.pins = _pins,				\
> >> +	.npins = _npins,			\
> >> +})
> 
> 
> yes, or else I will hit the checkpatch error as below

Does it compile? Does it work? If so, fix checkpatch.

> ERROR: Macros with complex values should be enclosed in parentheses
> 
> #36: FILE: include/linux/pinctrl/pinctrl.h:42:
> 
> +#define PINCTRL_GRP(_name, _pins, _npins)      \
> +(struct pingroup){                             \
> +       .name = _name,                          \
> +       .pins = _pins,                          \
> +       .npins = _npins,                        \
> +}

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux