Skip to content

Commit d929cc7

Browse files
Darshanr5051broonie
authored andcommitted
spi: gpio: Use explicit 'unsigned int' for parameter types
The C standard allows 'unsigned' as a shorthand for 'unsigned int'. For improved code clarity and consistency with the prevailing kernel coding style, replace the shorthand with the more explicit 'unsigned int' type for function parameters. This is a purely stylistic cleanup and has no functional impact on the generated code. Signed-off-by: Darshan Rathod <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent d5255ae commit d929cc7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/spi/spi-gpio.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static inline int getmiso(const struct spi_device *spi)
104104
*/
105105

106106
static u32 spi_gpio_txrx_word_mode0(struct spi_device *spi,
107-
unsigned nsecs, u32 word, u8 bits, unsigned flags)
107+
unsigned int nsecs, u32 word, u8 bits, unsigned int flags)
108108
{
109109
if (unlikely(spi->mode & SPI_LSB_FIRST))
110110
return bitbang_txrx_le_cpha0(spi, nsecs, 0, flags, word, bits);
@@ -113,7 +113,7 @@ static u32 spi_gpio_txrx_word_mode0(struct spi_device *spi,
113113
}
114114

115115
static u32 spi_gpio_txrx_word_mode1(struct spi_device *spi,
116-
unsigned nsecs, u32 word, u8 bits, unsigned flags)
116+
unsigned int nsecs, u32 word, u8 bits, unsigned int flags)
117117
{
118118
if (unlikely(spi->mode & SPI_LSB_FIRST))
119119
return bitbang_txrx_le_cpha1(spi, nsecs, 0, flags, word, bits);
@@ -122,7 +122,7 @@ static u32 spi_gpio_txrx_word_mode1(struct spi_device *spi,
122122
}
123123

124124
static u32 spi_gpio_txrx_word_mode2(struct spi_device *spi,
125-
unsigned nsecs, u32 word, u8 bits, unsigned flags)
125+
unsigned int nsecs, u32 word, u8 bits, unsigned int flags)
126126
{
127127
if (unlikely(spi->mode & SPI_LSB_FIRST))
128128
return bitbang_txrx_le_cpha0(spi, nsecs, 1, flags, word, bits);
@@ -131,7 +131,7 @@ static u32 spi_gpio_txrx_word_mode2(struct spi_device *spi,
131131
}
132132

133133
static u32 spi_gpio_txrx_word_mode3(struct spi_device *spi,
134-
unsigned nsecs, u32 word, u8 bits, unsigned flags)
134+
unsigned int nsecs, u32 word, u8 bits, unsigned int flags)
135135
{
136136
if (unlikely(spi->mode & SPI_LSB_FIRST))
137137
return bitbang_txrx_le_cpha1(spi, nsecs, 1, flags, word, bits);
@@ -150,7 +150,7 @@ static u32 spi_gpio_txrx_word_mode3(struct spi_device *spi,
150150
*/
151151

152152
static u32 spi_gpio_spec_txrx_word_mode0(struct spi_device *spi,
153-
unsigned nsecs, u32 word, u8 bits, unsigned flags)
153+
unsigned int nsecs, u32 word, u8 bits, unsigned int flags)
154154
{
155155
flags = spi->controller->flags;
156156
if (unlikely(spi->mode & SPI_LSB_FIRST))
@@ -160,7 +160,7 @@ static u32 spi_gpio_spec_txrx_word_mode0(struct spi_device *spi,
160160
}
161161

162162
static u32 spi_gpio_spec_txrx_word_mode1(struct spi_device *spi,
163-
unsigned nsecs, u32 word, u8 bits, unsigned flags)
163+
unsigned int nsecs, u32 word, u8 bits, unsigned int flags)
164164
{
165165
flags = spi->controller->flags;
166166
if (unlikely(spi->mode & SPI_LSB_FIRST))
@@ -170,7 +170,7 @@ static u32 spi_gpio_spec_txrx_word_mode1(struct spi_device *spi,
170170
}
171171

172172
static u32 spi_gpio_spec_txrx_word_mode2(struct spi_device *spi,
173-
unsigned nsecs, u32 word, u8 bits, unsigned flags)
173+
unsigned int nsecs, u32 word, u8 bits, unsigned int flags)
174174
{
175175
flags = spi->controller->flags;
176176
if (unlikely(spi->mode & SPI_LSB_FIRST))
@@ -180,7 +180,7 @@ static u32 spi_gpio_spec_txrx_word_mode2(struct spi_device *spi,
180180
}
181181

182182
static u32 spi_gpio_spec_txrx_word_mode3(struct spi_device *spi,
183-
unsigned nsecs, u32 word, u8 bits, unsigned flags)
183+
unsigned int nsecs, u32 word, u8 bits, unsigned int flags)
184184
{
185185
flags = spi->controller->flags;
186186
if (unlikely(spi->mode & SPI_LSB_FIRST))

0 commit comments

Comments
 (0)