Re: (subset) [PATCH v2] dt-bindings: mfd: qcom,spmi-pmic: Add pbs to SPMI device types

2024-05-02 Thread Lee Jones
On Fri, 12 Apr 2024 16:22:53 +0200, Luca Weiss wrote:
> Add the PBS (Programmable Boot Sequencer) to the list of devices.
> 
> 

Applied, thanks!

[1/1] dt-bindings: mfd: qcom,spmi-pmic: Add pbs to SPMI device types
  commit: a1f3b5edaf18b1c71a537032c4a6537bde2ad5e9

--
Lee Jones [李琼斯]




Re: [PATCH 2/5] mfd: add driver for Marvell 88PM886 PMIC

2024-04-11 Thread Lee Jones
On Thu, 11 Apr 2024, Karel Balej wrote:

> Lee Jones, 2024-04-11T12:37:26+01:00:
> [...]
> > > diff --git a/drivers/mfd/88pm886.c b/drivers/mfd/88pm886.c
> > > new file mode 100644
> > > index ..e06d418a5da9
> > > --- /dev/null
> > > +++ b/drivers/mfd/88pm886.c
> > > @@ -0,0 +1,157 @@
> > > +// SPDX-License-Identifier: GPL-2.0-only
> > > +#include 
> > > +#include 
> > > +#include 
> > > +#include 
> > > +#include 
> > > +#include 
> > > +#include 
> > > +
> > > +#include 
> > > +
> > > +#define PM886_REG_INT_STATUS10x05
> > > +
> > > +#define PM886_REG_INT_ENA_1  0x0a
> > > +#define PM886_INT_ENA1_ONKEY BIT(0)
> > > +
> > > +#define PM886_IRQ_ONKEY  0
> > > +
> > > +#define PM886_REGMAP_CONF_MAX_REG0xef
> >
> > Why have you split the defines up between here and the header?
> 
> I tried to keep defines tied to the code which uses them and only put
> defines needed in multiple places in the header. With the exception of
> closely related things, such as register bits which I am keeping
> together with the respective register definitions for clarity. Does that
> not make sense?

It makes sense and it's a nice thought, but I think it's nicer to keep
them all together, rather than have to worry about which ones are and
which ones are not used here or there.  Also, there will be holes in the
definitions, etc.

> > Please place them all in the header.
> 
> Would you then also have me move all the definitions from the regulators
> driver there?

I think it would be nice to have them all nice and contiguous.

So, yes.

> [...]
> 
> > > + err = devm_mfd_add_devices(dev, 0, pm886_devs, ARRAY_SIZE(pm886_devs),
> >
> > Why 0?
> 
> PLATFORM_DEVID_AUTO then? Or will PLATFORM_DEVID_NONE suffice since the
> cells all have different names now (it would probably cause problems
> though if the driver was used multiple times for some reason, wouldn't
> it?)?

You tell me.  Please try and understand the code you author. :)

-- 
Lee Jones [李琼斯]



Re: [PATCH 2/5] mfd: add driver for Marvell 88PM886 PMIC

2024-04-11 Thread Lee Jones
 voltage regulators, RTC and
> battery-charger under the corresponding menus.
>  
> +config MFD_88PM886_PMIC
> + bool "Marvell 88PM886 PMIC"
> + depends on I2C=y
> + depends on OF
> + select REGMAP_I2C
> + select REGMAP_IRQ
> + select MFD_CORE
> + help
> +   This enables support for Marvell 88PM886 Power Management IC.
> +   This includes the I2C driver and the core APIs _only_, you have to
> +   select individual components like onkey under the corresponding menus.
> +
>  config MFD_MAX14577
>   tristate "Maxim Semiconductor MAX14577/77836 MUIC + Charger Support"
>   depends on I2C
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index c66f07edcd0e..d016b7fed354 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -7,6 +7,7 @@
>  obj-$(CONFIG_MFD_88PM860X)   += 88pm860x.o
>  obj-$(CONFIG_MFD_88PM800)+= 88pm800.o 88pm80x.o
>  obj-$(CONFIG_MFD_88PM805)+= 88pm805.o 88pm80x.o
> +obj-$(CONFIG_MFD_88PM886_PMIC)   += 88pm886.o
>  obj-$(CONFIG_MFD_ACT8945A)   += act8945a.o
>  obj-$(CONFIG_MFD_SM501)  += sm501.o
>  obj-$(CONFIG_ARCH_BCM2835)   += bcm2835-pm.o
> diff --git a/include/linux/mfd/88pm886.h b/include/linux/mfd/88pm886.h
> new file mode 100644
> index ..5ce30a3b85aa
> --- /dev/null
> +++ b/include/linux/mfd/88pm886.h
> @@ -0,0 +1,30 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __MFD_88PM886_H
> +#define __MFD_88PM886_H
> +
> +#include 
> +#include 
> +
> +#define PM886_A1_CHIP_ID 0xa1
> +
> +#define PM886_REG_ID 0x00
> +
> +#define PM886_REG_STATUS10x01
> +#define PM886_ONKEY_STS1 BIT(0)
> +
> +#define PM886_REG_MISC_CONFIG1   0x14
> +#define PM886_SW_PDOWN   BIT(5)
> +
> +#define PM886_REG_MISC_CONFIG2   0x15
> +#define PM886_INT_INVBIT(0)
> +#define PM886_INT_CLEAR  BIT(1)
> +#define PM886_INT_RC 0x00
> +#define PM886_INT_WC BIT(1)
> +#define PM886_INT_MASK_MODE  BIT(2)
> +
> +struct pm886_chip {
> + struct i2c_client *client;
> + unsigned int chip_id;
> + struct regmap *regmap;
> +};
> +#endif /* __MFD_88PM886_H */
> -- 
> 2.44.0
> 

-- 
Lee Jones [李琼斯]



Re: [RFC PATCH v4 2/5] mfd: add driver for Marvell 88PM886 PMIC

2024-03-21 Thread Lee Jones
On Thu, 21 Mar 2024, Karel Balej wrote:

> Lee Jones, 2024-03-21T15:42:11+00:00:
> > On Mon, 11 Mar 2024, Karel Balej wrote:
> >
> > > From: Karel Balej 
> > > 
> > > Marvell 88PM886 is a PMIC which provides various functions such as
> > > onkey, battery, charger and regulators. It is found for instance in the
> > > samsung,coreprimevelte smartphone with which this was tested. Implement
> > > basic support to allow for the use of regulators and onkey.
> > > 
> > > Signed-off-by: Karel Balej 
> > > ---
> > > 
> > > Notes:
> > > RFC v4:
> > > - Use MFD_CELL_* macros.
> > > - Address Lee's feedback:
> > >   - Do not define regmap_config.val_bits and .reg_bits.
> > >   - Drop everything regulator related except mfd_cell (regmap
> > > initialization, IDs enum etc.). Drop pm886_initialize_subregmaps.
> > >   - Do not store regmap pointers as an array as there is now only one
> > > regmap. Also drop the corresponding enum.
> > >   - Move regmap_config to the header as it is needed in the regulators
> > > driver.
> > >   - pm886_chip.whoami -> chip_id
> > >   - Reword chip ID mismatch error message and print the ID as
> > > hexadecimal.
> > >   - Fix includes in include/linux/88pm886.h.
> > >   - Drop the pm886_irq_number enum and define the (for the moment) 
> > > only
> > > IRQ explicitly.
> > > - Have only one MFD cell for all regulators as they are now registered
> > >   all at once in the regulators driver.
> > > - Reword commit message.
> > > - Make device table static and remove comma after the sentinel to 
> > > signal
> > >   that nothing should come after it.
> > > RFC v3:
> > > - Drop onkey cell .of_compatible.
> > > - Rename LDO page offset and regmap to REGULATORS.
> > > RFC v2:
> > > - Remove some abstraction.
> > > - Sort includes alphabetically and add linux/of.h.
> > > - Depend on OF, remove of_match_ptr and add MODULE_DEVICE_TABLE.
> > > - Use more temporaries and break long lines.
> > > - Do not initialize ret in probe.
> > > - Use the wakeup-source DT property.
> > > - Rename ret to err.
> > > - Address Lee's comments:
> > >   - Drop patched in presets for base regmap and related defines.
> > >   - Use full sentences in comments.
> > >   - Remove IRQ comment.
> > >   - Define regmap_config member values.
> > >   - Rename data to sys_off_data.
> > >   - Add _PMIC suffix to Kconfig.
> > >   - Use dev_err_probe.
> > >   - Do not store irq_data.
> > >   - s/WHOAMI/CHIP_ID
> > >   - Drop LINUX part of include guard name.
> > >   - Merge in the regulator series modifications in order to have more
> > > devices and modify the commit message accordingly. Changes with
> > > respect to the original regulator series patches:
> > > - ret -> err
> > > - Add temporary for dev in pm88x_initialize_subregmaps.
> > > - Drop of_compatible for the regulators.
> > > - Do not duplicate LDO regmap for bucks.
> > > - Rewrite commit message.
> > > 
> > >  drivers/mfd/88pm886.c   | 149 
> > >  drivers/mfd/Kconfig |  12 +++
> > >  drivers/mfd/Makefile|   1 +
> > >  include/linux/mfd/88pm886.h |  38 +
> > >  4 files changed, 200 insertions(+)
> > >  create mode 100644 drivers/mfd/88pm886.c
> > >  create mode 100644 include/linux/mfd/88pm886.h
> >
> > Looks mostly okay.
> >
> > > diff --git a/include/linux/mfd/88pm886.h b/include/linux/mfd/88pm886.h
> > > new file mode 100644
> > > index ..a5e6524bb19d
> > > --- /dev/null
> > > +++ b/include/linux/mfd/88pm886.h
> > > @@ -0,0 +1,38 @@
> > > +/* SPDX-License-Identifier: GPL-2.0-only */
> > > +#ifndef __MFD_88PM886_H
> > > +#define __MFD_88PM886_H
> > > +
> > > +#include 
> > > +#include 
> > > +
> > > +#define PM886_A1_CHIP_ID 0xa1
> > > +
> > > +#define PM886_REGMAP_CONF_MAX_REG0xfe
> > > +
> > > +#define PM886_REG_ID 0x00
> > > +
> > > +#define PM886_REG_STA

Re: [RFC PATCH v4 2/5] mfd: add driver for Marvell 88PM886 PMIC

2024-03-21 Thread Lee Jones
On Mon, 11 Mar 2024, Karel Balej wrote:

> From: Karel Balej 
> 
> Marvell 88PM886 is a PMIC which provides various functions such as
> onkey, battery, charger and regulators. It is found for instance in the
> samsung,coreprimevelte smartphone with which this was tested. Implement
> basic support to allow for the use of regulators and onkey.
> 
> Signed-off-by: Karel Balej 
> ---
> 
> Notes:
> RFC v4:
> - Use MFD_CELL_* macros.
> - Address Lee's feedback:
>   - Do not define regmap_config.val_bits and .reg_bits.
>   - Drop everything regulator related except mfd_cell (regmap
> initialization, IDs enum etc.). Drop pm886_initialize_subregmaps.
>   - Do not store regmap pointers as an array as there is now only one
> regmap. Also drop the corresponding enum.
>   - Move regmap_config to the header as it is needed in the regulators
> driver.
>   - pm886_chip.whoami -> chip_id
>   - Reword chip ID mismatch error message and print the ID as
> hexadecimal.
>   - Fix includes in include/linux/88pm886.h.
>   - Drop the pm886_irq_number enum and define the (for the moment) only
> IRQ explicitly.
> - Have only one MFD cell for all regulators as they are now registered
>   all at once in the regulators driver.
> - Reword commit message.
> - Make device table static and remove comma after the sentinel to signal
>   that nothing should come after it.
> RFC v3:
> - Drop onkey cell .of_compatible.
> - Rename LDO page offset and regmap to REGULATORS.
> RFC v2:
> - Remove some abstraction.
> - Sort includes alphabetically and add linux/of.h.
> - Depend on OF, remove of_match_ptr and add MODULE_DEVICE_TABLE.
> - Use more temporaries and break long lines.
> - Do not initialize ret in probe.
> - Use the wakeup-source DT property.
> - Rename ret to err.
> - Address Lee's comments:
>   - Drop patched in presets for base regmap and related defines.
>   - Use full sentences in comments.
>   - Remove IRQ comment.
>   - Define regmap_config member values.
>   - Rename data to sys_off_data.
>   - Add _PMIC suffix to Kconfig.
>   - Use dev_err_probe.
>   - Do not store irq_data.
>   - s/WHOAMI/CHIP_ID
>   - Drop LINUX part of include guard name.
>   - Merge in the regulator series modifications in order to have more
> devices and modify the commit message accordingly. Changes with
> respect to the original regulator series patches:
> - ret -> err
> - Add temporary for dev in pm88x_initialize_subregmaps.
> - Drop of_compatible for the regulators.
> - Do not duplicate LDO regmap for bucks.
> - Rewrite commit message.
> 
>  drivers/mfd/88pm886.c   | 149 
>  drivers/mfd/Kconfig |  12 +++
>  drivers/mfd/Makefile|   1 +
>  include/linux/mfd/88pm886.h |  38 +
>  4 files changed, 200 insertions(+)
>  create mode 100644 drivers/mfd/88pm886.c
>  create mode 100644 include/linux/mfd/88pm886.h

Looks mostly okay.

> diff --git a/include/linux/mfd/88pm886.h b/include/linux/mfd/88pm886.h
> new file mode 100644
> index ..a5e6524bb19d
> --- /dev/null
> +++ b/include/linux/mfd/88pm886.h
> @@ -0,0 +1,38 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __MFD_88PM886_H
> +#define __MFD_88PM886_H
> +
> +#include 
> +#include 
> +
> +#define PM886_A1_CHIP_ID 0xa1
> +
> +#define PM886_REGMAP_CONF_MAX_REG0xfe
> +
> +#define PM886_REG_ID 0x00
> +
> +#define PM886_REG_STATUS10x01
> +#define PM886_ONKEY_STS1 BIT(0)
> +
> +#define PM886_REG_MISC_CONFIG1   0x14
> +#define PM886_SW_PDOWN   BIT(5)
> +
> +#define PM886_REG_MISC_CONFIG2   0x15
> +#define PM886_INT_INVBIT(0)
> +#define PM886_INT_CLEAR  BIT(1)
> +#define PM886_INT_RC 0x00
> +#define PM886_INT_WC BIT(1)
> +#define PM886_INT_MASK_MODE  BIT(2)
> +
> +struct pm886_chip {
> + struct i2c_client *client;
> + unsigned int chip_id;
> + struct regmap *regmap;
> +};
> +
> +static const struct regmap_config pm886_i2c_regmap = {
> + .reg_bits = 8,
> + .val_bits = 8,
> + .max_register = PM886_REGMAP_CONF_MAX_REG,
> +};

Why is this in here?

> +#endif /* __MFD_88PM886_H */

What would you like me to do with this RFC patch?

-- 
Lee Jones [李琼斯]



Re: [RFC PATCH v3 2/5] mfd: add driver for Marvell 88PM886 PMIC

2024-03-07 Thread Lee Jones
> > > +static int pm886_initialize_subregmaps(struct pm886_chip *chip)
> > > +{
> > > + struct device *dev = >client->dev;
> > > + struct i2c_client *page;
> > > + struct regmap *regmap;
> > > + int err;
> > > +
> > > + /* regulators page */
> > > + page = devm_i2c_new_dummy_device(dev, chip->client->adapter,
> > > + chip->client->addr + 
> > > PM886_PAGE_OFFSET_REGULATORS);
> > > + if (IS_ERR(page)) {
> > > + err = PTR_ERR(page);
> > > + dev_err(dev, "Failed to initialize regulators client: %d\n", 
> > > err);
> > > + return err;
> > > + }
> > > + regmap = devm_regmap_init_i2c(page, _i2c_regmap);
> > > + if (IS_ERR(regmap)) {
> > > + err = PTR_ERR(regmap);
> > > + dev_err(dev, "Failed to initialize regulators regmap: %d\n", 
> > > err);
> > > + return err;
> > > + }
> > > + chip->regmaps[PM886_REGMAP_REGULATORS] = regmap;
> >
> > Except for the regulator driver, where else is the regulators regmap used?
> 
> Nowhere, at least as of now. So you are saying that I should initialize
> the regmap in the regulator driver?

I am.

-- 
Lee Jones [李琼斯]



Re: [RFC PATCH v3 2/5] mfd: add driver for Marvell 88PM886 PMIC

2024-03-05 Thread Lee Jones
 chip);
> + if (err)
> + return dev_err_probe(dev, err, "Failed to register power off 
> handler\n");
> +
> + device_init_wakeup(dev, device_property_read_bool(dev, 
> "wakeup-source"));
> +
> + return 0;
> +}
> +
> +const struct of_device_id pm886_of_match[] = {
> + { .compatible = "marvell,88pm886-a1", .data = (void *)PM886_A1_CHIP_ID 
> },
> + { },
> +};
> +MODULE_DEVICE_TABLE(of, pm886_of_match);
> +
> +static struct i2c_driver pm886_i2c_driver = {
> + .driver = {
> + .name = "88pm886",
> + .of_match_table = pm886_of_match,
> + },
> + .probe = pm886_probe,
> +};
> +module_i2c_driver(pm886_i2c_driver);
> +
> +MODULE_DESCRIPTION("Marvell 88PM886 PMIC driver");
> +MODULE_AUTHOR("Karel Balej ");
> +MODULE_LICENSE("GPL");
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index e7a6e45b9fac..9ef921c59f30 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -794,6 +794,18 @@ config MFD_88PM860X
> select individual components like voltage regulators, RTC and
> battery-charger under the corresponding menus.
>  
> +config MFD_88PM886_PMIC
> + bool "Marvell 88PM886 PMIC"
> + depends on I2C=y
> + depends on OF
> + select REGMAP_I2C
> + select REGMAP_IRQ
> + select MFD_CORE
> + help
> +   This enables support for Marvell 88PM886 Power Management IC.
> +   This includes the I2C driver and the core APIs _only_, you have to
> +   select individual components like onkey under the corresponding menus.
> +
>  config MFD_MAX14577
>   tristate "Maxim Semiconductor MAX14577/77836 MUIC + Charger Support"
>   depends on I2C
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index c66f07edcd0e..d016b7fed354 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -7,6 +7,7 @@
>  obj-$(CONFIG_MFD_88PM860X)   += 88pm860x.o
>  obj-$(CONFIG_MFD_88PM800)+= 88pm800.o 88pm80x.o
>  obj-$(CONFIG_MFD_88PM805)+= 88pm805.o 88pm80x.o
> +obj-$(CONFIG_MFD_88PM886_PMIC)   += 88pm886.o
>  obj-$(CONFIG_MFD_ACT8945A)   += act8945a.o
>  obj-$(CONFIG_MFD_SM501)  += sm501.o
>  obj-$(CONFIG_ARCH_BCM2835)   += bcm2835-pm.o
> diff --git a/include/linux/mfd/88pm886.h b/include/linux/mfd/88pm886.h
> new file mode 100644
> index ..c7527bab0fba
> --- /dev/null
> +++ b/include/linux/mfd/88pm886.h
> @@ -0,0 +1,46 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __MFD_88PM886_H
> +#define __MFD_88PM886_H
> +
> +#include 

What's this for?

> +#define PM886_A1_CHIP_ID 0xa1
> +
> +#define PM886_REG_ID 0x00
> +
> +#define PM886_REG_STATUS10x01
> +#define PM886_ONKEY_STS1 BIT(0)
> +
> +#define PM886_REG_MISC_CONFIG1   0x14
> +#define PM886_SW_PDOWN   BIT(5)
> +
> +#define PM886_REG_MISC_CONFIG2   0x15
> +#define PM886_INT_INVBIT(0)
> +#define PM886_INT_CLEAR  BIT(1)
> +#define PM886_INT_RC 0x00
> +#define PM886_INT_WC BIT(1)
> +#define PM886_INT_MASK_MODE  BIT(2)
> +
> +#define PM886_PAGE_OFFSET_REGULATORS 1
> +
> +enum pm886_regulator_id {
> + PM886_REGULATOR_ID_LDO2,
> + PM886_REGULATOR_ID_LDO15,
> + PM886_REGULATOR_ID_BUCK2,
> +
> + PM886_REGULATOR_ID_SENTINEL
> +};
> +
> +enum pm886_regmap_index {
> + PM886_REGMAP_BASE,
> + PM886_REGMAP_REGULATORS,
> +
> + PM886_REGMAP_NR
> +};
> +
> +struct pm886_chip {
> + struct i2c_client *client;
> + unsigned int whoami;

chip_id

> + struct regmap *regmaps[PM886_REGMAP_NR];
> +};
> +#endif /* __MFD_88PM886_H */
> -- 
> 2.44.0
> 

-- 
Lee Jones [李琼斯]



Re: (subset) [PATCH v5] leds: qcom-lpg: Add PM660L configuration and compatible

2024-02-08 Thread Lee Jones
On Sun, 04 Feb 2024 18:24:20 +0100, Marijn Suijten wrote:
> Inherit PM660L PMIC LPG/triled block configuration from downstream
> drivers and DT sources, consisting of a triled block with automatic
> trickle charge control and source selection, three colored led channels
> belonging to the synchronized triled block and one loose PWM channel.
> 
> 

Applied, thanks!

[1/1] leds: qcom-lpg: Add PM660L configuration and compatible
  commit: 0e848bb4630e12099636fde050cadad33221045f

--
Lee Jones [李琼斯]




Re: [RFC PATCH 2/5] mfd: add 88pm88x driver

2024-02-02 Thread Lee Jones
Linus,

On Fri, 02 Feb 2024, Karel Balej wrote:

