]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pinctrl: apple: Use unsigned int instead of unsigned
authorLinus Walleij <linusw@kernel.org>
Mon, 12 Jan 2026 10:20:31 +0000 (11:20 +0100)
committerLinus Walleij <linusw@kernel.org>
Tue, 13 Jan 2026 10:22:20 +0000 (11:22 +0100)
It is discouraged to use the ambiguous "unsigned" type, use
explicit unsigned int in the driver.

Reviewed-by: Sven Peter <sven@kernel.org>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/pinctrl-apple-gpio.c

index e1a7bc8cf7652ce5e6701bd054ab989364c75a82..a4161d59ab9f7427838261fae878b366ed38e152 100644 (file)
@@ -102,9 +102,9 @@ static u32 apple_gpio_get_reg(struct apple_gpio_pinctrl *pctl,
 static int apple_gpio_dt_node_to_map(struct pinctrl_dev *pctldev,
                                     struct device_node *node,
                                     struct pinctrl_map **map,
-                                    unsigned *num_maps)
+                                    unsigned int *num_maps)
 {
-       unsigned reserved_maps;
+       unsigned int reserved_maps;
        struct apple_gpio_pinctrl *pctl;
        u32 pinfunc, pin, func;
        int num_pins, i, ret;
@@ -170,8 +170,8 @@ static const struct pinctrl_ops apple_gpio_pinctrl_ops = {
 
 /* Pin multiplexer functions */
 
-static int apple_gpio_pinmux_set(struct pinctrl_dev *pctldev, unsigned func,
-                                unsigned group)
+static int apple_gpio_pinmux_set(struct pinctrl_dev *pctldev, unsigned int func,
+                                unsigned int group)
 {
        struct apple_gpio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
 
@@ -202,7 +202,7 @@ static int apple_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
        return GPIO_LINE_DIRECTION_IN;
 }
 
-static int apple_gpio_get(struct gpio_chip *chip, unsigned offset)
+static int apple_gpio_get(struct gpio_chip *chip, unsigned int offset)
 {
        struct apple_gpio_pinctrl *pctl = gpiochip_get_data(chip);
        unsigned int reg = apple_gpio_get_reg(pctl, offset);