> Lee Jones, 2024-02-02T12:45:50+00:00:
> > On Thu, 01 Feb 2024, Karel Balej wrote:
> >
> > > Lee Jones, 2024-01-31T11:03:11+00:00:
> > > > On Sun, 28 Jan 2024, Karel Balej wrote:
> > > > > > > + /* GPIO1: DVC, GPIO0: input */
> > > > > > > + REG_SEQ0(PM88X_REG_GPIO_CTRL1, 0x40),

Do we have a precedent for drivers setting up their own pins like this?

> > > > > > Shouldn't you set these up using Pintrl?
> > > > > 
> > > > > You mean to add a new MFD cell for the pins and write the respective
> > > > > driver? The downstream implementation has no such thing so I'm not 
> > > > > sure
> > > > > if I would be able to do that from scratch.
> > > >
> > > > This is not a Pinctrl driver.
> > > >
> > > > Isn't there a generic API you can use?
> > > 
> > > I'm sorry, I don't think I understand what you mean.
> >
> > Perhaps I misunderstand the code.  It looks like this regmap patch hack
> > is configuring pins and a bunch of other things.  Would that be a
> > correct assessment?
> 
> Yes, that sounds correct.
> 
> > If so, where do we draw the line here?  Do we accept a 1000 line driver
> > which configures a large SoC with a bunch of bespoke register writes?
> 
> I understand, I just don't know what you mean by "a generic API". I'm
> also not clear on whether what you have in mind is simply adding a
> dedicated driver for the pins as a new subdevice of this MFD.

-- 
Lee Jones [李琼斯]



Re: [RFC PATCH 2/5] mfd: add 88pm88x driver

2024-02-02 Thread Lee Jones
On Thu, 01 Feb 2024, Karel Balej wrote:

> Lee Jones, 2024-01-31T11:03:11+00:00:
> > On Sun, 28 Jan 2024, Karel Balej wrote:
> > > > > + /* GPIO1: DVC, GPIO0: input */
> > > > > + REG_SEQ0(PM88X_REG_GPIO_CTRL1, 0x40),
> > > >
> > > > Shouldn't you set these up using Pintrl?
> > > 
> > > You mean to add a new MFD cell for the pins and write the respective
> > > driver? The downstream implementation has no such thing so I'm not sure
> > > if I would be able to do that from scratch.
> >
> > This is not a Pinctrl driver.
> >
> > Isn't there a generic API you can use?
> 
> I'm sorry, I don't think I understand what you mean.

Perhaps I misunderstand the code.  It looks like this regmap patch hack
is configuring pins and a bunch of other things.  Would that be a
correct assessment?

If so, where do we draw the line here?  Do we accept a 1000 line driver
which configures a large SoC with a bunch of bespoke register writes?

-- 
Lee Jones [李琼斯]



Re: [RFC PATCH 2/5] mfd: add 88pm88x driver

2024-01-31 Thread Lee Jones
On Sun, 28 Jan 2024, Karel Balej wrote:
> > > + /* GPIO1: DVC, GPIO0: input */
> > > + REG_SEQ0(PM88X_REG_GPIO_CTRL1, 0x40),
> >
> > Shouldn't you set these up using Pintrl?
> 
> You mean to add a new MFD cell for the pins and write the respective
> driver? The downstream implementation has no such thing so I'm not sure
> if I would be able to do that from scratch.

This is not a Pinctrl driver.

Isn't there a generic API you can use?

> > > + /* GPIO2: input */
> > > + REG_SEQ0(PM88X_REG_GPIO_CTRL2, 0x00),
> > > + /* DVC2, DVC1 */
> >
> > Please unify all of the comments.
> >
> > They all use a different structure.
> >
> > > + REG_SEQ0(PM88X_REG_GPIO_CTRL3, 0x44),
> > > + /* GPIO5V_1:input, GPIO5V_2: input */
> > > + REG_SEQ0(PM88X_REG_GPIO_CTRL4, 0x00),
> > > + /* output 32 kHz from XO */
> > > + REG_SEQ0(PM88X_REG_AON_CTRL2, 0x2a),
> > > + /* OSC_FREERUN = 1, to lock FLL */
> > > + REG_SEQ0(PM88X_REG_BK_OSC_CTRL1, 0x0f),
> > > + /* XO_LJ = 1, enable low jitter for 32 kHz */
> > > + REG_SEQ0(PM88X_REG_LOWPOWER2, 0x20),
> > > + /* OV_VSYS and UV_VSYS1 comparators on VSYS disabled, VSYS_OVER_TH : 
> > > 5.6V */
> > > + REG_SEQ0(PM88X_REG_LOWPOWER4, 0xc8),
> > > + /* set the duty cycle of charger DC/DC to max */
> > > + REG_SEQ0(PM88X_REG_BK_OSC_CTRL3, 0xc0),
> >
> > These all looks like they should be handled in their respective drivers?
> >
> > "patch"ing these in seems like a hack.
> 
> To be honest, I don't really know why these are required and what effect
> they have -- the comments above taken from the downstream version are
> the only thing I have to go by. I might try removing them to see if
> there is any noticable change and whether they could be added only later
> with the respective drivers.

If you don't know that they are or what they do and you haven't tested
them, they should not be submitted upstream.

> > > +static struct mfd_cell pm88x_devs[] = {
> > > + {
> > > + .name = "88pm88x-onkey",
> > > + .num_resources = ARRAY_SIZE(onkey_resources),
> > > + .resources = onkey_resources,
> > > + .id = -1,
> > > + },
> > > +};
> >
> > It's not an MFD if it only supports a single device.
> 
> As I have noted above with respect to the IRQ enum and also in the
> commit message, I have so far only added the parts which there is
> already use for. I intend to add the other parts along with the
> respective subdevice drivers, please see my regulator series [1] for an
> example.
> 
> I thought this approach would make for shorter and simpler patches and
> also would allow me to make more informed decisions as I familiarize
> myself with the downstream subdevice drivers more closely one by one.

One device doesn't warrant an MFD.  Please add more devices.

-- 
Lee Jones [李琼斯]



Re: [RFC PATCH 2/5] mfd: add 88pm88x driver

2024-01-25 Thread Lee Jones
nding menus.
>  
> +config MFD_88PM88X

"MFD_88PM88X_PMIC"?

> + bool "Marvell 88PM886"

"Marvell 88PM886 PMIC"?

> + depends on I2C=y
> + select REGMAP_I2C
> + select REGMAP_IRQ
> + select MFD_CORE
> + help
> +   This enables support for Marvell 88PM886 Power Management IC.
> +   This includes the I2C driver and the core APIs _only_, you have to
> +   select individual components like onkey under the corresponding menus.
> +
>  config MFD_MAX14577
>   tristate "Maxim Semiconductor MAX14577/77836 MUIC + Charger Support"
>   depends on I2C
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index c66f07edcd0e..14e42b045c92 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -7,6 +7,7 @@
>  obj-$(CONFIG_MFD_88PM860X)   += 88pm860x.o
>  obj-$(CONFIG_MFD_88PM800)+= 88pm800.o 88pm80x.o
>  obj-$(CONFIG_MFD_88PM805)+= 88pm805.o 88pm80x.o
> +obj-$(CONFIG_MFD_88PM88X)+= 88pm88x.o
>  obj-$(CONFIG_MFD_ACT8945A)   += act8945a.o
>  obj-$(CONFIG_MFD_SM501)  += sm501.o
>  obj-$(CONFIG_ARCH_BCM2835)   += bcm2835-pm.o
> diff --git a/include/linux/mfd/88pm88x.h b/include/linux/mfd/88pm88x.h
> new file mode 100644
> index ..a34c57447827
> --- /dev/null
> +++ b/include/linux/mfd/88pm88x.h
> @@ -0,0 +1,60 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __LINUX_MFD_88PM88X_H
> +#define __LINUX_MFD_88PM88X_H

Drop the LINUX part.

> +
> +#include 
> +
> +#define PM886_A1_WHOAMI  0xa1

s/WHOAMI/CHIP_ID/

> +#define PM88X_REG_ID 0x00
> +
> +#define PM88X_REG_STATUS10x01
> +#define PM88X_ONKEY_STS1 BIT(0)
> +
> +#define PM88X_REG_MISC_CONFIG1   0x14
> +#define PM88X_SW_PDOWN   BIT(5)
> +
> +#define PM88X_REG_MISC_CONFIG2   0x15
> +#define PM88X_INT_INVBIT(0)
> +#define PM88X_INT_CLEAR  BIT(1)
> +#define PM88X_INT_RC 0x00
> +#define PM88X_INT_WC BIT(1)
> +#define PM88X_INT_MASK_MODE  BIT(2)
> +
> +#define PM88X_REG_WDOG   0x1d
> +
> +#define PM88X_REG_LOWPOWER2  0x21
> +#define PM88X_REG_LOWPOWER4  0x23
> +
> +#define PM88X_REG_GPIO_CTRL1 0x30

These don't really need to be spaced out, do they?

> +#define PM88X_REG_GPIO_CTRL2 0x31
> +
> +#define PM88X_REG_GPIO_CTRL3 0x32
> +
> +#define PM88X_REG_GPIO_CTRL4 0x33
> +
> +#define PM88X_REG_BK_OSC_CTRL1   0x50
> +#define PM88X_REG_BK_OSC_CTRL3   0x52
> +
> +#define PM88X_REG_AON_CTRL2  0xe2
> +
> +enum pm88x_regmap_index {
> + PM88X_REGMAP_BASE,
> +
> + PM88X_REGMAP_NR
> +};
> +
> +struct pm88x_data {
> + unsigned int whoami;
> + struct reg_sequence *presets;
> + unsigned int num_presets;
> +};
> +
> +struct pm88x_chip {
> + struct i2c_client *client;
> + struct regmap_irq_chip_data *irq_data;

Group this with the other regmap related member(s).

What are you using this for?

> + const struct pm88x_data *data;

Remove this.

> + struct regmap *regmaps[PM88X_REGMAP_NR];
> +};
> +#endif /* __LINUX_MFD_88PM88X_H */
> -- 
> 2.43.0
> 

-- 
9)
4)
Lee Jones [李琼斯]



Re: [RFC PATCH 1/5] mfd: 88pm88x: differences with respect to the PMIC RFC series

2024-01-11 Thread Lee Jones
On Thu, 11 Jan 2024, Karel Balej wrote:

> On Thu Jan 11, 2024 at 4:25 PM CET, Lee Jones wrote:
> 
> [...]
> 
> > > > > diff --git a/include/linux/mfd/88pm88x.h b/include/linux/mfd/88pm88x.h
> > > > > index a34c57447827..9a335f6b9c07 100644
> > > > > --- a/include/linux/mfd/88pm88x.h
> > > > > +++ b/include/linux/mfd/88pm88x.h
> > > > > @@ -49,6 +49,8 @@ struct pm88x_data {
> > > > >   unsigned int whoami;
> > > > >   struct reg_sequence *presets;
> > > > >   unsigned int num_presets;
> > > > > + struct mfd_cell *devs;
> > > > > + unsigned int num_devs;
> > > >
> > > > Why are you adding extra abstraction?
> > > 
> > > Right, this is probably not necessary now since I'm only implementing
> > > support for one of the chips - it's just that I keep thinking about it
> > > as a driver for both of them and thus tend to write it a bit more
> > > abstractly. Shall I then drop this and also the `presets` member which
> > > is also chip-specific?
> >
> > Even if you were to support multiple devices, this strategy is unusual
> > and isn't likely to be accepted.
> 
> May I please ask what the recommended strategy is then? `switch`ing on
> the chip ID? I have taken this approach because it seemed to produce a
> cleaner/more straightforward code in comparison to that. Or are you only
> talking about the chip cells/subdevices in particular?

I'd have to see the implementation, but the general exception I'm taking
here is storing the use-once MFD cell data inside a data structure.  If
you were to match on device ID it's *sometimes* acceptable to store the
pointers in local variables.

-- 
Lee Jones [李琼斯]



Re: [RFC PATCH 1/5] mfd: 88pm88x: differences with respect to the PMIC RFC series

2024-01-11 Thread Lee Jones
On Thu, 11 Jan 2024, Karel Balej wrote:

> Lee,
> 
> On Thu Jan 11, 2024 at 11:54 AM CET, Lee Jones wrote:
> > The subject needs work.  Please tell us what the patches is doing.
> >
> > On Thu, 28 Dec 2023, Karel Balej wrote:
> >
> > > From: Karel Balej 
> >
> > A full an complete commit message is a must.
> 
> I have not provided a detailed description here because as I have noted
> in the cover letter, this patch will be squashed into the MFD series. I
> sent it only as a bridge between the two series, sorry for the
> confusion.
> 
> > > diff --git a/include/linux/mfd/88pm88x.h b/include/linux/mfd/88pm88x.h
> > > index a34c57447827..9a335f6b9c07 100644
> > > --- a/include/linux/mfd/88pm88x.h
> > > +++ b/include/linux/mfd/88pm88x.h
> > > @@ -49,6 +49,8 @@ struct pm88x_data {
> > >   unsigned int whoami;
> > >   struct reg_sequence *presets;
> > >   unsigned int num_presets;
> > > + struct mfd_cell *devs;
> > > + unsigned int num_devs;
> >
> > Why are you adding extra abstraction?
> 
> Right, this is probably not necessary now since I'm only implementing
> support for one of the chips - it's just that I keep thinking about it
> as a driver for both of them and thus tend to write it a bit more
> abstractly. Shall I then drop this and also the `presets` member which
> is also chip-specific?

Even if you were to support multiple devices, this strategy is unusual
and isn't likely to be accepted.

With respect to the other variables, you are in a better position to
know if they are still required.  By the sounds of it, I'd suggest it
might be better to remove them.

-- 
Lee Jones [李琼斯]



Re: [RFC PATCH 1/5] mfd: 88pm88x: differences with respect to the PMIC RFC series

2024-01-11 Thread Lee Jones
The subject needs work.  Please tell us what the patches is doing.

On Thu, 28 Dec 2023, Karel Balej wrote:

> From: Karel Balej 

A full an complete commit message is a must.

> Signed-off-by: Karel Balej 
> ---
>  drivers/mfd/88pm88x.c   | 14 --
>  include/linux/mfd/88pm88x.h |  2 ++
>  2 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mfd/88pm88x.c b/drivers/mfd/88pm88x.c
> index 5db6c65b667d..3424d88a58f6 100644
> --- a/drivers/mfd/88pm88x.c
> +++ b/drivers/mfd/88pm88x.c
> @@ -57,16 +57,16 @@ static struct reg_sequence pm886_presets[] = {
>   REG_SEQ0(PM88X_REG_BK_OSC_CTRL3, 0xc0),
>  };
>  
> -static struct resource onkey_resources[] = {
> +static struct resource pm88x_onkey_resources[] = {
>   DEFINE_RES_IRQ_NAMED(PM88X_IRQ_ONKEY, "88pm88x-onkey"),
>  };
>  
> -static struct mfd_cell pm88x_devs[] = {
> +static struct mfd_cell pm886_devs[] = {
>   {
>   .name = "88pm88x-onkey",
> - .num_resources = ARRAY_SIZE(onkey_resources),
> - .resources = onkey_resources,
> - .id = -1,
> + .of_compatible = "marvell,88pm88x-onkey",
> + .num_resources = ARRAY_SIZE(pm88x_onkey_resources),
> + .resources = pm88x_onkey_resources,
>   },
>  };
>  
> @@ -74,6 +74,8 @@ static struct pm88x_data pm886_a1_data = {
>   .whoami = PM886_A1_WHOAMI,
>   .presets = pm886_presets,
>   .num_presets = ARRAY_SIZE(pm886_presets),
> + .devs = pm886_devs,
> + .num_devs = ARRAY_SIZE(pm886_devs),
>  };
>  
>  static const struct regmap_config pm88x_i2c_regmap = {
> @@ -157,7 +159,7 @@ static int pm88x_probe(struct i2c_client *client)
>   if (ret)
>   return ret;
>  
> - ret = devm_mfd_add_devices(>dev, 0, pm88x_devs, 
> ARRAY_SIZE(pm88x_devs),
> + ret = devm_mfd_add_devices(>dev, 0, chip->data->devs, 
> chip->data->num_devs,
>   NULL, 0, regmap_irq_get_domain(chip->irq_data));
>   if (ret) {
>   dev_err(>dev, "Failed to add devices: %d\n", ret);
> diff --git a/include/linux/mfd/88pm88x.h b/include/linux/mfd/88pm88x.h
> index a34c57447827..9a335f6b9c07 100644
> --- a/include/linux/mfd/88pm88x.h
> +++ b/include/linux/mfd/88pm88x.h
> @@ -49,6 +49,8 @@ struct pm88x_data {
>   unsigned int whoami;
>   struct reg_sequence *presets;
>   unsigned int num_presets;
> + struct mfd_cell *devs;
> + unsigned int num_devs;

Why are you adding extra abstraction?

>  };
>  
>  struct pm88x_chip {
> -- 
> 2.43.0
> 

-- 
Lee Jones [李琼斯]



Re: [PATCH v6 0/2] leds: Add a driver for KTD202x

2023-10-12 Thread Lee Jones
On Mon, 02 Oct 2023 18:48:26 +0200, André Apitzsch wrote:
> Add the binding description and the corresponding driver for
> the Kinetic KTD2026 and KTD2027.
> 
> 

Applied, thanks!

[1/2] dt-bindings: leds: Add Kinetic KTD2026/2027 LED
  commit: 25766993d24a623c4ddcbd34a78fdc76026d9b40
[2/2] leds: add ktd202x driver
  commit: 4239b17b5de0dcd5900727be5597ba061acd00b8

--
Lee Jones [李琼斯]



Re: (subset) [PATCH v2 1/2] dt-bindings: mfd: qcom,spmi-pmic: Drop unused labels from examples

2023-10-05 Thread Lee Jones
On Mon, 02 Oct 2023 09:00:11 +0200, Luca Weiss wrote:
> There's not much point in having unused labels in the binding example,
> so drop them.
> 
> This patch was originally motivated by ea25d61b448a ("arm64: dts: qcom:
> Use plural _gpios node label for PMIC gpios") updating all dts files to
> use the plural _gpios label instead of the singular _gpio as label but
> this example wasn't updated. But since we should just drop the label
> alltogether, do that.
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: mfd: qcom,spmi-pmic: Drop unused labels from examples
  commit: cac94656ff2b16827d7cd455f0d3746280cf3138

--
Lee Jones [李琼斯]



Re: [PATCH v4 2/2] leds: add ktd202x driver

2023-09-28 Thread Lee Jones
Maybe these need to be in their own functions:

ktd202x_setup_led_rgb()
ktd202x_setup_led_single()

?

> + } else {
> + ret = of_property_read_u32(np, "reg", );
> + if (ret != 0 || reg >= chip->num_leds) {
> + dev_err(chip->dev, "invalid 'reg' of %pOFn\n", np);
> + return -EINVAL;
> + }
> + led->index = reg;
> +
> + cdev = >cdev;
> + cdev->brightness_set_blocking = ktd202x_brightness_single_set;
> + cdev->blink_set = ktd202x_blink_single_set;
> + }
> +
> + cdev->max_brightness = KTD202X_MAX_BRIGHTNESS;
> +
> + init_data.fwnode = of_fwnode_handle(np);

Do this before calling the above new functions.

> + if (color == LED_COLOR_ID_RGB)

... then put these into the functions.

> + ret = devm_led_classdev_multicolor_register_ext(chip->dev,
> + >mcdev,
> + _data);
> + else
> + ret = devm_led_classdev_register_ext(chip->dev, >cdev,
> +  _data);
> + if (ret) {
> + dev_err(chip->dev, "unable to register %s\n", cdev->name);
> + of_node_put(np);
> + }
> +
> + return ret;
> +}
> +
> +static int ktd202x_probe_dt(struct ktd202x *chip)
> +{
> + struct device_node *np = dev_of_node(chip->dev), *child;
> + unsigned int i;
> + int count, ret;
> +
> + chip->num_leds = (int)(unsigned 
> long)of_device_get_match_data(chip->dev);

There are a bunch of recent patches converting these to:

  i2c_get_match_data()

... is that also applicable here?

> + count = of_get_available_child_count(np);
> + if (!count || count > chip->num_leds)
> + return -EINVAL;
> +
> + regmap_write(chip->regmap, KTD202X_REG_RESET_CONTROL,
> +  KTD202X_RSTR_RESET);
> +
> + /* Allow the device to execute the complete reset */
> + usleep_range(200, 300);
> +
> + i = 0;
> + for_each_available_child_of_node(np, child) {
> + ret = ktd202x_add_led(chip, child, i);
> + if (ret)
> + return ret;
> + i++;
> + }
> +
> + return 0;
> +}
> +
> +static const struct regmap_config ktd202x_regmap_config = {
> + .reg_bits = 8,
> + .val_bits = 8,
> + .max_register = 0x09,
> + .cache_type = REGCACHE_FLAT,
> + .reg_defaults = ktd202x_reg_defaults,
> + .num_reg_defaults = ARRAY_SIZE(ktd202x_reg_defaults),
> +};
> +
> +static int ktd202x_probe(struct i2c_client *client)
> +{
> + struct device *dev = >dev;
> + struct ktd202x *chip;
> + int count;
> + int ret;
> +
> + count = device_get_child_node_count(dev);
> + if (!count || count > KTD202X_MAX_LEDS)
> + return dev_err_probe(dev, -EINVAL,
> +  "Incorrect number of leds (%d)", count);
> +
> + chip = devm_kzalloc(dev, struct_size(chip, leds, count), GFP_KERNEL);
> + if (!chip)
> + return -ENOMEM;
> +
> + mutex_init(>mutex);
> +
> + chip->dev = dev;
> + i2c_set_clientdata(client, chip);
> +
> + chip->regmap = devm_regmap_init_i2c(client, _regmap_config);
> + if (IS_ERR(chip->regmap)) {
> + ret = dev_err_probe(dev, PTR_ERR(chip->regmap),
> + "Failed to allocate register map.\n");
> + goto error;

Where is the mutex first used?

I'd suggest moving mutex_init() as late as possible and omitting as many
of these gotos as you can.

> + }
> +
> + chip->regulators[0].supply = "vin";
> + chip->regulators[1].supply = "vio";
> + ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(chip->regulators),
> +   chip->regulators);
> + if (ret < 0) {
> + dev_err_probe(dev, ret, "Failed to request regulators.\n");
> + goto error;
> + }
> +
> + ret = regulator_bulk_enable(ARRAY_SIZE(chip->regulators),
> + chip->regulators);
> + if (ret) {
> + dev_err_probe(dev, ret, "Failed to enable regulators.\n");
> + goto error;
> + }
> +
> + ret = ktd202x_probe_dt(chip);
> + if (ret < 0)
> + goto error_reg;
> +
> + ret = regulator_bulk_disable(ARRAY_SIZE(chip->regulators),
> +  chip->regulators);
> + if (ret) {
> + dev_err_probe(dev, ret, "Failed to disable regulators.\n");
> + goto error;
> + }
> +
> + return 0;
> +
> +error_reg:
> + regulator_bulk_disable(ARRAY_SIZE(chip->regulators),
> +chip->regulators);
> +
> +error:
> + mutex_destroy(>mutex);
> + return ret;
> +}
> +
> +static void ktd202x_remove(struct i2c_client *client)
> +{
> + struct ktd202x *chip = i2c_get_clientdata(client);
> +
> + ktd202x_chip_disable(chip);
> +
> + mutex_destroy(>mutex);
> +}
> +
> +static void ktd202x_shutdown(struct i2c_client *client)
> +{
> + struct ktd202x *chip = i2c_get_clientdata(client);
> +
> + /* Reset registers to make sure all off before shutdown */

Grammar.

> + regmap_write(chip->regmap, KTD202X_REG_RESET_CONTROL,
> +  KTD202X_RSTR_RESET);
> +}
> +
> +static const struct of_device_id ktd202x_match_table[] = {
> + { .compatible = "kinetic,ktd2026", .data = (void *)KTD2026_NUM_LEDS },
> + { .compatible = "kinetic,ktd2027", .data = (void *)KTD2027_NUM_LEDS },
> + {},
> +};
> +

Remove these line.

> +MODULE_DEVICE_TABLE(of, ktd202x_match_table);
> +
> +static struct i2c_driver ktd202x_driver = {
> + .driver = {
> + .name = "leds-ktd202x",
> + .of_match_table = ktd202x_match_table,
> + },
> + .probe = ktd202x_probe,
> + .remove = ktd202x_remove,
> + .shutdown = ktd202x_shutdown,
> +};
> +module_i2c_driver(ktd202x_driver);
> +
> +MODULE_AUTHOR("André Apitzsch ");
> +MODULE_DESCRIPTION("Kinetic KTD2026/7 LED driver");
> +MODULE_LICENSE("GPL");
> 
> -- 
> 2.42.0
> 

-- 
8)
3)
Lee Jones [李琼斯]


Re: [PATCH 22/40] drm/ttm/ttm_tt: Demote non-conformant kernel-doc header

2021-04-19 Thread Lee Jones
On Fri, 16 Apr 2021, Christian König wrote:

> 
> 
> Am 16.04.21 um 16:37 schrieb Lee Jones:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/gpu/drm/ttm/ttm_tt.c:398: warning: Function parameter or member 
> > 'num_pages' not described in 'ttm_tt_mgr_init'
> >   drivers/gpu/drm/ttm/ttm_tt.c:398: warning: Function parameter or member 
> > 'num_dma32_pages' not described in 'ttm_tt_mgr_init'
> > 
> > Cc: Christian Koenig 
> > Cc: Huang Rui 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: dri-de...@lists.freedesktop.org
> > Signed-off-by: Lee Jones 
> 
> For that one I would rather prefer to just document the two parameters.

No problem.  Will fix.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 00/31] Rid W=1 warnings from GFS2 and EncryptFS

2021-04-19 Thread Lee Jones
On Mon, 19 Apr 2021, Tyler Hicks wrote:

> On 2021-03-30 17:44:27, Lee Jones wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
> > 
> > There is more to do in filesystems.  Another set will follow.
> > 
> > Lee Jones (31):
> ...
> >   fs: ecryptfs: read_write: File headers do not make good candidates for
> > kernel-doc
> >   fs: ecryptfs: debug: Demote a couple of kernel-doc abuses
> >   fs: ecryptfs: dentry: File headers are not good candidates for
> > kernel-doc
> >   fs: ecryptfs: kthread: Demote file header and provide description for
> > 'cred'
> >   fs: ecryptfs: file: Demote kernel-doc abuses
> >   fs: ecryptfs: super: Fix formatting, naming and kernel-doc abuses
> >   fs: ecryptfs: messaging: Add missing param descriptions and demote
> > abuses
> >   fs: ecryptfs: main: Demote a bunch of non-conformant kernel-doc
> > headers
> >   fs: ecryptfs: miscdev: File headers are not good kernel-doc candidates
> >   fs: ecryptfs: crypto: Supply some missing param descriptions and
> > demote abuses
> >   fs: ecryptfs: mmap: Help out one function header and demote other
> > abuses
> >   fs: ecryptfs: inode: Help out nearly-there header and demote
> > non-conformant ones
> >   fs: ecryptfs: keystore: Fix some kernel-doc issues and demote
> >     non-conformant headers
> 
> I've applied the eCryptfs fixes to the next branch of
> tyhicks/ecryptfs.git. Thanks for the clean-up!

Thanks Tyler, much appreciated.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH v6 1/4] mfd: rt4831: Adds support for Richtek RT4831

2021-04-19 Thread Lee Jones
On Mon, 19 Apr 2021, Lee Jones wrote:

> On Mon, 19 Apr 2021, Lee Jones wrote:
> 
> > On Mon, 19 Apr 2021, ChiYuan Huang wrote:
> > 
> > > Hi, Linux mfd reviewers:
> > >It's been three weeks not to get any response from you.
> > > Is there something wrong about this mfd patch?
> > > If yes, please feel free to let me know.
> > 
> > Couple of things:
> > 
> > First, if you think a patch had fallen through the gaps, which does
> > happen sometimes, it is generally considered acceptable to submit a
> > [RESEND] ~2 weeks after the initial submission.  FYI: This was such a
> > patch.  It was not on, or had fallen off of my radar for some reason.
> > 
> > Secondly, we are really late in the release cycle.  -rc8 has just been
> > released.  Quite a few maintainers slow down at ~-rc6.  Particularly
> > for new drivers.
> > 
> > No need to resubmit this driver this time.  It is now on my to-review
> > list and I will tend to it shortly.
> > 
> > Thanks for your patience.
> 
> Also you are missing a DT review on patch 4.

... looks like you forgot to Cc them!

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH v6 1/4] mfd: rt4831: Adds support for Richtek RT4831

2021-04-19 Thread Lee Jones
On Mon, 19 Apr 2021, Lee Jones wrote:

> On Mon, 19 Apr 2021, ChiYuan Huang wrote:
> 
> > Hi, Linux mfd reviewers:
> >It's been three weeks not to get any response from you.
> > Is there something wrong about this mfd patch?
> > If yes, please feel free to let me know.
> 
> Couple of things:
> 
> First, if you think a patch had fallen through the gaps, which does
> happen sometimes, it is generally considered acceptable to submit a
> [RESEND] ~2 weeks after the initial submission.  FYI: This was such a
> patch.  It was not on, or had fallen off of my radar for some reason.
> 
> Secondly, we are really late in the release cycle.  -rc8 has just been
> released.  Quite a few maintainers slow down at ~-rc6.  Particularly
> for new drivers.
> 
> No need to resubmit this driver this time.  It is now on my to-review
> list and I will tend to it shortly.
> 
> Thanks for your patience.

Also you are missing a DT review on patch 4.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH v6 1/4] mfd: rt4831: Adds support for Richtek RT4831

2021-04-19 Thread Lee Jones
On Mon, 19 Apr 2021, ChiYuan Huang wrote:

> Hi, Linux mfd reviewers:
>It's been three weeks not to get any response from you.
> Is there something wrong about this mfd patch?
> If yes, please feel free to let me know.

Couple of things:

First, if you think a patch had fallen through the gaps, which does
happen sometimes, it is generally considered acceptable to submit a
[RESEND] ~2 weeks after the initial submission.  FYI: This was such a
patch.  It was not on, or had fallen off of my radar for some reason.

Secondly, we are really late in the release cycle.  -rc8 has just been
released.  Quite a few maintainers slow down at ~-rc6.  Particularly
for new drivers.

No need to resubmit this driver this time.  It is now on my to-review
list and I will tend to it shortly.

Thanks for your patience.

> cy_huang  於 2021年3月28日 週日 下午11:24寫道:
> >
> > From: ChiYuan Huang 
> >
> > This adds support Richtek RT4831 core. It includes four channel WLED driver
> > and Display Bias Voltage outputs.
> >
> > Signed-off-by: ChiYuan Huang 
> > ---
> > The RT4831 regulator patches are already on main stream, and can be 
> > referred to
> > 9351ab8b0cb6 regulator: rt4831: Adds support for Richtek RT4831 DSV 
> > regulator
> > 934b05e81862 regulator: rt4831: Adds DT binding document for Richtek RT4831 
> > DSV regulator
> >
> > since v6
> > - Respin the date from 2020 to 2021.
> > - Rmove the shutdown routine.
> > - Change the macro OF_MFD_CELL to MFD_CELL_OF.
> >
> >
> > since v5
> > - Rename file name from rt4831-core.c to rt4831.c
> > - Change RICHTEK_VID to RICHTEK_VENDOR_ID.
> > - Change gpio_desc nameing from 'enable' to 'enable_gpio' in probe.
> > - Change variable 'val' to the meaningful name 'chip_id'.
> > - Refine the error log when vendor id is not matched.
> > - Remove of_match_ptr.
> >
> > since v2
> > - Refine Kconfig descriptions.
> > - Add copyright.
> > - Refine error logs in probe.
> > - Refine comment lines in remove and shutdown.
> > ---
> >  drivers/mfd/Kconfig  |  10 +
> >  drivers/mfd/Makefile |   1 +
> >  drivers/mfd/rt4831.c | 115 
> > +++
> >  3 files changed, 126 insertions(+)
> >  create mode 100644 drivers/mfd/rt4831.c

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 34/40] drm/exynos/exynos_drm_fimd: Realign function name with its header

2021-04-16 Thread Lee Jones
On Fri, 16 Apr 2021, Krzysztof Kozlowski wrote:

> On 16/04/2021 16:37, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/gpu/drm/exynos/exynos_drm_fimd.c:734: warning: expecting prototype 
> > for shadow_protect_win(). Prototype was for fimd_shadow_protect_win() 
> > instead
> > 
> > Cc: Inki Dae 
> > Cc: Joonyoung Shim 
> > Cc: Seung-Woo Kim 
> > Cc: Kyungmin Park 
> > Cc: David Airlie 
> > Cc: Daniel Vetter 
> > Cc: Krzysztof Kozlowski 
> > Cc: dri-de...@lists.freedesktop.org
> > Cc: linux-arm-ker...@lists.infradead.org
> > Cc: linux-samsung-...@vger.kernel.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Hi Lee,
> 
> I already sent a fix for this one on 5th of April:
> https://lore.kernel.org/lkml/20210405181524.52426-1-krzysztof.kozlow...@canonical.com/

No problem.  Thanks for letting me know.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


[PATCH 39/40] drm/sti/sti_hdmi: Provide kernel-doc headers with function names

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/sti/sti_hdmi.c:193: warning: expecting prototype for HDMI 
interrupt handler threaded(). Prototype was for hdmi_irq_thread() instead
 drivers/gpu/drm/sti/sti_hdmi.c:225: warning: expecting prototype for HDMI 
interrupt handler(). Prototype was for hdmi_irq() instead
 drivers/gpu/drm/sti/sti_hdmi.c:246: warning: expecting prototype for Set hdmi 
active area depending on the drm display mode selected(). Prototype was for 
hdmi_active_area() instead
 drivers/gpu/drm/sti/sti_hdmi.c:267: warning: expecting prototype for Overall 
hdmi configuration(). Prototype was for hdmi_config() instead
 drivers/gpu/drm/sti/sti_hdmi.c:346: warning: expecting prototype for Helper to 
concatenate infoframe in 32 bits word(). Prototype was for 
hdmi_infoframe_subpack() instead
 drivers/gpu/drm/sti/sti_hdmi.c:366: warning: expecting prototype for Helper to 
write info frame(). Prototype was for hdmi_infoframe_write_infopack() instead
 drivers/gpu/drm/sti/sti_hdmi.c:438: warning: expecting prototype for Prepare 
and configure the AVI infoframe(). Prototype was for 
hdmi_avi_infoframe_config() instead
 drivers/gpu/drm/sti/sti_hdmi.c:481: warning: expecting prototype for Prepare 
and configure the AUDIO infoframe(). Prototype was for 
hdmi_audio_infoframe_config() instead
 drivers/gpu/drm/sti/sti_hdmi.c:561: warning: expecting prototype for Software 
reset of the hdmi subsystem(). Prototype was for hdmi_swreset() instead

Cc: Benjamin Gaignard 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Philipp Zabel 
Cc: Vincent Abriou 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/sti/sti_hdmi.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
index f3ace11209dd7..dd5a388898e79 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.c
+++ b/drivers/gpu/drm/sti/sti_hdmi.c
@@ -184,7 +184,7 @@ void hdmi_write(struct sti_hdmi *hdmi, u32 val, int offset)
 }
 
 /**
- * HDMI interrupt handler threaded
+ * hdmi_irq_thread - HDMI interrupt handler threaded
  *
  * @irq: irq number
  * @arg: connector structure
@@ -216,7 +216,7 @@ static irqreturn_t hdmi_irq_thread(int irq, void *arg)
 }
 
 /**
- * HDMI interrupt handler
+ * hdmi_irq - HDMI interrupt handler
  *
  * @irq: irq number
  * @arg: connector structure
@@ -238,7 +238,7 @@ static irqreturn_t hdmi_irq(int irq, void *arg)
 }
 
 /**
- * Set hdmi active area depending on the drm display mode selected
+ * hdmi_active_area - Set hdmi active area depending on the drm display mode 
selected
  *
  * @hdmi: pointer on the hdmi internal structure
  */
@@ -259,7 +259,7 @@ static void hdmi_active_area(struct sti_hdmi *hdmi)
 }
 
 /**
- * Overall hdmi configuration
+ * hdmi_config - Overall hdmi configuration
  *
  * @hdmi: pointer on the hdmi internal structure
  */
@@ -337,7 +337,7 @@ static void hdmi_infoframe_reset(struct sti_hdmi *hdmi,
 }
 
 /**
- * Helper to concatenate infoframe in 32 bits word
+ * hdmi_infoframe_subpack - Helper to concatenate infoframe in 32 bits word
  *
  * @ptr: pointer on the hdmi internal structure
  * @size: size to write
@@ -354,7 +354,7 @@ static inline unsigned int hdmi_infoframe_subpack(const u8 
*ptr, size_t size)
 }
 
 /**
- * Helper to write info frame
+ * hdmi_infoframe_write_infopack - Helper to write info frame
  *
  * @hdmi: pointer on the hdmi internal structure
  * @data: infoframe to write
@@ -424,7 +424,7 @@ static void hdmi_infoframe_write_infopack(struct sti_hdmi 
*hdmi,
 }
 
 /**
- * Prepare and configure the AVI infoframe
+ * hdmi_avi_infoframe_config - Prepare and configure the AVI infoframe
  *
  * AVI infoframe are transmitted at least once per two video field and
  * contains information about HDMI transmission mode such as color space,
@@ -467,7 +467,7 @@ static int hdmi_avi_infoframe_config(struct sti_hdmi *hdmi)
 }
 
 /**
- * Prepare and configure the AUDIO infoframe
+ * hdmi_audio_infoframe_config - Prepare and configure the AUDIO infoframe
  *
  * AUDIO infoframe are transmitted once per frame and
  * contains information about HDMI transmission mode such as audio codec,
@@ -552,7 +552,7 @@ static int hdmi_vendor_infoframe_config(struct sti_hdmi 
*hdmi)
 #define HDMI_TIMEOUT_SWRESET  100   /*milliseconds */
 
 /**
- * Software reset of the hdmi subsystem
+ * hdmi_swreset - Software reset of the hdmi subsystem
  *
  * @hdmi: pointer on the hdmi internal structure
  *
-- 
2.27.0



[PATCH 38/40] drm/exynos/exynos_drm_ipp: Fix some function name disparity issues

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/exynos/exynos_drm_ipp.c:105: warning: expecting prototype for 
exynos_drm_ipp_ioctl_get_res_ioctl(). Prototype was for 
exynos_drm_ipp_get_res_ioctl() instead
 drivers/gpu/drm/exynos/exynos_drm_ipp.c:153: warning: expecting prototype for 
exynos_drm_ipp_ioctl_get_caps(). Prototype was for 
exynos_drm_ipp_get_caps_ioctl() instead

Cc: Inki Dae 
Cc: Joonyoung Shim 
Cc: Seung-Woo Kim 
Cc: Kyungmin Park 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Krzysztof Kozlowski 
Cc: Marek Szyprowski 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-samsung-...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/exynos/exynos_drm_ipp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c 
b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 4f2b7551b2515..9ae8689353579 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -88,7 +88,7 @@ void exynos_drm_ipp_unregister(struct device *dev,
 }
 
 /**
- * exynos_drm_ipp_ioctl_get_res_ioctl - enumerate all ipp modules
+ * exynos_drm_ipp_get_res_ioctl - enumerate all ipp modules
  * @dev: DRM device
  * @data: ioctl data
  * @file_priv: DRM file info
@@ -136,7 +136,7 @@ static inline struct exynos_drm_ipp *__ipp_get(uint32_t id)
 }
 
 /**
- * exynos_drm_ipp_ioctl_get_caps - get ipp module capabilities and formats
+ * exynos_drm_ipp_get_caps_ioctl - get ipp module capabilities and formats
  * @dev: DRM device
  * @data: ioctl data
  * @file_priv: DRM file info
-- 
2.27.0



[PATCH 40/40] drm/mediatek/mtk_disp_ccorr: Demote less than half-populated struct header

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:46: warning: Function parameter or 
member 'clk' not described in 'mtk_disp_ccorr'
 drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:46: warning: Function parameter or 
member 'regs' not described in 'mtk_disp_ccorr'
 drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:46: warning: Function parameter or 
member 'cmdq_reg' not described in 'mtk_disp_ccorr'
 drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:46: warning: Function parameter or 
member 'data' not described in 'mtk_disp_ccorr'

Cc: Chun-Kuang Hu 
Cc: Philipp Zabel 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Matthias Brugger 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-media...@lists.infradead.org
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c 
b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
index 141cb36b9c07b..5276909a775fc 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
@@ -33,7 +33,7 @@ struct mtk_disp_ccorr_data {
u32 matrix_bits;
 };
 
-/**
+/*
  * struct mtk_disp_ccorr - DISP_CCORR driver structure
  * @ddp_comp - structure containing type enum and hardware resources
  * @crtc - associated crtc to report irq events to
-- 
2.27.0



[PATCH 36/40] drm/exynos/exynos7_drm_decon: Realign function name with its header

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/exynos/exynos7_drm_decon.c:355: warning: expecting prototype 
for shadow_protect_win(). Prototype was for decon_shadow_protect_win() instead

Cc: Inki Dae 
Cc: Joonyoung Shim 
Cc: Seung-Woo Kim 
Cc: Kyungmin Park 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Krzysztof Kozlowski 
Cc: Akshu Agarwal 
Cc: Ajay Kumar 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-samsung-...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/exynos/exynos7_drm_decon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index 431c5d32f9a47..9b5e6f94e5585 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -344,7 +344,7 @@ static void decon_win_set_colkey(struct decon_context *ctx, 
unsigned int win)
 }
 
 /**
- * shadow_protect_win() - disable updating values from shadow registers at 
vsync
+ * decon_shadow_protect_win() - disable updating values from shadow registers 
at vsync
  *
  * @ctx: display and enhancement controller context
  * @win: window to protect registers for
-- 
2.27.0



[PATCH 37/40] drm/panel/panel-sitronix-st7701: Demote kernel-doc format abuse

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/panel/panel-sitronix-st7701.c:42: warning: This comment starts 
with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst

Cc: Jagan Teki 
Cc: Thierry Reding 
Cc: Sam Ravnborg 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/panel/panel-sitronix-st7701.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c 
b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
index 4d2a149b202cb..320a2a8fd4592 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
@@ -38,7 +38,7 @@
 #define DSI_CMD2_BK1_SPD2  0xC2 /* Source EQ2 Setting */
 #define DSI_CMD2_BK1_MIPISET1  0xD0 /* MIPI Setting 1 */
 
-/**
+/*
  * Command2 with BK function selection.
  *
  * BIT[4, 0]: [CN2, BKXSEL]
-- 
2.27.0



[PATCH 32/40] drm/amd/amdgpu/amdgpu_ttm: Fix incorrectly documented function 'amdgpu_ttm_copy_mem_to_mem()'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:311: warning: expecting prototype for 
amdgpu_copy_ttm_mem_to_mem(). Prototype was for amdgpu_ttm_copy_mem_to_mem() 
instead

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: Jerome Glisse 
Cc: amd-...@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 3bef0432cac2f..859314c0d6a39 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -288,7 +288,7 @@ static int amdgpu_ttm_map_buffer(struct ttm_buffer_object 
*bo,
 }
 
 /**
- * amdgpu_copy_ttm_mem_to_mem - Helper function for copy
+ * amdgpu_ttm_copy_mem_to_mem - Helper function for copy
  * @adev: amdgpu device
  * @src: buffer/address where to read from
  * @dst: buffer/address where to write to
-- 
2.27.0



[PATCH 35/40] drm/amd/amdgpu/amdgpu_cs: Repair some function naming disparity

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:685: warning: expecting prototype for 
cs_parser_fini(). Prototype was for amdgpu_cs_parser_fini() instead
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1502: warning: expecting prototype for 
amdgpu_cs_wait_all_fence(). Prototype was for amdgpu_cs_wait_all_fences() 
instead
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1656: warning: expecting prototype for 
amdgpu_cs_find_bo_va(). Prototype was for amdgpu_cs_find_mapping() instead

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: Jerome Glisse 
Cc: amd-...@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index b5c7669980458..90136f9dedd65 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -672,7 +672,7 @@ static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
 }
 
 /**
- * cs_parser_fini() - clean parser states
+ * amdgpu_cs_parser_fini() - clean parser states
  * @parser:parser structure holding parsing context.
  * @error: error number
  * @backoff:   indicator to backoff the reservation
@@ -1488,7 +1488,7 @@ int amdgpu_cs_fence_to_handle_ioctl(struct drm_device 
*dev, void *data,
 }
 
 /**
- * amdgpu_cs_wait_all_fence - wait on all fences to signal
+ * amdgpu_cs_wait_all_fences - wait on all fences to signal
  *
  * @adev: amdgpu device
  * @filp: file private
@@ -1639,7 +1639,7 @@ int amdgpu_cs_wait_fences_ioctl(struct drm_device *dev, 
void *data,
 }
 
 /**
- * amdgpu_cs_find_bo_va - find bo_va for VM address
+ * amdgpu_cs_find_mapping - find bo_va for VM address
  *
  * @parser: command submission parser context
  * @addr: VM address
-- 
2.27.0



[PATCH 34/40] drm/exynos/exynos_drm_fimd: Realign function name with its header

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/exynos/exynos_drm_fimd.c:734: warning: expecting prototype for 
shadow_protect_win(). Prototype was for fimd_shadow_protect_win() instead

Cc: Inki Dae 
Cc: Joonyoung Shim 
Cc: Seung-Woo Kim 
Cc: Kyungmin Park 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Krzysztof Kozlowski 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-samsung-...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 49a2e0c539187..ae576122873e0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -723,7 +723,7 @@ static void fimd_win_set_colkey(struct fimd_context *ctx, 
unsigned int win)
 }
 
 /**
- * shadow_protect_win() - disable updating values from shadow registers at 
vsync
+ * fimd_shadow_protect_win() - disable updating values from shadow registers 
at vsync
  *
  * @ctx: local driver data
  * @win: window to protect registers for
-- 
2.27.0



[PATCH 31/40] drm/amd/amdgpu/amdgpu_gart: Correct a couple of function names in the docs

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:73: warning: expecting prototype for 
amdgpu_dummy_page_init(). Prototype was for amdgpu_gart_dummy_page_init() 
instead
 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:96: warning: expecting prototype for 
amdgpu_dummy_page_fini(). Prototype was for amdgpu_gart_dummy_page_fini() 
instead

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Nirmoy Das 
Cc: amd-...@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
index c5a9a4fb10d2b..5562b5c90c032 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
@@ -60,7 +60,7 @@
  */
 
 /**
- * amdgpu_dummy_page_init - init dummy page used by the driver
+ * amdgpu_gart_dummy_page_init - init dummy page used by the driver
  *
  * @adev: amdgpu_device pointer
  *
@@ -86,7 +86,7 @@ static int amdgpu_gart_dummy_page_init(struct amdgpu_device 
*adev)
 }
 
 /**
- * amdgpu_dummy_page_fini - free dummy page used by the driver
+ * amdgpu_gart_dummy_page_fini - free dummy page used by the driver
  *
  * @adev: amdgpu_device pointer
  *
-- 
2.27.0



[PATCH 33/40] drm/amd/amdgpu/amdgpu_ring: Provide description for 'sched_score'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:169: warning: Function parameter or 
member 'sched_score' not described in 'amdgpu_ring_init'

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: amd-...@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index 688624ebe4211..7b634a1517f9c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -158,6 +158,7 @@ void amdgpu_ring_undo(struct amdgpu_ring *ring)
  * @irq_src: interrupt source to use for this ring
  * @irq_type: interrupt type to use for this ring
  * @hw_prio: ring priority (NORMAL/HIGH)
+ * @sched_score: optional score atomic shared with other schedulers
  *
  * Initialize the driver information for the selected ring (all asics).
  * Returns 0 on success, error on failure.
-- 
2.27.0



[PATCH 29/40] drm/amd/amdgpu/amdgpu_fence: Provide description for 'sched_score'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:444: warning: Function parameter or 
member 'sched_score' not described in 'amdgpu_fence_driver_init_ring'

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: Jerome Glisse 
Cc: amd-...@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 47ea468596184..30772608eac6c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -434,6 +434,7 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
  *
  * @ring: ring to init the fence driver on
  * @num_hw_submission: number of entries on the hardware queue
+ * @sched_score: optional score atomic shared with other schedulers
  *
  * Init the fence driver for the requested ring (all asics).
  * Helper function for amdgpu_fence_driver_init().
-- 
2.27.0



[PATCH 30/40] drm/vgem/vgem_drv: Demote kernel-doc abuse

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/vgem/vgem_drv.c:29: warning: This comment starts with '/**', 
but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: "Christian König" 
Cc: Adam Jackson 
Cc: Ben Widawsky 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index a0e75f1d5d016..bf38a7e319d14 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -25,7 +25,7 @@
  * Ben Widawsky 
  */
 
-/**
+/*
  * This is vgem, a (non-hardware-backed) GEM service.  This is used by Mesa's
  * software renderer and the X server for efficient buffer sharing.
  */
-- 
2.27.0



[PATCH 26/40] drm/amd/amdgpu/amdgpu_device: Remove unused variable 'r'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function 
‘amdgpu_device_suspend’:
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3733:6: warning: variable ‘r’ set 
but not used [-Wunused-but-set-variable]

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: amd-...@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index b4ad1c055c702..eef54b265ffdd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3730,7 +3730,6 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
 int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
 {
struct amdgpu_device *adev = drm_to_adev(dev);
-   int r;
 
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
@@ -3745,7 +3744,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool 
fbcon)
 
amdgpu_ras_suspend(adev);
 
-   r = amdgpu_device_ip_suspend_phase1(adev);
+   amdgpu_device_ip_suspend_phase1(adev);
 
if (!adev->in_s0ix)
amdgpu_amdkfd_suspend(adev, adev->in_runpm);
@@ -3755,7 +3754,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool 
fbcon)
 
amdgpu_fence_driver_suspend(adev);
 
-   r = amdgpu_device_ip_suspend_phase2(adev);
+   amdgpu_device_ip_suspend_phase2(adev);
/* evict remaining vram memory
 * This second call to evict vram is to evict the gart page table
 * using the CPU.
-- 
2.27.0



[PATCH 28/40] drm/panel/panel-raspberrypi-touchscreen: Demote kernel-doc abuse

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c:33: warning: This 
comment starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst

Cc: Thierry Reding 
Cc: Sam Ravnborg 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Eric Anholt 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c 
b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
index 5e9ccefb88f62..2229f1af2ca8c 100644
--- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
+++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
@@ -29,7 +29,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-/**
+/*
  * Raspberry Pi 7" touchscreen panel driver.
  *
  * The 7" touchscreen consists of a DPI LCD panel, a Toshiba
-- 
2.27.0



[PATCH 27/40] drm/ttm/ttm_device: Demote kernel-doc abuses

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/ttm/ttm_device.c:42: warning: Function parameter or member 
'ttm_global_mutex' not described in 'DEFINE_MUTEX'
 drivers/gpu/drm/ttm/ttm_device.c:42: warning: expecting prototype for 
ttm_global_mutex(). Prototype was for DEFINE_MUTEX() instead
 drivers/gpu/drm/ttm/ttm_device.c:112: warning: Function parameter or member 
'ctx' not described in 'ttm_global_swapout'
 drivers/gpu/drm/ttm/ttm_device.c:112: warning: Function parameter or member 
'gfp_flags' not described in 'ttm_global_swapout'
 drivers/gpu/drm/ttm/ttm_device.c:112: warning: expecting prototype for A 
buffer object shrink method that tries to swap out the first(). Prototype was 
for ttm_global_swapout() instead

Cc: Christian Koenig 
Cc: Huang Rui 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/ttm/ttm_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 9b787b3caeb50..a8bec8358350d 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -36,7 +36,7 @@
 
 #include "ttm_module.h"
 
-/**
+/*
  * ttm_global_mutex - protecting the global state
  */
 DEFINE_MUTEX(ttm_global_mutex);
@@ -104,7 +104,7 @@ static int ttm_global_init(void)
return ret;
 }
 
-/**
+/*
  * A buffer object shrink method that tries to swap out the first
  * buffer object on the global::swap_lru list.
  */
-- 
2.27.0



[PATCH 25/40] drm/radeon/radeon_device: Provide function name in kernel-doc header

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_device.c:1101: warning: This comment starts with 
'/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst

Cc: Alex Deucher 
Cc: "Christian König" 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: amd-...@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/radeon/radeon_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c 
b/drivers/gpu/drm/radeon/radeon_device.c
index cc445c4cba2e3..46eea01950cb1 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1098,7 +1098,8 @@ static bool radeon_check_pot_argument(int arg)
 }
 
 /**
- * Determine a sensible default GART size according to ASIC family.
+ * radeon_gart_size_auto - Determine a sensible default GART size
+ * according to ASIC family.
  *
  * @family: ASIC family name
  */
-- 
2.27.0



[PATCH 24/40] drm/scheduler/sched_entity: Fix some function name disparity

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/scheduler/sched_entity.c:204: warning: expecting prototype for 
drm_sched_entity_kill_jobs(). Prototype was for drm_sched_entity_kill_jobs_cb() 
instead
 drivers/gpu/drm/scheduler/sched_entity.c:262: warning: expecting prototype for 
drm_sched_entity_cleanup(). Prototype was for drm_sched_entity_fini() instead
 drivers/gpu/drm/scheduler/sched_entity.c:305: warning: expecting prototype for 
drm_sched_entity_fini(). Prototype was for drm_sched_entity_destroy() instead

Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: "Christian König" 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/scheduler/sched_entity.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/scheduler/sched_entity.c 
b/drivers/gpu/drm/scheduler/sched_entity.c
index f0790e9471d1a..0249c74501888 100644
--- a/drivers/gpu/drm/scheduler/sched_entity.c
+++ b/drivers/gpu/drm/scheduler/sched_entity.c
@@ -192,7 +192,7 @@ long drm_sched_entity_flush(struct drm_sched_entity 
*entity, long timeout)
 EXPORT_SYMBOL(drm_sched_entity_flush);
 
 /**
- * drm_sched_entity_kill_jobs - helper for drm_sched_entity_kill_jobs
+ * drm_sched_entity_kill_jobs_cb - helper for drm_sched_entity_kill_jobs
  *
  * @f: signaled fence
  * @cb: our callback structure
@@ -250,7 +250,7 @@ static void drm_sched_entity_kill_jobs(struct 
drm_sched_entity *entity)
 }
 
 /**
- * drm_sched_entity_cleanup - Destroy a context entity
+ * drm_sched_entity_fini - Destroy a context entity
  *
  * @entity: scheduler entity
  *
@@ -295,7 +295,7 @@ void drm_sched_entity_fini(struct drm_sched_entity *entity)
 EXPORT_SYMBOL(drm_sched_entity_fini);
 
 /**
- * drm_sched_entity_fini - Destroy a context entity
+ * drm_sched_entity_destroy - Destroy a context entity
  *
  * @entity: scheduler entity
  *
-- 
2.27.0



[PATCH 22/40] drm/ttm/ttm_tt: Demote non-conformant kernel-doc header

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/ttm/ttm_tt.c:398: warning: Function parameter or member 
'num_pages' not described in 'ttm_tt_mgr_init'
 drivers/gpu/drm/ttm/ttm_tt.c:398: warning: Function parameter or member 
'num_dma32_pages' not described in 'ttm_tt_mgr_init'

Cc: Christian Koenig 
Cc: Huang Rui 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/ttm/ttm_tt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 7dcd3fb694956..d939c3bde2fcf 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -389,7 +389,7 @@ void ttm_tt_unpopulate(struct ttm_device *bdev, struct 
ttm_tt *ttm)
ttm->page_flags &= ~TTM_PAGE_FLAG_PRIV_POPULATED;
 }
 
-/**
+/*
  * ttm_tt_mgr_init - register with the MM shrinker
  *
  * Register with the MM shrinker for swapping out BOs.
-- 
2.27.0



[PATCH 23/40] drm/ttm/ttm_bo: Fix incorrectly documented function 'ttm_bo_cleanup_refs'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/ttm/ttm_bo.c:293: warning: expecting prototype for function 
ttm_bo_cleanup_refs(). Prototype was for ttm_bo_cleanup_refs() instead

Cc: Christian Koenig 
Cc: Huang Rui 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index cfd0b92923973..defec9487e1de 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -274,7 +274,7 @@ static void ttm_bo_flush_all_fences(struct 
ttm_buffer_object *bo)
 }
 
 /**
- * function ttm_bo_cleanup_refs
+ * ttm_bo_cleanup_refs
  * If bo idle, remove from lru lists, and unref.
  * If not idle, block if possible.
  *
-- 
2.27.0



[PATCH 21/40] drm/xlnx/zynqmp_dp: Fix a little potential doc-rot

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/xlnx/zynqmp_dp.c:806: warning: expecting prototype for 
zynqmp_dp_link_train(). Prototype was for zynqmp_dp_train() instead

Cc: Hyun Kwon 
Cc: Laurent Pinchart 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Michal Simek 
Cc: Philipp Zabel 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
index 59d1fb017da01..5ce96421acf40 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
@@ -797,7 +797,7 @@ static int zynqmp_dp_link_train_ce(struct zynqmp_dp *dp)
 }
 
 /**
- * zynqmp_dp_link_train - Train the link
+ * zynqmp_dp_train - Train the link
  * @dp: DisplayPort IP core structure
  *
  * Return: 0 if all trains are done successfully, or corresponding error code.
-- 
2.27.0



[PATCH 20/40] drm/xlnx/zynqmp_disp: Fix incorrectly documented enum 'zynqmp_disp_id'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/xlnx/zynqmp_disp.c:101: warning: expecting prototype for enum 
zynqmp_disp_id. Prototype was for enum zynqmp_disp_layer_id instead

Cc: Hyun Kwon 
Cc: Laurent Pinchart 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Michal Simek 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/xlnx/zynqmp_disp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c 
b/drivers/gpu/drm/xlnx/zynqmp_disp.c
index 109d627968ac0..ca1161ec9e16f 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_disp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c
@@ -91,7 +91,7 @@ struct zynqmp_disp_format {
 };
 
 /**
- * enum zynqmp_disp_id - Layer identifier
+ * enum zynqmp_disp_layer_id - Layer identifier
  * @ZYNQMP_DISP_LAYER_VID: Video layer
  * @ZYNQMP_DISP_LAYER_GFX: Graphics layer
  */
-- 
2.27.0



[PATCH 19/40] drm/omapdrm/omap_gem: Properly document omap_gem_dumb_map_offset()

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/omapdrm/omap_gem.c:619: warning: expecting prototype for 
omap_gem_dumb_map(). Prototype was for omap_gem_dumb_map_offset() instead

Cc: Tomi Valkeinen 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: "Christian König" 
Cc: Rob Clark 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/omapdrm/omap_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c 
b/drivers/gpu/drm/omapdrm/omap_gem.c
index 38af6195d9593..27c71cded5d0a 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -605,7 +605,7 @@ int omap_gem_dumb_create(struct drm_file *file, struct 
drm_device *dev,
 }
 
 /**
- * omap_gem_dumb_map   -   buffer mapping for dumb interface
+ * omap_gem_dumb_map_offset-   buffer mapping for dumb interface
  * @file: our drm client file
  * @dev: drm device
  * @handle: GEM handle to the object (from dumb_create)
-- 
2.27.0



[PATCH 18/40] drm/omapdrm/omap_irq: Fix a couple of incorrectly documented functions

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/omapdrm/omap_irq.c:114: warning: expecting prototype for 
enable_vblank(). Prototype was for omap_irq_enable_vblank() instead
 drivers/gpu/drm/omapdrm/omap_irq.c:140: warning: expecting prototype for 
disable_vblank(). Prototype was for omap_irq_disable_vblank() instead

Cc: Tomi Valkeinen 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Rob Clark 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/omapdrm/omap_irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c 
b/drivers/gpu/drm/omapdrm/omap_irq.c
index 15148d4b35b57..dff095c864909 100644
--- a/drivers/gpu/drm/omapdrm/omap_irq.c
+++ b/drivers/gpu/drm/omapdrm/omap_irq.c
@@ -99,7 +99,7 @@ int omap_irq_enable_framedone(struct drm_crtc *crtc, bool 
enable)
 }
 
 /**
- * enable_vblank - enable vblank interrupt events
+ * omap_irq_enable_vblank - enable vblank interrupt events
  * @crtc: DRM CRTC
  *
  * Enable vblank interrupts for @crtc.  If the device doesn't have
@@ -129,7 +129,7 @@ int omap_irq_enable_vblank(struct drm_crtc *crtc)
 }
 
 /**
- * disable_vblank - disable vblank interrupt events
+ * omap_irq_disable_vblank - disable vblank interrupt events
  * @crtc: DRM CRTC
  *
  * Disable vblank interrupts for @crtc.  If the device doesn't have
-- 
2.27.0



[PATCH 16/40] drm/nouveau/nouveau_ioc32: Demote kernel-doc abuse to standard comment block

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/nouveau_ioc32.c:52: warning: Function parameter or 
member 'filp' not described in 'nouveau_compat_ioctl'
 drivers/gpu/drm/nouveau/nouveau_ioc32.c:52: warning: Function parameter or 
member 'cmd' not described in 'nouveau_compat_ioctl'
 drivers/gpu/drm/nouveau/nouveau_ioc32.c:52: warning: Function parameter or 
member 'arg' not described in 'nouveau_compat_ioctl'

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/nouveau_ioc32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_ioc32.c 
b/drivers/gpu/drm/nouveau/nouveau_ioc32.c
index 8ddf9b2325a42..2af3615c5205c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ioc32.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ioc32.c
@@ -38,7 +38,7 @@
 
 #include "nouveau_ioctl.h"
 
-/**
+/*
  * Called whenever a 32-bit process running under a 64-bit kernel
  * performs an ioctl on /dev/dri/card.
  *
-- 
2.27.0



[PATCH 17/40] gpu: host1x: bus: Remove superfluous param description 'key'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/host1x/bus.c:774: warning: Excess function parameter 'key' 
description in '__host1x_client_register'

Cc: Thierry Reding 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/host1x/bus.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c
index 218e3718fd68c..e293b68acc348 100644
--- a/drivers/gpu/host1x/bus.c
+++ b/drivers/gpu/host1x/bus.c
@@ -761,7 +761,6 @@ EXPORT_SYMBOL(host1x_client_exit);
 /**
  * __host1x_client_register() - register a host1x client
  * @client: host1x client
- * @key: lock class key for the client-specific mutex
  *
  * Registers a host1x client with each host1x controller instance. Note that
  * each client will only match their parent host1x controller and will only be
-- 
2.27.0



[PATCH 15/40] drm/nouveau/nouveau_svm: Remove unused variable 'ret' from void function

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/nouveau_svm.c: In function ‘nouveau_pfns_map’:
 drivers/gpu/drm/nouveau/nouveau_svm.c:810:6: warning: variable ‘ret’ set but 
not used [-Wunused-but-set-variable]

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/nouveau_svm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c 
b/drivers/gpu/drm/nouveau/nouveau_svm.c
index 1c3f890377d2c..26af6ee915368 100644
--- a/drivers/gpu/drm/nouveau/nouveau_svm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_svm.c
@@ -811,7 +811,6 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct 
mm_struct *mm,
 unsigned long addr, u64 *pfns, unsigned long npages)
 {
struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns);
-   int ret;
 
args->p.addr = addr;
args->p.size = npages << PAGE_SHIFT;
@@ -819,8 +818,8 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct 
mm_struct *mm,
mutex_lock(>mutex);
 
svmm->vmm->vmm.object.client->super = true;
-   ret = nvif_object_ioctl(>vmm->vmm.object, args, sizeof(*args) +
-   npages * sizeof(args->p.phys[0]), NULL);
+   nvif_object_ioctl(>vmm->vmm.object, args, sizeof(*args) +
+ npages * sizeof(args->p.phys[0]), NULL);
svmm->vmm->vmm.object.client->super = false;
 
mutex_unlock(>mutex);
-- 
2.27.0



[PATCH 13/40] drm/nouveau/dispnv50/disp: Include header containing our prototypes

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/dispnv50/disp.c:2599:1: warning: no previous prototype 
for ‘nv50_display_create’ [-Wmissing-prototypes]

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c 
b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 351f954989530..4905ed584ff48 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -68,6 +68,8 @@
 
 #include 
 
+#include "nv50_display.h"
+
 /**
  * EVO channel
  */
-- 
2.27.0



[PATCH 12/40] drm/nouveau/nv50_display: Remove superfluous prototype for local static functions

2021-04-16 Thread Lee Jones
Fixes the following build error:

 drivers/gpu/drm/nouveau/dispnv50/disp.c:2530:1: error: conflicting types for 
‘nv50_display_fini’
 In file included from drivers/gpu/drm/nouveau/dispnv50/disp.c:71:
 drivers/gpu/drm/nouveau/nv50_display.h:36:6: note: previous declaration of 
‘nv50_display_fini’ was her
 In file included from drivers/gpu/drm/nouveau/dispnv50/disp.c:71:
 drivers/gpu/drm/nouveau/nv50_display.h:35:6: note: previous declaration of 
‘nv50_display_init’ was here
 drivers/gpu/drm/nouveau/dispnv50/disp.c:2581:1: error: static declaration of 
‘nv50_display_destroy’ follows non-static declaration
 In file included from drivers/gpu/drm/nouveau/dispnv50/disp.c:71:
 drivers/gpu/drm/nouveau/nv50_display.h:34:6: note: previous declaration of 
‘nv50_display_destroy’ was here

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/nv50_display.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nv50_display.h 
b/drivers/gpu/drm/nouveau/nv50_display.h
index fbd3b15583bc8..2421401d12636 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.h
+++ b/drivers/gpu/drm/nouveau/nv50_display.h
@@ -31,7 +31,4 @@
 #include "nouveau_reg.h"
 
 int  nv50_display_create(struct drm_device *);
-void nv50_display_destroy(struct drm_device *);
-int  nv50_display_init(struct drm_device *);
-void nv50_display_fini(struct drm_device *);
 #endif /* __NV50_DISPLAY_H__ */
-- 
2.27.0



[PATCH 14/40] drm/nouveau/nouveau_ioc32: File headers are not good candidates for kernel-doc

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/nouveau_ioc32.c:2: warning: Cannot understand  * file 
mga_ioc32.c

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/nouveau_ioc32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_ioc32.c 
b/drivers/gpu/drm/nouveau/nouveau_ioc32.c
index adf01ca9e035d..8ddf9b2325a42 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ioc32.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ioc32.c
@@ -1,4 +1,4 @@
-/**
+/*
  * \file mga_ioc32.c
  *
  * 32-bit ioctl compatibility routines for the MGA DRM.
-- 
2.27.0



[PATCH 10/40] drm/nouveau/dispnv50/disp: Remove unused variable 'ret' from function returning void

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_cleanup’:
 drivers/gpu/drm/nouveau/dispnv50/disp.c:1357:6: warning: variable ‘ret’ set 
but not used [-Wunused-but-set-variable]

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c 
b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 4801aafd9552b..351f954989530 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1386,12 +1386,11 @@ nv50_mstm_cleanup(struct nv50_mstm *mstm)
 {
struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
struct drm_encoder *encoder;
-   int ret;
 
NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name);
-   ret = drm_dp_check_act_status(>mgr);
+   drm_dp_check_act_status(>mgr);
 
-   ret = drm_dp_update_payload_part2(>mgr);
+   drm_dp_update_payload_part2(>mgr);
 
drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
-- 
2.27.0



[PATCH 09/40] drm/nouveau/dispnv04/crtc: Demote non-conforming kernel-doc headers

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/dispnv04/crtc.c:462: warning: Function parameter or 
member 'crtc' not described in 'nv_crtc_mode_set_regs'
 drivers/gpu/drm/nouveau/dispnv04/crtc.c:462: warning: Function parameter or 
member 'mode' not described in 'nv_crtc_mode_set_regs'
 drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or 
member 'crtc' not described in 'nv_crtc_mode_set'
 drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or 
member 'mode' not described in 'nv_crtc_mode_set'
 drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or 
member 'adjusted_mode' not described in 'nv_crtc_mode_set'
 drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or 
member 'x' not described in 'nv_crtc_mode_set'
 drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or 
member 'y' not described in 'nv_crtc_mode_set'
 drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or 
member 'old_fb' not described in 'nv_crtc_mode_set'

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c 
b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index f9e962fd94d0d..f9a276ea5a9e0 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -449,7 +449,7 @@ nv_crtc_mode_set_vga(struct drm_crtc *crtc, struct 
drm_display_mode *mode)
regp->Attribute[NV_CIO_AR_CSEL_INDEX] = 0x00;
 }
 
-/**
+/*
  * Sets up registers for the given mode/adjusted_mode pair.
  *
  * The clocks, CRTCs and outputs attached to this CRTC must be off.
@@ -625,7 +625,7 @@ nv_crtc_swap_fbs(struct drm_crtc *crtc, struct 
drm_framebuffer *old_fb)
return ret;
 }
 
-/**
+/*
  * Sets up registers for the given mode/adjusted_mode pair.
  *
  * The clocks, CRTCs and outputs attached to this CRTC must be off.
-- 
2.27.0



[PATCH 11/40] drm/nouveau/dispnv50/headc57d: Make local function 'headc57d_olut' static

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/dispnv50/headc57d.c:173:1: warning: no previous 
prototype for ‘headc57d_olut’ [-Wmissing-prototypes]

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Lyude Paul 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c 
b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
index fd51527b56b83..bdcfd240d61c8 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
@@ -169,7 +169,7 @@ headc57d_olut_load(struct drm_color_lut *in, int size, void 
__iomem *mem)
writew(readw(mem - 4), mem + 4);
 }
 
-bool
+static bool
 headc57d_olut(struct nv50_head *head, struct nv50_head_atom *asyh, int size)
 {
if (size != 0 && size != 256 && size != 1024)
-- 
2.27.0



[PATCH 07/40] drm/nouveau/nouveau_bo: Remove unused variables 'dev'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/nouveau_bo.c: In function ‘nouveau_ttm_tt_populate’:
 drivers/gpu/drm/nouveau/nouveau_bo.c:1228:17: warning: variable ‘dev’ set but 
not used [-Wunused-but-set-variable]
 drivers/gpu/drm/nouveau/nouveau_bo.c: In function ‘nouveau_ttm_tt_unpopulate’:
 drivers/gpu/drm/nouveau/nouveau_bo.c:1252:17: warning: variable ‘dev’ set but 
not used [-Wunused-but-set-variable]

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Sumit Semwal 
Cc: "Christian König" 
Cc: Jeremy Kolb 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Cc: linux-me...@vger.kernel.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/nouveau_bo.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c 
b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 3e09df0472ce4..37b3d2c10f5c5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1255,7 +1255,6 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev,
 {
struct ttm_tt *ttm_dma = (void *)ttm;
struct nouveau_drm *drm;
-   struct device *dev;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
 
if (ttm_tt_is_populated(ttm))
@@ -1268,7 +1267,6 @@ nouveau_ttm_tt_populate(struct ttm_device *bdev,
}
 
drm = nouveau_bdev(bdev);
-   dev = drm->dev->dev;
 
return ttm_pool_alloc(>ttm.bdev.pool, ttm, ctx);
 }
@@ -1278,14 +1276,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_device *bdev,
  struct ttm_tt *ttm)
 {
struct nouveau_drm *drm;
-   struct device *dev;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
 
if (slave)
return;
 
drm = nouveau_bdev(bdev);
-   dev = drm->dev->dev;
 
return ttm_pool_free(>ttm.bdev.pool, ttm);
 }
-- 
2.27.0



[PATCH 08/40] drm/nouveau/nouveau_display: Remove set but unused variable 'width'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/nouveau_display.c: In function 
‘nouveau_framebuffer_new’:
 drivers/gpu/drm/nouveau/nouveau_display.c:309:15: warning: variable ‘width’ 
set but not used [-Wunused-but-set-variable]

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/nouveau_display.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c 
b/drivers/gpu/drm/nouveau/nouveau_display.c
index dac02c7be54dc..be2327ce7394c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -306,7 +306,7 @@ nouveau_framebuffer_new(struct drm_device *dev,
struct nouveau_bo *nvbo = nouveau_gem_object(gem);
struct drm_framebuffer *fb;
const struct drm_format_info *info;
-   unsigned int width, height, i;
+   unsigned int height, i;
uint32_t tile_mode;
uint8_t kind;
int ret;
@@ -343,9 +343,9 @@ nouveau_framebuffer_new(struct drm_device *dev,
info = drm_get_format_info(dev, mode_cmd);
 
for (i = 0; i < info->num_planes; i++) {
-   width = drm_format_info_plane_width(info,
-   mode_cmd->width,
-   i);
+   drm_format_info_plane_width(info,
+   mode_cmd->width,
+   i);
height = drm_format_info_plane_height(info,
  mode_cmd->height,
  i);
-- 
2.27.0



[PATCH 04/40] include: drm: drm_atomic: Make use of 'new_plane_state'

2021-04-16 Thread Lee Jones
In the macro for_each_oldnew_plane_in_state() 'new_plane_state' is provided
as a container for state->planes[i].new_state, but is not utilised in
some use-cases, so we fake-use it instead.

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 
‘amdgpu_dm_commit_cursors’:
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7649:44: warning: 
variable ‘new_plane_state’ set but not used [-Wunused-but-set-variable]

Cc: Maarten Lankhorst 
Cc: Maxime Ripard 
Cc: Thomas Zimmermann 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Rob Clark 
Cc: dri-de...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 include/drm/drm_atomic.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index ac5a28eff2c86..259e6970dc836 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -871,7 +871,8 @@ void drm_state_dump(struct drm_device *dev, struct 
drm_printer *p);
 ((plane) = (__state)->planes[__i].ptr, \
  (void)(plane) /* Only to avoid 
unused-but-set-variable warning */, \
  (old_plane_state) = 
(__state)->planes[__i].old_state,\
- (new_plane_state) = 
(__state)->planes[__i].new_state, 1))
+ (new_plane_state) = 
(__state)->planes[__i].new_state, \
+ (void)(new_plane_state) /* Only to avoid 
unused-but-set-variable warning */, 1))
 
 /**
  * for_each_oldnew_plane_in_state_reverse - iterate over all planes in an 
atomic
-- 
2.27.0



[PATCH 06/40] drm/nouveau/nvkm/engine/gr/gf100: Demote non-conformant kernel-doc header

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:992: warning: Function 
parameter or member 'gr' not described in 'gf100_gr_wait_idle'

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 
b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
index 397ff4fe9df89..69e6008f99196 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
@@ -982,7 +982,7 @@ gf100_gr_zbc_init(struct gf100_gr *gr)
}
 }
 
-/**
+/*
  * Wait until GR goes idle. GR is considered idle if it is disabled by the
  * MC (0x200) register, or GR is not busy and a context switch is not in
  * progress.
-- 
2.27.0



[PATCH 03/40] drm/msm/dp/dp_display: Remove unused variable 'hpd'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/msm/dp/dp_display.c: In function 
‘dp_display_usbpd_attention_cb’:
 drivers/gpu/drm/msm/dp/dp_display.c:496:19: warning: variable ‘hpd’ set but 
not used [-Wunused-but-set-variable]

Cc: Rob Clark 
Cc: Sean Paul 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Kuogee Hsieh 
Cc: linux-arm-...@vger.kernel.org
Cc: dri-de...@lists.freedesktop.org
Cc: freedr...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/msm/dp/dp_display.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c 
b/drivers/gpu/drm/msm/dp/dp_display.c
index 5a39da6e1eaf2..31bf2a40a9eb2 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -493,7 +493,6 @@ static int dp_display_usbpd_attention_cb(struct device *dev)
int rc = 0;
u32 sink_request;
struct dp_display_private *dp;
-   struct dp_usbpd *hpd;
 
if (!dev) {
DRM_ERROR("invalid dev\n");
@@ -507,8 +506,6 @@ static int dp_display_usbpd_attention_cb(struct device *dev)
return -ENODEV;
}
 
-   hpd = dp->usbpd;
-
/* check for any test request issued by sink */
rc = dp_link_process_request(dp->link);
if (!rc) {
-- 
2.27.0



[PATCH 05/40] drm/nouveau/nvkm/subdev/volt/gk20a: Demote non-conformant kernel-doc headers

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:53: warning: Function 
parameter or member 'speedo' not described in 'gk20a_volt_get_cvb_voltage'
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:53: warning: Function 
parameter or member 's_scale' not described in 'gk20a_volt_get_cvb_voltage'
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:53: warning: Function 
parameter or member 'coef' not described in 'gk20a_volt_get_cvb_voltage'
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:69: warning: Function 
parameter or member 'speedo' not described in 'gk20a_volt_get_cvb_t_voltage'
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:69: warning: Function 
parameter or member 'temp' not described in 'gk20a_volt_get_cvb_t_voltage'
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:69: warning: Function 
parameter or member 's_scale' not described in 'gk20a_volt_get_cvb_t_voltage'
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:69: warning: Function 
parameter or member 't_scale' not described in 'gk20a_volt_get_cvb_t_voltage'
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:69: warning: Function 
parameter or member 'coef' not described in 'gk20a_volt_get_cvb_t_voltage'

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
index 8c2faa9645111..ccac88da88648 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
@@ -45,7 +45,7 @@ static const struct cvb_coef gk20a_cvb_coef[] = {
/* 852 */ { 1608418, -21643, -269, 0,763,  -48},
 };
 
-/**
+/*
  * cvb_mv = ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0)
  */
 static inline int
@@ -58,7 +58,7 @@ gk20a_volt_get_cvb_voltage(int speedo, int s_scale, const 
struct cvb_coef *coef)
return mv;
 }
 
-/**
+/*
  * cvb_t_mv =
  * ((c2 * speedo / s_scale + c1) * speedo / s_scale + c0) +
  * ((c3 * speedo / s_scale + c4 + c5 * T / t_scale) * T / t_scale)
-- 
2.27.0



[PATCH 01/40] drm/nouveau/nvkm/subdev/bios/init: Demote obvious abuse of kernel-doc

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c:584: warning: Function 
parameter or member 'init' not described in 'init_reserved'
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c:611: warning: Function 
parameter or member 'init' not described in 'init_done'
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c:622: warning: Function 
parameter or member 'init' not described in 'init_io_restrict_prog'
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c:659: warning: Function 
parameter or member 'init' not described in 'init_repeat'
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c:685: warning: Function 
parameter or member 'init' not described in 'init_io_restrict_pll'
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c:725: warning: Function 
parameter or member 'init' not described in 'init_end_repeat'

NB: Trimmed for brevity (lots of these!)

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 .../gpu/drm/nouveau/nvkm/subdev/bios/init.c   | 204 ++
 1 file changed, 68 insertions(+), 136 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
index 9de74f41dcd2a..5a91dc4e5c8ec 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
@@ -575,9 +575,8 @@ init_tmds_reg(struct nvbios_init *init, u8 tmds)
  * init opcode handlers
  */
 
-/**
+/*
  * init_reserved - stub for various unknown/unused single-byte opcodes
- *
  */
 static void
 init_reserved(struct nvbios_init *init)
@@ -602,9 +601,8 @@ init_reserved(struct nvbios_init *init)
init->offset += length;
 }
 
-/**
+/*
  * INIT_DONE - opcode 0x71
- *
  */
 static void
 init_done(struct nvbios_init *init)
@@ -613,9 +611,8 @@ init_done(struct nvbios_init *init)
init->offset = 0x;
 }
 
-/**
+/*
  * INIT_IO_RESTRICT_PROG - opcode 0x32
- *
  */
 static void
 init_io_restrict_prog(struct nvbios_init *init)
@@ -650,9 +647,8 @@ init_io_restrict_prog(struct nvbios_init *init)
trace("}]\n");
 }
 
-/**
+/*
  * INIT_REPEAT - opcode 0x33
- *
  */
 static void
 init_repeat(struct nvbios_init *init)
@@ -676,9 +672,8 @@ init_repeat(struct nvbios_init *init)
init->repeat = repeat;
 }
 
-/**
+/*
  * INIT_IO_RESTRICT_PLL - opcode 0x34
- *
  */
 static void
 init_io_restrict_pll(struct nvbios_init *init)
@@ -716,9 +711,8 @@ init_io_restrict_pll(struct nvbios_init *init)
trace("}]\n");
 }
 
-/**
+/*
  * INIT_END_REPEAT - opcode 0x36
- *
  */
 static void
 init_end_repeat(struct nvbios_init *init)
@@ -732,9 +726,8 @@ init_end_repeat(struct nvbios_init *init)
}
 }
 
-/**
+/*
  * INIT_COPY - opcode 0x37
- *
  */
 static void
 init_copy(struct nvbios_init *init)
@@ -759,9 +752,8 @@ init_copy(struct nvbios_init *init)
init_wrvgai(init, port, index, data);
 }
 
-/**
+/*
  * INIT_NOT - opcode 0x38
- *
  */
 static void
 init_not(struct nvbios_init *init)
@@ -771,9 +763,8 @@ init_not(struct nvbios_init *init)
init_exec_inv(init);
 }
 
-/**
+/*
  * INIT_IO_FLAG_CONDITION - opcode 0x39
- *
  */
 static void
 init_io_flag_condition(struct nvbios_init *init)
@@ -788,9 +779,8 @@ init_io_flag_condition(struct nvbios_init *init)
init_exec_set(init, false);
 }
 
-/**
+/*
  * INIT_GENERIC_CONDITION - opcode 0x3a
- *
  */
 static void
 init_generic_condition(struct nvbios_init *init)
@@ -840,9 +830,8 @@ init_generic_condition(struct nvbios_init *init)
}
 }
 
-/**
+/*
  * INIT_IO_MASK_OR - opcode 0x3b
- *
  */
 static void
 init_io_mask_or(struct nvbios_init *init)
@@ -859,9 +848,8 @@ init_io_mask_or(struct nvbios_init *init)
init_wrvgai(init, 0x03d4, index, data &= ~(1 << or));
 }
 
-/**
+/*
  * INIT_IO_OR - opcode 0x3c
- *
  */
 static void
 init_io_or(struct nvbios_init *init)
@@ -878,9 +866,8 @@ init_io_or(struct nvbios_init *init)
init_wrvgai(init, 0x03d4, index, data | (1 << or));
 }
 
-/**
+/*
  * INIT_ANDN_REG - opcode 0x47
- *
  */
 static void
 init_andn_reg(struct nvbios_init *init)
@@ -895,9 +882,8 @@ init_andn_reg(struct nvbios_init *init)
init_mask(init, reg, mask, 0);
 }
 
-/**
+/*
  * INIT_OR_REG - opcode 0x48
- *
  */
 static void
 init_or_reg(struct nvbios_init *init)
@@ -912,9 +898,8 @@ init_or_reg(struct nvbios_init *init)
init_mask(init, reg, 0, mask);
 }
 
-/**
+/*
  * INIT_INDEX_ADDRESS_LATCHED - opcode 0x49
- *
  */
 static void
 init_idx_addr_latched(struct nvbios_init *init)
@@ -942,9 +927,8 @@ init_idx_addr_latched(struct nvbios_init *init)
}
 }
 
-/**
+/*
  * INIT_IO_RESTRICT_PLL2 - opcode 0x4a
- *
  */
 static void
 init_io_restrict_pll2(struct nvbios_init *init)
@@ -977,9 +961,8 @@ init_io_restrict_pll2(

[PATCH 00/40] [Set 16] Rid W=1 warnings from GPU!

2021-04-16 Thread Lee Jones
This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

Lee Jones (40):
  drm/nouveau/nvkm/subdev/bios/init: Demote obvious abuse of kernel-doc
  drm/nouveau/dispnv50/disp: Remove unused variable 'ret'
  drm/msm/dp/dp_display: Remove unused variable 'hpd'
  include: drm: drm_atomic: Make use of 'new_plane_state'
  drm/nouveau/nvkm/subdev/volt/gk20a: Demote non-conformant kernel-doc
headers
  drm/nouveau/nvkm/engine/gr/gf100: Demote non-conformant kernel-doc
header
  drm/nouveau/nouveau_bo: Remove unused variables 'dev'
  drm/nouveau/nouveau_display: Remove set but unused variable 'width'
  drm/nouveau/dispnv04/crtc: Demote non-conforming kernel-doc headers
  drm/nouveau/dispnv50/disp: Remove unused variable 'ret' from function
returning void
  drm/nouveau/dispnv50/headc57d: Make local function 'headc57d_olut'
static
  drm/nouveau/nv50_display: Remove superfluous prototype for local
static functions
  drm/nouveau/dispnv50/disp: Include header containing our prototypes
  drm/nouveau/nouveau_ioc32: File headers are not good candidates for
kernel-doc
  drm/nouveau/nouveau_svm: Remove unused variable 'ret' from void
function
  drm/nouveau/nouveau_ioc32: Demote kernel-doc abuse to standard comment
block
  gpu: host1x: bus: Remove superfluous param description 'key'
  drm/omapdrm/omap_irq: Fix a couple of incorrectly documented functions
  drm/omapdrm/omap_gem: Properly document omap_gem_dumb_map_offset()
  drm/xlnx/zynqmp_disp: Fix incorrectly documented enum 'zynqmp_disp_id'
  drm/xlnx/zynqmp_dp: Fix a little potential doc-rot
  drm/ttm/ttm_tt: Demote non-conformant kernel-doc header
  drm/ttm/ttm_bo: Fix incorrectly documented function
'ttm_bo_cleanup_refs'
  drm/scheduler/sched_entity: Fix some function name disparity
  drm/radeon/radeon_device: Provide function name in kernel-doc header
  drm/amd/amdgpu/amdgpu_device: Remove unused variable 'r'
  drm/ttm/ttm_device: Demote kernel-doc abuses
  drm/panel/panel-raspberrypi-touchscreen: Demote kernel-doc abuse
  drm/amd/amdgpu/amdgpu_fence: Provide description for 'sched_score'
  drm/vgem/vgem_drv: Demote kernel-doc abuse
  drm/amd/amdgpu/amdgpu_gart: Correct a couple of function names in the
docs
  drm/amd/amdgpu/amdgpu_ttm: Fix incorrectly documented function
'amdgpu_ttm_copy_mem_to_mem()'
  drm/amd/amdgpu/amdgpu_ring: Provide description for 'sched_score'
  drm/exynos/exynos_drm_fimd: Realign function name with its header
  drm/amd/amdgpu/amdgpu_cs: Repair some function naming disparity
  drm/exynos/exynos7_drm_decon: Realign function name with its header
  drm/panel/panel-sitronix-st7701: Demote kernel-doc format abuse
  drm/exynos/exynos_drm_ipp: Fix some function name disparity issues
  drm/sti/sti_hdmi: Provide kernel-doc headers with function names
  drm/mediatek/mtk_disp_ccorr: Demote less than half-populated struct
header

 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c|   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c|   5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c  |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c  |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c   |   2 +-
 drivers/gpu/drm/exynos/exynos7_drm_decon.c|   2 +-
 drivers/gpu/drm/exynos/exynos_drm_fimd.c  |   2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c   |   4 +-
 drivers/gpu/drm/mediatek/mtk_disp_ccorr.c |   2 +-
 drivers/gpu/drm/msm/dp/dp_display.c   |   3 -
 drivers/gpu/drm/nouveau/dispnv04/crtc.c   |   4 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c   |  10 +-
 drivers/gpu/drm/nouveau/dispnv50/headc57d.c   |   2 +-
 drivers/gpu/drm/nouveau/nouveau_bo.c  |   4 -
 drivers/gpu/drm/nouveau/nouveau_display.c |   8 +-
 drivers/gpu/drm/nouveau/nouveau_ioc32.c   |   4 +-
 drivers/gpu/drm/nouveau/nouveau_svm.c |   5 +-
 drivers/gpu/drm/nouveau/nv50_display.h|   3 -
 .../gpu/drm/nouveau/nvkm/engine/gr/gf100.c|   2 +-
 .../gpu/drm/nouveau/nvkm/subdev/bios/init.c   | 204 ++
 .../gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c  |   4 +-
 drivers/gpu/drm/omapdrm/omap_gem.c|   2 +-
 drivers/gpu/drm/omapdrm/omap_irq.c|   4 +-
 .../drm/panel/panel-raspberrypi-touchscreen.c |   2 +-
 drivers/gpu/drm/panel/panel-sitronix-st7701.c |   2 +-
 drivers/gpu/drm/radeon/radeon_device.c|   3 +-
 drivers/gpu/drm/scheduler/sched_entity.c  |   6 +-
 drivers/gpu/drm/sti/sti_hdmi.c|  18 +-
 drivers/gpu/drm/ttm/ttm_bo.c  |   2 +-
 drivers/gpu/drm/ttm/ttm_device.c  |   4 +-
 drivers/gpu/drm/ttm/ttm_tt.c  |   2 +-
 drivers/gpu/drm/vgem/vgem_drv.c   |   2 +-
 drivers/gpu/drm/xlnx/zynqmp_disp.c|   2 +-
 drivers/gpu/drm/xlnx/zynqmp_dp.c  |   2 +-
 drivers/gpu/host1x/bus.c  |   1

[PATCH 02/40] drm/nouveau/dispnv50/disp: Remove unused variable 'ret'

2021-04-16 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/nouveau/dispnv50/disp.c:1381:6: warning: variable ‘ret’ set 
but not used [-Wunused-but-set-variable]

Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Signed-off-by: Lee Jones 
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c 
b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 1c9c0cdf85dbc..4801aafd9552b 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1410,10 +1410,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm)
 {
struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
struct drm_encoder *encoder;
-   int ret;
 
NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name);
-   ret = drm_dp_update_payload_part1(>mgr);
+   drm_dp_update_payload_part1(>mgr);
 
drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
-- 
2.27.0



Re: [PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used

2021-04-15 Thread Lee Jones
On Thu, 15 Apr 2021, Ian Abbott wrote:

> On 14/04/2021 19:11, Lee Jones wrote:
> > ... and mark it as __maybe_unused since not all users of the
> > header file reference it.
> > 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/staging/comedi/drivers/ni_mio_common.c:163:35: warning: 
> > ‘range_ni_E_ao_ext’ defined but not used [-Wunused-const-variable=]
> > 
> > Cc: Ian Abbott 
> > Cc: H Hartley Sweeten 
> > Cc: Greg Kroah-Hartman 
> > Cc: Thierry Reding 
> > Cc: "Uwe Kleine-König" 
> > Cc: Lee Jones 
> > Cc: "David A. Schleef" 
> > Cc: Mori Hess 
> > Cc: Truxton Fulton 
> > Cc: linux-stag...@lists.linux.dev
> > Cc: linux-...@vger.kernel.org
> > Signed-off-by: Lee Jones 
> > ---
> >   drivers/staging/comedi/drivers/ni_mio_common.c | 9 -
> >   drivers/staging/comedi/drivers/ni_stc.h| 9 -
> >   2 files changed, 8 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c 
> > b/drivers/staging/comedi/drivers/ni_mio_common.c
> > index 4f80a4991f953..37615b4e2c10d 100644
> > --- a/drivers/staging/comedi/drivers/ni_mio_common.c
> > +++ b/drivers/staging/comedi/drivers/ni_mio_common.c
> > @@ -160,15 +160,6 @@ static const struct comedi_lrange range_ni_M_ai_628x = 
> > {
> > }
> >   };
> > -static const struct comedi_lrange range_ni_E_ao_ext = {
> > -   4, {
> > -   BIP_RANGE(10),
> > -   UNI_RANGE(10),
> > -   RANGE_ext(-1, 1),
> > -   RANGE_ext(0, 1)
> > -   }
> > -};
> > -
> >   static const struct comedi_lrange *const ni_range_lkup[] = {
> > [ai_gain_16] = _ni_E_ai,
> > [ai_gain_8] = _ni_E_ai_limited,
> > diff --git a/drivers/staging/comedi/drivers/ni_stc.h 
> > b/drivers/staging/comedi/drivers/ni_stc.h
> > index fbc0b753a0f59..0822e65f709dd 100644
> > --- a/drivers/staging/comedi/drivers/ni_stc.h
> > +++ b/drivers/staging/comedi/drivers/ni_stc.h
> > @@ -1137,6 +1137,13 @@ struct ni_private {
> > u8 rgout0_usage;
> >   };
> > -static const struct comedi_lrange range_ni_E_ao_ext;
> > +static const struct comedi_lrange __maybe_unused range_ni_E_ao_ext = {
> > +   4, {
> > +   BIP_RANGE(10),
> > +   UNI_RANGE(10),
> > +   RANGE_ext(-1, 1),
> > +   RANGE_ext(0, 1)
> > +   }
> > +};
> >   #endif /* _COMEDI_NI_STC_H */
> > 
> 
> I think it is better where it is for now with its fellow struct
> comedi_lrange variables, but feel free to mark it as __maybe_unused.

Can do.  Will fix.

> (Really, the #include "ni_mio_common.c" mess needs sorting out sometime.)

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 57/57] staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret'

2021-04-15 Thread Lee Jones
On Thu, 15 Apr 2021, Fabio Aiuto wrote:

> On Wed, Apr 14, 2021 at 07:11:29PM +0100, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
> > ‘CardDisableRTL8723BSdio’:
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable 
> > ‘ret’ set but not used [-Wunused-but-set-variable]
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
> > ‘CardDisableRTL8723BSdio’:
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable 
> > ‘ret’ set but not used [-Wunused-but-set-variable]
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
> > ‘CardDisableRTL8723BSdio’:
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable 
> > ‘ret’ set but not used [-Wunused-but-set-variable]
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
> > ‘CardDisableRTL8723BSdio’:
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable 
> > ‘ret’ set but not used [-Wunused-but-set-variable]
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
> > ‘CardDisableRTL8723BSdio’:
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable 
> > ‘ret’ set but not used [-Wunused-but-set-variable]
> > 
> > Cc: Greg Kroah-Hartman 
> > Cc: Fabio Aiuto 
> > Cc: Stanley@BB.SD3
> > Cc: linux-stag...@lists.linux.dev
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c 
> > b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> > index f6d734dd1a24f..60d3d6d1ba678 100644
> > --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> > +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> > @@ -878,10 +878,9 @@ static void CardDisableRTL8723BSdio(struct adapter 
> > *padapter)
> >  {
> > u8 u1bTmp;
> > u8 bMacPwrCtrlOn;
> > -   u8 ret = _FAIL;
> >  
> > /*  Run LPS WL RFOFF flow */
> > -   ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, 
> > PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
> > +   HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, 
> > PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
> >  
> > /*   Reset digital sequence   == */
> >  
> > @@ -909,9 +908,8 @@ static void CardDisableRTL8723BSdio(struct adapter 
> > *padapter)
> > /*   Reset digital sequence end == */
> >  
> > bMacPwrCtrlOn = false;  /*  Disable CMD53 R/W */
> > -   ret = false;
> > rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, );
> > -   ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, 
> > PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> > +   HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, 
> > PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> >  }
> >  
> >  static u32 rtl8723bs_hal_deinit(struct adapter *padapter)
> 
> perhaps it's better to check the return value and return it
> to the caller if something goes wrong,

No problem.  Will fix.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 48/57] staging: comedi: drivers: jr3_pci: Remove set but unused variable 'min_full_scale'

2021-04-15 Thread Lee Jones
On Thu, 15 Apr 2021, Ian Abbott wrote:

> On 14/04/2021 19:11, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >   drivers/staging/comedi/drivers/jr3_pci.c: In function 
> > ‘jr3_pci_poll_subdevice’:
> >   drivers/staging/comedi/drivers/jr3_pci.c:507:22: warning: variable 
> > ‘min_full_scale’ set but not used [-Wunused-but-set-variable]
> > 
> > Cc: Ian Abbott 
> > Cc: H Hartley Sweeten 
> > Cc: Greg Kroah-Hartman 
> > Cc: "Alexander A. Klimov" 
> > Cc: Anders Blomdell 
> > Cc: linux-stag...@lists.linux.dev
> > Signed-off-by: Lee Jones 
> > ---
> >   drivers/staging/comedi/drivers/jr3_pci.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/comedi/drivers/jr3_pci.c 
> > b/drivers/staging/comedi/drivers/jr3_pci.c
> > index 7a02c4fa3cda8..afa2f8d5c8c0c 100644
> > --- a/drivers/staging/comedi/drivers/jr3_pci.c
> > +++ b/drivers/staging/comedi/drivers/jr3_pci.c
> > @@ -504,10 +504,9 @@ jr3_pci_poll_subdevice(struct comedi_subdevice *s)
> > result = poll_delay_min_max(20, 100);
> > } else {
> > /* Set full scale */
> > -   struct six_axis_t min_full_scale;
> > struct six_axis_t max_full_scale;
> > -   min_full_scale = get_min_full_scales(sensor);
> > +   get_min_full_scales(sensor);
> > max_full_scale = get_max_full_scales(sensor);
> > set_full_scales(sensor, max_full_scale);
> > 
> 
> get_min_full_scales() could be removed altogether.  It was only being called
> originally so the driver could printk the values, but those printks have
> since been removed.

Even better.  Thanks Ian.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used

2021-04-15 Thread Lee Jones
On Thu, 15 Apr 2021, Uwe Kleine-König wrote:

> Hello Lee,
> 
> nitpick: You move range_ni_E_ao_ext to the header. However that header
> doesn't use range_ni_E_ao_ext, so the subject is technically wrong.

It's implicitly used by the users of the header.

But I know what you mean.

I'll see if I can make the subject line a little more clear.

> On Wed, Apr 14, 2021 at 07:11:27PM +0100, Lee Jones wrote:
> > ... and mark it as __maybe_unused since not all users of the
> > header file reference it.
> > 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/staging/comedi/drivers/ni_mio_common.c:163:35: warning: 
> > ‘range_ni_E_ao_ext’ defined but not used [-Wunused-const-variable=]
> > 
> > Cc: Ian Abbott 
> > Cc: H Hartley Sweeten 
> > Cc: Greg Kroah-Hartman 
> > Cc: Thierry Reding 
> > Cc: "Uwe Kleine-König" 
> > Cc: Lee Jones 
> > Cc: "David A. Schleef" 
> > Cc: Mori Hess 
> > Cc: Truxton Fulton 
> > Cc: linux-stag...@lists.linux.dev
> > Cc: linux-...@vger.kernel.org
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/staging/comedi/drivers/ni_mio_common.c | 9 -
> >  drivers/staging/comedi/drivers/ni_stc.h| 9 -
> >  2 files changed, 8 insertions(+), 10 deletions(-)

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

2021-04-15 Thread Lee Jones
On Thu, 15 Apr 2021, Dan Carpenter wrote:

> I screwed up my last email and dropped Lee and Arnd from the To: headers.
> Resending.
> 
> On Thu, Apr 15, 2021 at 08:20:16AM +0300, Dan Carpenter wrote:
> > On Wed, Apr 14, 2021 at 07:11:09PM +0100, Lee Jones wrote:
> > > ---
> > >  drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +++-
> > >  1 file changed, 11 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c 
> > > b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > > index c95ae4d6a3b6b..cc14f00947781 100644
> > > --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > > +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > > @@ -224,7 +224,7 @@ static char *translate_scan(struct adapter *padapter,
> > >   /* parsing WPA/WPA2 IE */
> > >   {
> > >   u8 *buf;
> > > - u8 wpa_ie[255], rsn_ie[255];
> > > + u8 *wpa_ie, *rsn_ie;
> > >   u16 wpa_len = 0, rsn_len = 0;
> > >   u8 *p;
> > >  
> > > @@ -232,6 +232,14 @@ static char *translate_scan(struct adapter *padapter,
> > >   if (!buf)
> > >   return start;
> 
> Arnd added this return.  I think it should be -ENOMEM, though?

Will fix, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 15/57] staging: rtl8723bs: core: rtw_security: Demote non-conformant kernel-doc header

2021-04-15 Thread Lee Jones
On Thu, 15 Apr 2021, Fabio Aiuto wrote:

> On Wed, Apr 14, 2021 at 07:10:47PM +0100, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  from drivers/staging/rtl8188eu/core/rtw_security.c:10:
> >  drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function 
> > parameter or member 'p1k' not described in 'phase1'
> >  drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function 
> > parameter or member 'tk' not described in 'phase1'
> >  drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function 
> > parameter or member 'ta' not described in 'phase1'
> >  drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function 
> > parameter or member 'rc4key' not described in 'phase2'
> >  drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function 
> > parameter or member 'tk' not described in 'phase2'
> >  drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function 
> > parameter or member 'p1k' not described in 'phase2'
> >  drivers/staging/rtl8723bs/core/rtw_security.c:1937: warning: This comment 
> > starts with '/**', but isn't a kernel-doc comment. Refer 
> > Documentation/doc-guide/kernel-doc.rst
> > 
> > Cc: Greg Kroah-Hartman 
> > Cc: linux-stag...@lists.linux.dev
> > Signed-off-by: Lee Jones 
> > ---
> >  drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c 
> > b/drivers/staging/rtl8723bs/core/rtw_security.c
> > index 9587d89a6b24e..60b724729900e 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > @@ -1921,7 +1921,7 @@ const u8 rcons[] = {
> > /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
> >  };
> >  
> > -/**
> > +/*
> >   * Expand the cipher key into the encryption key schedule.
> >   *
> >   * @return the number of rounds for the given cipher key size.
> 
> Hi,
> 
> did you mean 'demote' in subject line?

I did.  Did I spell it incorrectly?

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH v2 1/1] mfd: intel_quark_i2c_gpio: Don't play dirty trick with const

2021-04-14 Thread Lee Jones
On Wed, 14 Apr 2021, Andy Shevchenko wrote:

> On Wed, Apr 14, 2021 at 06:13:19PM +0100, Lee Jones wrote:
> > On Fri, 26 Mar 2021, Lee Jones wrote:
> > 
> > > On Fri, 26 Mar 2021, Andy Shevchenko wrote:
> > > 
> > > > As Linus rightfully noticed, the driver plays dirty trick with const,
> > > > i.e. it assigns a place holder data structure to the const field
> > > > in the MFD cell and then drops the const by explicit casting. This is
> > > > not how it should be.
> > > > 
> > > > Assign local pointers of the cell and resource to the respective
> > > > non-const place holders in the intel_quark_i2c_setup() and
> > > > intel_quark_gpio_setup().
> > > > 
> > > > Reported-by: Linus Torvalds 
> > > > Signed-off-by: Andy Shevchenko 
> > > > ---
> > > > v2: eliminated bar parameter (Lee)
> > > >  drivers/mfd/intel_quark_i2c_gpio.c | 26 --
> > > >  1 file changed, 12 insertions(+), 14 deletions(-)
> > > 
> > > Neat.
> > > 
> > > Applied, thanks.
> > 
> > Am I still missing patches from you Andy?
> 
> Patches for fixes should be applied to for-next as well. I don't know why with
> my patches it diverged.
> 
> I have already commented on this when kbuild bot complained.
> 
> So,
> 
>   git checkout for-mfd-next
>   git merge for-mfd-fixes
> 
> or equivalent (cherry-pick) will fix that.

Ah, it's in -rc5.  Very good.  Thanks for the explanation.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog


[PATCH 56/57] staging: comedi: drivers: comedi_isadma: Fix misspelling of 'dma_chan1'

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/comedi/drivers/comedi_isadma.c:157: warning: Function 
parameter or member 'dma_chan1' not described in 'comedi_isadma_alloc'
 drivers/staging/comedi/drivers/comedi_isadma.c:157: warning: Excess function 
parameter 'dma_chan' description in 'comedi_isadma_alloc'

Cc: Ian Abbott 
Cc: H Hartley Sweeten 
Cc: Greg Kroah-Hartman 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/comedi/drivers/comedi_isadma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/comedi_isadma.c 
b/drivers/staging/comedi/drivers/comedi_isadma.c
index c729094298c2f..479b58e209ba6 100644
--- a/drivers/staging/comedi/drivers/comedi_isadma.c
+++ b/drivers/staging/comedi/drivers/comedi_isadma.c
@@ -143,7 +143,7 @@ EXPORT_SYMBOL_GPL(comedi_isadma_set_mode);
  * comedi_isadma_alloc - allocate and initialize the ISA DMA
  * @dev:   comedi_device struct
  * @n_desc:the number of cookies to allocate
- * @dma_chan:  DMA channel for the first cookie
+ * @dma_chan1: DMA channel for the first cookie
  * @dma_chan2: DMA channel for the second cookie
  * @maxsize:   the size of the buffer to allocate for each cookie
  * @dma_dir:   the DMA direction
-- 
2.27.0



[PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used

2021-04-14 Thread Lee Jones
... and mark it as __maybe_unused since not all users of the
header file reference it.

Fixes the following W=1 kernel build warning(s):

 drivers/staging/comedi/drivers/ni_mio_common.c:163:35: warning: 
‘range_ni_E_ao_ext’ defined but not used [-Wunused-const-variable=]

Cc: Ian Abbott 
Cc: H Hartley Sweeten 
Cc: Greg Kroah-Hartman 
Cc: Thierry Reding 
Cc: "Uwe Kleine-König" 
Cc: Lee Jones 
Cc: "David A. Schleef" 
Cc: Mori Hess 
Cc: Truxton Fulton 
Cc: linux-stag...@lists.linux.dev
Cc: linux-...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/staging/comedi/drivers/ni_mio_common.c | 9 -
 drivers/staging/comedi/drivers/ni_stc.h| 9 -
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c 
b/drivers/staging/comedi/drivers/ni_mio_common.c
index 4f80a4991f953..37615b4e2c10d 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -160,15 +160,6 @@ static const struct comedi_lrange range_ni_M_ai_628x = {
}
 };
 
-static const struct comedi_lrange range_ni_E_ao_ext = {
-   4, {
-   BIP_RANGE(10),
-   UNI_RANGE(10),
-   RANGE_ext(-1, 1),
-   RANGE_ext(0, 1)
-   }
-};
-
 static const struct comedi_lrange *const ni_range_lkup[] = {
[ai_gain_16] = _ni_E_ai,
[ai_gain_8] = _ni_E_ai_limited,
diff --git a/drivers/staging/comedi/drivers/ni_stc.h 
b/drivers/staging/comedi/drivers/ni_stc.h
index fbc0b753a0f59..0822e65f709dd 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -1137,6 +1137,13 @@ struct ni_private {
u8 rgout0_usage;
 };
 
-static const struct comedi_lrange range_ni_E_ao_ext;
+static const struct comedi_lrange __maybe_unused range_ni_E_ao_ext = {
+   4, {
+   BIP_RANGE(10),
+   UNI_RANGE(10),
+   RANGE_ext(-1, 1),
+   RANGE_ext(0, 1)
+   }
+};
 
 #endif /* _COMEDI_NI_STC_H */
-- 
2.27.0



[PATCH 57/57] staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret'

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ 
set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ 
set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ 
set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ 
set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ 
set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: Fabio Aiuto 
Cc: Stanley@BB.SD3
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c 
b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index f6d734dd1a24f..60d3d6d1ba678 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -878,10 +878,9 @@ static void CardDisableRTL8723BSdio(struct adapter 
*padapter)
 {
u8 u1bTmp;
u8 bMacPwrCtrlOn;
-   u8 ret = _FAIL;
 
/*  Run LPS WL RFOFF flow */
-   ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, 
PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
+   HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, 
PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
 
/*   Reset digital sequence   == */
 
@@ -909,9 +908,8 @@ static void CardDisableRTL8723BSdio(struct adapter 
*padapter)
/*   Reset digital sequence end == */
 
bMacPwrCtrlOn = false;  /*  Disable CMD53 R/W */
-   ret = false;
rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, );
-   ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, 
PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
+   HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, 
PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
 }
 
 static u32 rtl8723bs_hal_deinit(struct adapter *padapter)
-- 
2.27.0



[PATCH 54/57] staging: rtl8723bs: hal: rtl8723b_hal_init: Mark a bunch of debug variables as __maybe_unused

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function ‘SetHwReg8723B’:
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3507:32: warning: variable 
‘ioted’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3507:20: warning: variable 
‘masked’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3507:7: warning: variable 
‘input_b’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function 
‘GetHalDefVar8723B’:
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:46: warning: variable 
‘lowest_rate’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:34: warning: variable 
‘hight_rate’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:21: warning: variable 
‘curr_tx_sgi’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:7: warning: variable 
‘curr_tx_rate’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4071:20: warning: variable 
‘rate_mask2’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4071:8: warning: variable 
‘rate_mask1’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: Marco Cesati 
Cc: Fabio Aiuto 
Cc: Stanley@BB.SD3
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 4773f0dcd9819..ebed2a912dcdd 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -3348,7 +3348,8 @@ void SetHwReg8723B(struct adapter *padapter, u8 variable, 
u8 *val)
case HW_VAR_BASIC_RATE:
{
struct mlme_ext_info *mlmext_info = 
>mlmeextpriv.mlmext_info;
-   u16 input_b = 0, masked = 0, ioted = 0, BrateCfg = 0;
+   u16 __maybe_unused input_b = 0, __maybe_unused masked = 0;
+   u16 __maybe_unused ioted = 0, BrateCfg = 0;
u16 rrsr_2g_force_mask = (RRSR_11M|RRSR_5_5M|RRSR_1M);
u16 rrsr_2g_allow_mask = 
(RRSR_24M|RRSR_12M|RRSR_6M|RRSR_CCK_RATES);
 
@@ -3894,8 +3895,9 @@ u8 GetHalDefVar8723B(struct adapter *padapter, enum 
hal_def_variable variable, v
u8 mac_id = *(u8 *)pval;
u32 cmd;
u32 ra_info1, ra_info2;
-   u32 rate_mask1, rate_mask2;
-   u8 curr_tx_rate, curr_tx_sgi, hight_rate, lowest_rate;
+   u32 __maybe_unused rate_mask1, __maybe_unused 
rate_mask2;
+   u8 __maybe_unused curr_tx_rate, __maybe_unused 
curr_tx_sgi;
+   u8 __maybe_unused hight_rate, __maybe_unused 
lowest_rate;
 
cmd = 0x4100 | mac_id;
rtw_write32(padapter, REG_HMEBOX_DBG_2_8723B, cmd);
-- 
2.27.0



[PATCH 53/57] staging: rtl8723bs: core: rtw_mlme_ext: Move very large data buffer onto the heap

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘issue_probersp’:
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2543:1: warning: the frame size 
of 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Greg Kroah-Hartman 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index f708e7b9f8fc8..78ca8fbaab8da 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -2450,9 +2450,13 @@ void issue_probersp(struct adapter *padapter, unsigned 
char *da, u8 is_valid_p2p
u8 *ssid_ie;
signed int ssid_ielen;
signed int ssid_ielen_diff;
-   u8 buf[MAX_IE_SZ];
+   u8 *buf;
u8 *ies = 
pmgntframe->buf_addr+TXDESC_OFFSET+sizeof(struct ieee80211_hdr_3addr);
 
+   buf = rtw_zmalloc(MAX_IE_SZ);
+   if (!buf)
+   return;
+
ssid_ie = rtw_get_ie(ies+_FIXED_IE_LENGTH_, 
WLAN_EID_SSID, _ielen,
(pframe-ies)-_FIXED_IE_LENGTH_);
 
@@ -2478,6 +2482,7 @@ void issue_probersp(struct adapter *padapter, unsigned 
char *da, u8 is_valid_p2p
pframe += ssid_ielen_diff;
pattrib->pktlen += ssid_ielen_diff;
}
+   kfree (buf);
}
} else {
/* timestamp will be inserted by hardware */
-- 
2.27.0



[PATCH 52/57] staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable 'func_start'

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c: In function 
‘odm_InbandNoise_Monitor_NSeries’:
 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c:32:18: warning: variable 
‘func_start’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: Marco Cesati 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c 
b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
index e3b44481bd888..956e5a725a5d7 100644
--- a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
+++ b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
@@ -29,9 +29,8 @@ static s16 odm_InbandNoise_Monitor_NSeries(
u8 max_rf_path = 0, rf_path;
u8 reg_c50, reg_c58, valid_done = 0;
struct noise_level noise_data;
-   u32 start  = 0, func_start = 0;
+   u32 start  = 0;
 
-   func_start = jiffies;
pDM_Odm->noise_level.noise_all = 0;
 
if ((pDM_Odm->RFType == ODM_1T2R) || (pDM_Odm->RFType == ODM_2T2R))
-- 
2.27.0



[PATCH 50/57] staging: comedi: drivers: ni_routes: Demote non-conforming kernel-doc headers

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/comedi/drivers/ni_routes.c:249: warning: This comment starts 
with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/staging/comedi/drivers/ni_routes.c:398: warning: Function parameter or 
member 'routes' not described in 'ni_route_set_has_source'
 drivers/staging/comedi/drivers/ni_routes.c:398: warning: Function parameter or 
member 'source' not described in 'ni_route_set_has_source'
 drivers/staging/comedi/drivers/ni_routes.c:524: warning: Function parameter or 
member 'src_sel_reg_value' not described in 'ni_find_route_source'
 drivers/staging/comedi/drivers/ni_routes.c:524: warning: Function parameter or 
member 'dest' not described in 'ni_find_route_source'
 drivers/staging/comedi/drivers/ni_routes.c:524: warning: Function parameter or 
member 'tables' not described in 'ni_find_route_source'

Cc: Ian Abbott 
Cc: H Hartley Sweeten 
Cc: Greg Kroah-Hartman 
Cc: "Alexander A. Klimov" 
Cc: "Spencer E. Olson" 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/comedi/drivers/ni_routes.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_routes.c 
b/drivers/staging/comedi/drivers/ni_routes.c
index 1f2aa3b239a0d..f0f8cd424b309 100644
--- a/drivers/staging/comedi/drivers/ni_routes.c
+++ b/drivers/staging/comedi/drivers/ni_routes.c
@@ -245,7 +245,7 @@ unsigned int ni_get_valid_routes(const struct 
ni_route_tables *tables,
 }
 EXPORT_SYMBOL_GPL(ni_get_valid_routes);
 
-/**
+/*
  * List of NI global signal names that, as destinations, are only routeable
  * indirectly through the *_arg elements of the comedi_cmd structure.
  */
@@ -387,7 +387,7 @@ ni_find_route_set(const int destination,
 }
 EXPORT_SYMBOL_GPL(ni_find_route_set);
 
-/**
+/*
  * ni_route_set_has_source() - Determines whether the given source is in
  *included given route_set.
  *
@@ -506,7 +506,7 @@ s8 ni_route_to_register(const int src, const int dest,
 }
 EXPORT_SYMBOL_GPL(ni_route_to_register);
 
-/**
+/*
  * ni_find_route_source() - Finds the signal source corresponding to a signal
  * route (src-->dest) of the specified routing register
  * value and the specified route destination on the
-- 
2.27.0



[PATCH 51/57] staging: axis-fifo: axis-fifo: Fix function naming in the documentation

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/axis-fifo/axis-fifo.c:356: warning: expecting prototype for 
axis_fifo_write(). Prototype was for axis_fifo_read() instead

Cc: Greg Kroah-Hartman 
Cc: Jacob Feder 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/axis-fifo/axis-fifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/axis-fifo/axis-fifo.c 
b/drivers/staging/axis-fifo/axis-fifo.c
index 8eee17dc77ab9..b23eabb863d17 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -337,7 +337,7 @@ static void reset_ip_core(struct axis_fifo *fifo)
 }
 
 /**
- * axis_fifo_write() - Read a packet from AXIS-FIFO character device.
+ * axis_fifo_read() - Read a packet from AXIS-FIFO character device.
  * @f: Open file.
  * @buf: User space buffer to read to.
  * @len: User space buffer length.
-- 
2.27.0



[PATCH 48/57] staging: comedi: drivers: jr3_pci: Remove set but unused variable 'min_full_scale'

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/comedi/drivers/jr3_pci.c: In function ‘jr3_pci_poll_subdevice’:
 drivers/staging/comedi/drivers/jr3_pci.c:507:22: warning: variable 
‘min_full_scale’ set but not used [-Wunused-but-set-variable]

Cc: Ian Abbott 
Cc: H Hartley Sweeten 
Cc: Greg Kroah-Hartman 
Cc: "Alexander A. Klimov" 
Cc: Anders Blomdell 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/comedi/drivers/jr3_pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/jr3_pci.c 
b/drivers/staging/comedi/drivers/jr3_pci.c
index 7a02c4fa3cda8..afa2f8d5c8c0c 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -504,10 +504,9 @@ jr3_pci_poll_subdevice(struct comedi_subdevice *s)
result = poll_delay_min_max(20, 100);
} else {
/* Set full scale */
-   struct six_axis_t min_full_scale;
struct six_axis_t max_full_scale;
 
-   min_full_scale = get_min_full_scales(sensor);
+   get_min_full_scales(sensor);
max_full_scale = get_max_full_scales(sensor);
set_full_scales(sensor, max_full_scale);
 
-- 
2.27.0



[PATCH 49/57] staging: comedi: drivers: ni_tio: Fix slightly broken kernel-doc and demote others

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/comedi/drivers/ni_tio.c:1515: warning: Function parameter or 
member 'counter_dev' not described in 'ni_tio_get_routing'
 drivers/staging/comedi/drivers/ni_tio.c:1515: warning: Function parameter or 
member 'dest' not described in 'ni_tio_get_routing'
 drivers/staging/comedi/drivers/ni_tio.c:1515: warning: expecting prototype for 
Retrieves the register value of the current source of the output selector 
for(). Prototype was for ni_tio_get_routing() instead
 drivers/staging/comedi/drivers/ni_tio.c:1544: warning: This comment starts 
with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst
 drivers/staging/comedi/drivers/ni_tio.c:1584: warning: This comment starts 
with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst

Cc: Ian Abbott 
Cc: H Hartley Sweeten 
Cc: Greg Kroah-Hartman 
Cc: Mori Hess 
Cc: "J.P. Mellor" 
Cc: herman.bruynin...@mech.kuleuven.ac.be
Cc: wim.meeus...@mech.kuleuven.ac.be
Cc: klaas.gade...@mech.kuleuven.ac.be
Cc: Comedi 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/comedi/drivers/ni_tio.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_tio.c 
b/drivers/staging/comedi/drivers/ni_tio.c
index f6154addaa956..da6826d77e600 100644
--- a/drivers/staging/comedi/drivers/ni_tio.c
+++ b/drivers/staging/comedi/drivers/ni_tio.c
@@ -1501,7 +1501,7 @@ int ni_tio_insn_config(struct comedi_device *dev,
 }
 EXPORT_SYMBOL_GPL(ni_tio_insn_config);
 
-/**
+/*
  * Retrieves the register value of the current source of the output selector 
for
  * the given destination.
  *
@@ -1541,10 +1541,10 @@ int ni_tio_get_routing(struct ni_gpct_device 
*counter_dev, unsigned int dest)
 EXPORT_SYMBOL_GPL(ni_tio_get_routing);
 
 /**
- * Sets the register value of the selector MUX for the given destination.
- * @counter_dev:Pointer to general counter device.
- * @destination:Device-global identifier of route destination.
- * @register_value:
+ * ni_tio_set_routing() - Sets the register value of the selector MUX for the 
given destination.
+ * @counter_dev: Pointer to general counter device.
+ * @dest:Device-global identifier of route destination.
+ * @reg:
  * The first several bits of this value should store the desired
  * value to write to the register.  All other bits are for
  * transmitting information that modify the mode of the particular
@@ -1580,7 +1580,7 @@ int ni_tio_set_routing(struct ni_gpct_device 
*counter_dev, unsigned int dest,
 }
 EXPORT_SYMBOL_GPL(ni_tio_set_routing);
 
-/**
+/*
  * Sets the given destination MUX to its default value or disable it.
  *
  * Return: 0 if successful; -EINVAL if terminal is unknown.
-- 
2.27.0



[PATCH 47/57] staging: rtl8723bs: os_dep: ioctl_cfg80211: 'ack' is used when debug is enabled

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function 
‘_cfg80211_rtw_mgmt_tx’:
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2754:7: warning: variable 
‘ack’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 89a21eb63c0a9..48b64fb579755 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -2591,7 +2591,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter 
*padapter, u8 tx_ch, const u8 *b
struct pkt_attrib   *pattrib;
unsigned char *pframe;
int ret = _FAIL;
-   bool ack = true;
+   bool __maybe_unused ack = true;
struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
-- 
2.27.0



[PATCH 46/57] staging: rtl8723bs: hal: sdio_ops: Mark used 'err' as __maybe_unused and remove another

2021-04-14 Thread Lee Jones
'err' is only used if debug is enabled.

Also remove 4 year old TODO.

Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/sdio_ops.c: In function ‘sdio_read32’:
 drivers/staging/rtl8723bs/hal/sdio_ops.c:170:6: warning: variable ‘err’ set 
but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_ops.c: In function ‘sdio_read_mem’:
 drivers/staging/rtl8723bs/hal/sdio_ops.c:381:6: warning: variable ‘err’ set 
but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: Fabio Aiuto 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/hal/sdio_ops.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c 
b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index 701f1abbd0f07..51d72262d11e4 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -160,7 +160,7 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)
u32 ftaddr;
u8 shift;
u32 val;
-   s32 err;
+   s32 __maybe_unused err;
__le32 le_tmp;
 
adapter = intfhdl->padapter;
@@ -360,10 +360,7 @@ static void sdio_read_mem(
u8 *rmem
 )
 {
-   s32 err;
-
-   err = sdio_readN(intfhdl, addr, cnt, rmem);
-   /* TODO: Report error is err not zero */
+   sdio_readN(intfhdl, addr, cnt, rmem);
 }
 
 static void sdio_write_mem(
-- 
2.27.0



[PATCH 44/57] staging: rtl8723bs: hal: rtl8723b_phycfg: Fix a bunch of misnamed functions

2021-04-14 Thread Lee Jones
... and fix a misnamed param.

Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:53: warning: expecting 
prototype for PHY_QueryBBReg(). Prototype was for PHY_QueryBBReg_8723B() instead
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:87: warning: expecting 
prototype for PHY_SetBBReg(). Prototype was for PHY_SetBBReg_8723B() instead
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:252: warning: Function 
parameter or member 'RegAddr' not described in 'PHY_QueryRFReg_8723B'
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:252: warning: expecting 
prototype for PHY_QueryRFReg(). Prototype was for PHY_QueryRFReg_8723B() instead
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:285: warning: expecting 
prototype for PHY_SetRFReg(). Prototype was for PHY_SetRFReg_8723B() instead

Cc: Greg Kroah-Hartman 
Cc: karthik alapati 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
index f43abf9b0d225..011b42e1b9917 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
@@ -38,7 +38,7 @@ staticu32 phy_CalculateBitShift(u32 BitMask)
 
 
 /**
- * PHY_QueryBBReg - Read "specific bits" from BB register.
+ * PHY_QueryBBReg_8723B - Read "specific bits" from BB register.
  * @Adapter:
  * @RegAddr:   The target address to be readback
  * @BitMask:   The target bit position in the target address
@@ -66,7 +66,7 @@ u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 
RegAddr, u32 BitMask)
 
 
 /**
- * PHY_SetBBReg - Write "Specific bits" to BB register (page 8~).
+ * PHY_SetBBReg_8723B - Write "Specific bits" to BB register (page 8~).
  * @Adapter:
  * @RegAddr:   The target address to be modified
  * @BitMask:   The target bit position in the target address
@@ -231,10 +231,10 @@ static void phy_RFSerialWrite_8723B(
 
 
 /**
- * PHY_QueryRFReg - Query "Specific bits" to RF register (page 8~).
+ * PHY_QueryRFReg_8723B - Query "Specific bits" to RF register (page 8~).
  * @Adapter:
  * @eRFPath:   Radio path of A/B/C/D
- * @RegAdd:The target address to be read
+ * @RegAddr:   The target address to be read
  * @BitMask:   The target bit position in the target address
  * to be read
  *
@@ -263,7 +263,7 @@ u32 PHY_QueryRFReg_8723B(
 }
 
 /**
- * PHY_SetRFReg - Write "Specific bits" to RF register (page 8~).
+ * PHY_SetRFReg_8723B - Write "Specific bits" to RF register (page 8~).
  * @Adapter:
  * @eRFPath:   Radio path of A/B/C/D
  * @RegAddr:   The target address to be modified
-- 
2.27.0



[PATCH 40/57] staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable and dead code

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c: In function 
‘odm_InbandNoise_Monitor_NSeries’:
 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c:32:34: warning: variable 
‘func_end’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: Marco Cesati 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c 
b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
index c3de123e2a487..e3b44481bd888 100644
--- a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
+++ b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
@@ -29,7 +29,7 @@ static s16 odm_InbandNoise_Monitor_NSeries(
u8 max_rf_path = 0, rf_path;
u8 reg_c50, reg_c58, valid_done = 0;
struct noise_level noise_data;
-   u32 start  = 0, func_start = 0, func_end = 0;
+   u32 start  = 0, func_start = 0;
 
func_start = jiffies;
pDM_Odm->noise_level.noise_all = 0;
@@ -150,12 +150,6 @@ static s16 odm_InbandNoise_Monitor_NSeries(
if (bPauseDIG)
odm_PauseDIG(pDM_Odm, ODM_RESUME_DIG, IGIValue);
 
-   func_end = jiffies_to_msecs(jiffies - func_start);
-   /* printk("%s noise_a = %d, noise_b = %d noise_all:%d (%d ms)\n", 
__func__, */
-   /* pDM_Odm->noise_level.noise[ODM_RF_PATH_A], */
-   /* pDM_Odm->noise_level.noise[ODM_RF_PATH_B], */
-   /* pDM_Odm->noise_level.noise_all, func_end); */
-
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, 
("odm_DebugControlInbandNoise_Nseries() <==\n"));
return pDM_Odm->noise_level.noise_all;
 
-- 
2.27.0



[PATCH 35/57] staging: most: dim2: hal: Demote non-conformant kernel-doc headers

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/most/dim2/hal.c:99: warning: This comment starts with '/**', 
but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 
'buf_size' not described in 'dim_norm_isoc_buffer_size'
 drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 
'packet_length' not described in 'dim_norm_isoc_buffer_size'
 drivers/staging/most/dim2/hal.c:788: warning: expecting prototype for 
Retrieves maximal possible correct buffer size for isochronous data type(). 
Prototype was for dim_norm_isoc_buffer_size() instead
 drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 
'buf_size' not described in 'dim_norm_sync_buffer_size'
 drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 
'bytes_per_frame' not described in 'dim_norm_sync_buffer_size'
 drivers/staging/most/dim2/hal.c:802: warning: expecting prototype for 
Retrieves maximal possible correct buffer size for synchronous data type(). 
Prototype was for dim_norm_sync_buffer_size() instead

Cc: Greg Kroah-Hartman 
Cc: Lee Jones 
Cc: Andrey Shvetsov 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/most/dim2/hal.c  | 4 ++--
 drivers/staging/qlge/qlge_main.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/most/dim2/hal.c b/drivers/staging/most/dim2/hal.c
index 30112413f20a0..65282c2768628 100644
--- a/drivers/staging/most/dim2/hal.c
+++ b/drivers/staging/most/dim2/hal.c
@@ -96,9 +96,9 @@ static int dbr_get_mask_size(u16 size)
 }
 
 /**
- * Allocates DBR memory.
+ * alloc_dbr() - Allocates DBR memory.
  * @size: Allocating memory size.
- * @return Offset in DBR memory by success or DBR_SIZE if out of memory.
+ * Returns: Offset in DBR memory by success or DBR_SIZE if out of memory.
  */
 static int alloc_dbr(u16 size)
 {
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index c9dc6a852af4a..55a04ca9307c1 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -1389,7 +1389,7 @@ static void qlge_categorize_rx_err(struct qlge_adapter 
*qdev, u8 rx_err,
}
 }
 
-/**
+/*
  * qlge_update_mac_hdr_len - helper routine to update the mac header length
  * based on vlan tags if present
  */
@@ -2235,7 +2235,7 @@ static void qlge_vlan_mode(struct net_device *ndev, 
netdev_features_t features)
}
 }
 
-/**
+/*
  * qlge_update_hw_vlan_features - helper routine to reinitialize the adapter
  * based on the features to enable/disable hardware vlan accel
  */
-- 
2.27.0



[PATCH 43/57] staging: rtl8723bs: hal: rtl8723b_hal_init: Remove unused variable and dead code

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function 
‘CCX_FwC2HTxRpt_8723b’:
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3355:5: warning: variable 
‘seq_no’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: Marco Cesati 
Cc: Fabio Aiuto 
Cc: Stanley@BB.SD3
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 13 ++---
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 8d6ea8850556f..4773f0dcd9819 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -3199,23 +3199,14 @@ static void hw_var_set_mlme_join(struct adapter 
*padapter, u8 variable, u8 *val)
 
 void CCX_FwC2HTxRpt_8723b(struct adapter *padapter, u8 *pdata, u8 len)
 {
-   u8 seq_no;
-
 #defineGET_8723B_C2H_TX_RPT_LIFE_TIME_OVER(_Header)
LE_BITS_TO_1BYTE((_Header + 0), 6, 1)
 #defineGET_8723B_C2H_TX_RPT_RETRY_OVER(_Header)
LE_BITS_TO_1BYTE((_Header + 0), 7, 1)
 
-   seq_no = *(pdata+6);
-
if (GET_8723B_C2H_TX_RPT_RETRY_OVER(pdata) | 
GET_8723B_C2H_TX_RPT_LIFE_TIME_OVER(pdata)) {
rtw_ack_tx_done(>xmitpriv, 
RTW_SCTX_DONE_CCX_PKT_FAIL);
-   }
-/*
-   else if (seq_no != padapter->xmitpriv.seq_no) {
-   rtw_ack_tx_done(>xmitpriv, 
RTW_SCTX_DONE_CCX_PKT_FAIL);
-   }
-*/
-   else
+   } else {
rtw_ack_tx_done(>xmitpriv, RTW_SCTX_DONE_SUCCESS);
+   }
 }
 
 s32 c2h_id_filter_ccx_8723b(u8 *buf)
-- 
2.27.0



[PATCH 45/57] staging: rtl8723bs: hal: sdio_halinit: 'start' is only used if debug is enabled

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 
‘_ReadAdapterInfo8723BS’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:1170:16: warning: variable 
‘start’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: Fabio Aiuto 
Cc: Stanley@BB.SD3
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c 
b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 2098384efe927..f6d734dd1a24f 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1153,7 +1153,7 @@ static void _InitOtherVariable(struct adapter *Adapter)
 static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
 {
u8 val8;
-   unsigned long start;
+   unsigned long __maybe_unused start;
 
/*  before access eFuse, make sure card enable has been called */
if (!padapter->hw_init_completed)
-- 
2.27.0



[PATCH 42/57] staging: rtl8188eu: os_dep: rtw_android: Demote kernel-doc abuse

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8188eu/os_dep/rtw_android.c:56: warning: This comment 
starts with '/**', but isn't a kernel-doc comment. Refer 
Documentation/doc-guide/kernel-doc.rst

Cc: Larry Finger 
Cc: Greg Kroah-Hartman 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8188eu/os_dep/rtw_android.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/rtw_android.c 
b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
index f5763a9d70c58..91c51b5583d27 100644
--- a/drivers/staging/rtl8188eu/os_dep/rtw_android.c
+++ b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
@@ -52,7 +52,7 @@ struct android_wifi_priv_cmd {
int total_len;
 };
 
-/**
+/*
  * Local (static) functions and variables
  */
 
-- 
2.27.0



[PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c: In function ‘translate_scan’:
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:310:1: warning: the frame size 
of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_wx_set_mlme’:
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1128:6: warning: variable 
‘reason’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’:
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2548:33: warning: variable 
‘preorder_ctrl’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2573:33: warning: variable 
‘preorder_ctrl’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:36:27: warning: 
‘iw_operation_mode’ defined but not used [-Wunused-const-variable=]

Cc: Larry Finger 
Cc: Greg Kroah-Hartman 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index c95ae4d6a3b6b..cc14f00947781 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -224,7 +224,7 @@ static char *translate_scan(struct adapter *padapter,
/* parsing WPA/WPA2 IE */
{
u8 *buf;
-   u8 wpa_ie[255], rsn_ie[255];
+   u8 *wpa_ie, *rsn_ie;
u16 wpa_len = 0, rsn_len = 0;
u8 *p;
 
@@ -232,6 +232,14 @@ static char *translate_scan(struct adapter *padapter,
if (!buf)
return start;
 
+   wpa_ie = kzalloc(255, GFP_ATOMIC);
+   if (!wpa_ie)
+   return start;
+
+   rsn_ie = kzalloc(255, GFP_ATOMIC);
+   if (!rsn_ie)
+   return start;
+
rtw_get_sec_ie(pnetwork->network.ies, 
pnetwork->network.ie_length, rsn_ie, _len, wpa_ie, _len);
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, 
("rtw_wx_get_scan: ssid =%s\n", pnetwork->network.ssid.ssid));
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, 
("rtw_wx_get_scan: wpa_len =%d rsn_len =%d\n", wpa_len, rsn_len));
@@ -268,6 +276,8 @@ static char *translate_scan(struct adapter *padapter,
start = iwe_stream_add_point(info, start, stop, , 
rsn_ie);
}
kfree(buf);
+   kfree(wpa_ie);
+   kfree(rsn_ie);
}
 
{/* parsing WPS IE */
-- 
2.27.0



[PATCH 36/57] staging: axis-fifo: axis-fifo: Fix some formatting issues

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or 
member 'f' not described in 'axis_fifo_read'
 drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or 
member 'buf' not described in 'axis_fifo_read'
 drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or 
member 'len' not described in 'axis_fifo_read'
 drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or 
member 'off' not described in 'axis_fifo_read'
 drivers/staging/axis-fifo/axis-fifo.c:356: warning: expecting prototype for 
axis_fifo_write(). Prototype was for axis_fifo_read() instead
 drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or 
member 'f' not described in 'axis_fifo_write'
 drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or 
member 'buf' not described in 'axis_fifo_write'
 drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or 
member 'len' not described in 'axis_fifo_write'
 drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or 
member 'off' not described in 'axis_fifo_write'

Cc: Greg Kroah-Hartman 
Cc: "John B. Wyatt IV" 
Cc: Jacob Feder 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/axis-fifo/axis-fifo.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/axis-fifo/axis-fifo.c 
b/drivers/staging/axis-fifo/axis-fifo.c
index ed92810897389..8eee17dc77ab9 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -338,10 +338,10 @@ static void reset_ip_core(struct axis_fifo *fifo)
 
 /**
  * axis_fifo_write() - Read a packet from AXIS-FIFO character device.
- * @f Open file.
- * @buf User space buffer to read to.
- * @len User space buffer length.
- * @off Buffer offset.
+ * @f: Open file.
+ * @buf: User space buffer to read to.
+ * @len: User space buffer length.
+ * @off: Buffer offset.
  *
  * As defined by the device's documentation, we need to check the device's
  * occupancy before reading the length register and then the data. All these
@@ -460,10 +460,10 @@ static ssize_t axis_fifo_read(struct file *f, char __user 
*buf,
 
 /**
  * axis_fifo_write() - Write buffer to AXIS-FIFO character device.
- * @f Open file.
- * @buf User space buffer to write to the device.
- * @len User space buffer length.
- * @off Buffer offset.
+ * @f: Open file.
+ * @buf: User space buffer to write to the device.
+ * @len: User space buffer length.
+ * @off: Buffer offset.
  *
  * As defined by the device's documentation, we need to write to the device's
  * data buffer then to the device's packet length register atomically. Also,
-- 
2.27.0



[PATCH 38/57] staging: fbtft: fb_ili9320: Remove unused variable 'ret'

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/fbtft/fb_ili9320.c: In function ‘read_devicecode’:
 drivers/staging/fbtft/fb_ili9320.c:25:6: warning: variable ‘ret’ set but not 
used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: dri-de...@lists.freedesktop.org
Cc: linux-fb...@vger.kernel.org
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/fbtft/fb_ili9320.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fb_ili9320.c 
b/drivers/staging/fbtft/fb_ili9320.c
index f2e72d14431db..f0ebc40857b34 100644
--- a/drivers/staging/fbtft/fb_ili9320.c
+++ b/drivers/staging/fbtft/fb_ili9320.c
@@ -22,11 +22,10 @@
 
 static unsigned int read_devicecode(struct fbtft_par *par)
 {
-   int ret;
u8 rxbuf[8] = {0, };
 
write_reg(par, 0x);
-   ret = par->fbtftops.read(par, rxbuf, 4);
+   par->fbtftops.read(par, rxbuf, 4);
return (rxbuf[2] << 8) | rxbuf[3];
 }
 
-- 
2.27.0



[PATCH 41/57] staging: rtl8188eu: os_dep: mon: Demote non-conforming kernel-doc headers

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8188eu/os_dep/mon.c:21: warning: Function parameter or 
member 'skb' not described in 'unprotect_frame'
 drivers/staging/rtl8188eu/os_dep/mon.c:21: warning: Function parameter or 
member 'iv_len' not described in 'unprotect_frame'
 drivers/staging/rtl8188eu/os_dep/mon.c:21: warning: Function parameter or 
member 'icv_len' not described in 'unprotect_frame'
 drivers/staging/rtl8188eu/os_dep/mon.c:75: warning: Function parameter or 
member 'dev' not described in 'rtl88eu_mon_recv_hook'
 drivers/staging/rtl8188eu/os_dep/mon.c:75: warning: Function parameter or 
member 'frame' not described in 'rtl88eu_mon_recv_hook'
 drivers/staging/rtl8188eu/os_dep/mon.c:108: warning: Function parameter or 
member 'dev' not described in 'rtl88eu_mon_xmit_hook'
 drivers/staging/rtl8188eu/os_dep/mon.c:108: warning: Function parameter or 
member 'frame' not described in 'rtl88eu_mon_xmit_hook'
 drivers/staging/rtl8188eu/os_dep/mon.c:108: warning: Function parameter or 
member 'frag_len' not described in 'rtl88eu_mon_xmit_hook'

Cc: Larry Finger 
Cc: Greg Kroah-Hartman 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8188eu/os_dep/mon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/mon.c 
b/drivers/staging/rtl8188eu/os_dep/mon.c
index 73b9599fe0dc5..9b40de7d39e72 100644
--- a/drivers/staging/rtl8188eu/os_dep/mon.c
+++ b/drivers/staging/rtl8188eu/os_dep/mon.c
@@ -14,7 +14,7 @@
 #include 
 #include 
 
-/**
+/*
  * unprotect_frame() - unset Protected flag and strip off IV and ICV/MIC
  */
 static void unprotect_frame(struct sk_buff *skb, int iv_len, int icv_len)
@@ -65,7 +65,7 @@ static void mon_recv_encrypted(struct net_device *dev, const 
u8 *data,
netdev_info(dev, "Encrypted packets are not supported");
 }
 
-/**
+/*
  * rtl88eu_mon_recv_hook() - forward received frame to the monitor interface
  *
  * Assumes that the frame contains an IV and an ICV/MIC, and that
@@ -96,7 +96,7 @@ void rtl88eu_mon_recv_hook(struct net_device *dev, struct 
recv_frame *frame)
mon_recv_encrypted(dev, data, data_len);
 }
 
-/**
+/*
  * rtl88eu_mon_xmit_hook() - forward trasmitted frame to the monitor interface
  *
  * Assumes that:
-- 
2.27.0



[PATCH 39/57] staging: rtl8723bs: core: rtw_ieee80211: Fix incorrectly named function

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_ieee80211.c:889: warning: expecting 
prototype for ieee802_11_parse_elems(). Prototype was for 
rtw_ieee802_11_parse_elems() instead

Cc: Greg Kroah-Hartman 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c 
b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index d8513acf4911c..e341789954b99 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -875,7 +875,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, 
uint elen,
 }
 
 /**
- * ieee802_11_parse_elems - Parse information elements in management frames
+ * rtw_ieee802_11_parse_elems - Parse information elements in management frames
  * @start: Pointer to the start of IEs
  * @len: Length of IE buffer in octets
  * @elems: Data structure for parsed elements
-- 
2.27.0



[PATCH 33/57] staging: most: i2c: Fix a little doc-rot

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/most/i2c/i2c.c:66: warning: Function parameter or member 
'most_iface' not described in 'configure_channel'
 drivers/staging/most/i2c/i2c.c:66: warning: Function parameter or member 
'ch_idx' not described in 'configure_channel'
 drivers/staging/most/i2c/i2c.c:66: warning: Excess function parameter 'iface' 
description in 'configure_channel'
 drivers/staging/most/i2c/i2c.c:66: warning: Excess function parameter 
'channel' description in 'configure_channel'
 drivers/staging/most/i2c/i2c.c:121: warning: Function parameter or member 
'most_iface' not described in 'enqueue'
 drivers/staging/most/i2c/i2c.c:121: warning: Function parameter or member 
'ch_idx' not described in 'enqueue'
 drivers/staging/most/i2c/i2c.c:121: warning: Excess function parameter 'iface' 
description in 'enqueue'
 drivers/staging/most/i2c/i2c.c:121: warning: Excess function parameter 
'channel' description in 'enqueue'
 drivers/staging/most/i2c/i2c.c:166: warning: Function parameter or member 
'most_iface' not described in 'poison_channel'
 drivers/staging/most/i2c/i2c.c:166: warning: Function parameter or member 
'ch_idx' not described in 'poison_channel'
 drivers/staging/most/i2c/i2c.c:166: warning: Excess function parameter 'iface' 
description in 'poison_channel'
 drivers/staging/most/i2c/i2c.c:166: warning: Excess function parameter 
'channel_id' description in 'poison_channel'

Cc: Greg Kroah-Hartman 
Cc: Andrey Shvetsov 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/most/i2c/i2c.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/most/i2c/i2c.c b/drivers/staging/most/i2c/i2c.c
index 893a8babdb2f7..7042f10887bb6 100644
--- a/drivers/staging/most/i2c/i2c.c
+++ b/drivers/staging/most/i2c/i2c.c
@@ -51,8 +51,8 @@ static void pending_rx_work(struct work_struct *);
 
 /**
  * configure_channel - called from MOST core to configure a channel
- * @iface: interface the channel belongs to
- * @channel: channel to be configured
+ * @most_iface: interface the channel belongs to
+ * @ch_idx: channel to be configured
  * @channel_config: structure that holds the configuration information
  *
  * Return 0 on success, negative on failure.
@@ -107,8 +107,8 @@ static int configure_channel(struct most_interface 
*most_iface,
 
 /**
  * enqueue - called from MOST core to enqueue a buffer for data transfer
- * @iface: intended interface
- * @channel: ID of the channel the buffer is intended for
+ * @most_iface: intended interface
+ * @ch_idx: ID of the channel the buffer is intended for
  * @mbo: pointer to the buffer object
  *
  * Return 0 on success, negative on failure.
@@ -153,8 +153,8 @@ static int enqueue(struct most_interface *most_iface,
 
 /**
  * poison_channel - called from MOST core to poison buffers of a channel
- * @iface: pointer to the interface the channel to be poisoned belongs to
- * @channel_id: corresponding channel ID
+ * @most_iface: pointer to the interface the channel to be poisoned belongs to
+ * @ch_idx: corresponding channel ID
  *
  * Return 0 on success, negative on failure.
  *
-- 
2.27.0



[PATCH 34/57] staging: most: dim2: hal: Fix one kernel-doc header and demote two non-conforming ones

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/most/dim2/hal.c:99: warning: This comment starts with '/**', 
but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 
'buf_size' not described in 'dim_norm_isoc_buffer_size'
 drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 
'packet_length' not described in 'dim_norm_isoc_buffer_size'
 drivers/staging/most/dim2/hal.c:788: warning: expecting prototype for 
Retrieves maximal possible correct buffer size for isochronous data type(). 
Prototype was for dim_norm_isoc_buffer_size() instead
 drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 
'buf_size' not described in 'dim_norm_sync_buffer_size'
 drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 
'bytes_per_frame' not described in 'dim_norm_sync_buffer_size'
 drivers/staging/most/dim2/hal.c:802: warning: expecting prototype for 
Retrieves maximal possible correct buffer size for synchronous data type(). 
Prototype was for dim_norm_sync_buffer_size() instead

Cc: Greg Kroah-Hartman 
Cc: Andrey Shvetsov 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/most/dim2/hal.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/dim2/hal.c b/drivers/staging/most/dim2/hal.c
index 39e17a7d2f24b..30112413f20a0 100644
--- a/drivers/staging/most/dim2/hal.c
+++ b/drivers/staging/most/dim2/hal.c
@@ -97,7 +97,7 @@ static int dbr_get_mask_size(u16 size)
 
 /**
  * Allocates DBR memory.
- * @param size Allocating memory size.
+ * @size: Allocating memory size.
  * @return Offset in DBR memory by success or DBR_SIZE if out of memory.
  */
 static int alloc_dbr(u16 size)
@@ -778,7 +778,7 @@ void dim_service_mlb_int_irq(void)
writel(0, >MS1);
 }
 
-/**
+/*
  * Retrieves maximal possible correct buffer size for isochronous data type
  * conform to given packet length and not bigger than given buffer size.
  *
@@ -792,7 +792,7 @@ u16 dim_norm_isoc_buffer_size(u16 buf_size, u16 
packet_length)
return norm_isoc_buffer_size(buf_size, packet_length);
 }
 
-/**
+/*
  * Retrieves maximal possible correct buffer size for synchronous data type
  * conform to given bytes per frame and not bigger than given buffer size.
  *
-- 
2.27.0



[PATCH 32/57] staging: rtl8723bs: core: rtw_mlme_ext: 'evt_seq' is only used if CHECK_EVENT_SEQ is set

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘mlme_evt_hdl’:
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6004:5: warning: variable 
‘evt_seq’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘issue_probersp’:
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2543:1: warning: the frame size 
of 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Greg Kroah-Hartman 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index d1dbf234e9e02..f708e7b9f8fc8 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -5980,7 +5980,7 @@ u8 set_tx_beacon_cmd(struct adapter *padapter)
 
 u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf)
 {
-   u8 evt_seq;
+   u8 __maybe_unused evt_seq;
u8 evt_code;
u16 evt_sz;
uint*peventbuf;
-- 
2.27.0



[PATCH 31/57] staging: rtl8723bs: core: rtw_mlme: 'retry' is only used if REJOIN is set

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_mlme.c: In function 
‘rtw_joinbss_event_prehandle’:
 drivers/staging/rtl8723bs/core/rtw_mlme.c:1192:12: warning: variable ‘retry’ 
set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman 
Cc: Fabio Aiuto 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index c624887aeed0c..f8ce4f2d31e13 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1189,7 +1189,7 @@ static void rtw_joinbss_update_network(struct adapter 
*padapter, struct wlan_net
 /* define REJOIN */
 void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
 {
-   static u8 retry;
+   static u8 __maybe_unused retry;
struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL;
struct  sta_priv *pstapriv = >stapriv;
struct  mlme_priv *pmlmepriv = &(adapter->mlmepriv);
-- 
2.27.0



[PATCH 29/57] staging: most: dim2: Provide missing descriptions and fix doc-rot

2021-04-14 Thread Lee Jones
Also demote merely half-complete header.

Fixes the following W=1 kernel build warning(s):

 drivers/staging/most/dim2/dim2.c:69: warning: Function parameter or member 
'name' not described in 'hdm_channel'
 drivers/staging/most/dim2/dim2.c:69: warning: Function parameter or member 
'reset_dbr_size' not described in 'hdm_channel'
 drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 
'dev' not described in 'dim2_hdm'
 drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 
'name' not described in 'dim2_hdm'
 drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 
'clk_speed' not described in 'dim2_hdm'
 drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 
'clk' not described in 'dim2_hdm'
 drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 
'clk_pll' not described in 'dim2_hdm'
 drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 
'bus' not described in 'dim2_hdm'
 drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 
'on_netinfo' not described in 'dim2_hdm'
 drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 
'disable_platform' not described in 'dim2_hdm'
 drivers/staging/most/dim2/dim2.c:440: warning: Function parameter or member 
'most_iface' not described in 'configure_channel'
 drivers/staging/most/dim2/dim2.c:440: warning: Function parameter or member 
'ch_idx' not described in 'configure_channel'
 drivers/staging/most/dim2/dim2.c:440: warning: Function parameter or member 
'ccfg' not described in 'configure_channel'
 drivers/staging/most/dim2/dim2.c:440: warning: Excess function parameter 
'iface' description in 'configure_channel'
 drivers/staging/most/dim2/dim2.c:440: warning: Excess function parameter 
'channel' description in 'configure_channel'
 drivers/staging/most/dim2/dim2.c:440: warning: Excess function parameter 
'channel_config' description in 'configure_channel'
 drivers/staging/most/dim2/dim2.c:558: warning: Function parameter or member 
'most_iface' not described in 'enqueue'
 drivers/staging/most/dim2/dim2.c:558: warning: Function parameter or member 
'ch_idx' not described in 'enqueue'
 drivers/staging/most/dim2/dim2.c:558: warning: Excess function parameter 
'iface' description in 'enqueue'
 drivers/staging/most/dim2/dim2.c:558: warning: Excess function parameter 
'channel' description in 'enqueue'
 drivers/staging/most/dim2/dim2.c:591: warning: Function parameter or member 
'most_iface' not described in 'request_netinfo'
 drivers/staging/most/dim2/dim2.c:591: warning: Function parameter or member 
'ch_idx' not described in 'request_netinfo'
 drivers/staging/most/dim2/dim2.c:591: warning: Function parameter or member 
'on_netinfo' not described in 'request_netinfo'
 drivers/staging/most/dim2/dim2.c:591: warning: Excess function parameter 
'iface' description in 'request_netinfo'
 drivers/staging/most/dim2/dim2.c:591: warning: Excess function parameter 
'channel_id' description in 'request_netinfo'
 drivers/staging/most/dim2/dim2.c:631: warning: Function parameter or member 
'most_iface' not described in 'poison_channel'
 drivers/staging/most/dim2/dim2.c:631: warning: Function parameter or member 
'ch_idx' not described in 'poison_channel'
 drivers/staging/most/dim2/dim2.c:631: warning: Excess function parameter 
'iface' description in 'poison_channel'
 drivers/staging/most/dim2/dim2.c:631: warning: Excess function parameter 
'channel_id' description in 'poison_channel'

Cc: Greg Kroah-Hartman 
Cc: "Nícolas F. R. A. Prado" 
Cc: Andrey Shvetsov 
Cc: linux-stag...@lists.linux.dev
Signed-off-by: Lee Jones 
---
 drivers/staging/most/dim2/dim2.c | 23 +--
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index b34e3c130f53f..093ef9a2b2919 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -50,8 +50,10 @@ static DECLARE_TASKLET_OLD(dim2_tasklet, dim2_tasklet_fn);
 
 /**
  * struct hdm_channel - private structure to keep channel specific data
+ * @name: channel name
  * @is_initialized: identifier to know whether the channel is initialized
  * @ch: HAL specific channel data
+ * @reset_dbr_size: reset DBR data buffer size
  * @pending_list: list to keep MBO's before starting transfer
  * @started_list: list to keep MBO's after starting transfer
  * @direction: channel direction (TX or RX)
@@ -68,7 +70,7 @@ struct hdm_channel {
enum most_channel_data_type data_type;
 };
 
-/**
+/*
  * struct dim2_hdm - private structure to keep interface specific data
  * @hch: an array of channel specific data
  * @most_iface: most interface structure
@@ -428,9 +430,9 @@ static void complete_all_mbos(struct list_head *head)
 
 /**
  * configure_channel - initialize a channel
- * @iface: interface the channel belongs to
- * @channel: channel to be configured
- * @chan

  1   2   3   4   5   6   7   8   9   10   >