Message ID | ab907800461dadf95c332a097f58e6f0@208suo.com (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | sfc: falcon: Prefer unsigned int to bare use of unsigned | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
The subject should start with "[PATCH net-next]". Please use ./scripts/get_maintainer.pl to find the correct people to send this to. On Mon, Jul 17, 2023 at 11:43:00AM +0800, hanyu001@208suo.com wrote: > Fix checkpatch warnings: > > ./drivers/net/ethernet/sfc/falcon/net_driver.h:1167: WARNING: Prefer > 'unsigned int' to bare use of 'unsigned' > ./drivers/net/ethernet/sfc/falcon/net_driver.h:1188: WARNING: Prefer > 'unsigned int' to bare use of 'unsigned' > ./drivers/net/ethernet/sfc/falcon/net_driver.h:1188: WARNING: Prefer > 'unsigned int' to bare use of 'unsigned' > ./drivers/net/ethernet/sfc/falcon/net_driver.h:1202: WARNING: Prefer > 'unsigned int' to bare use of 'unsigned' > > Signed-off-by: maqimei <2433033762@qq.com> This does not match with the From line in your email. > --- > drivers/net/ethernet/sfc/falcon/net_driver.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/sfc/falcon/net_driver.h > b/drivers/net/ethernet/sfc/falcon/net_driver.h > index a2c7139..d2d8f9b 100644 > --- a/drivers/net/ethernet/sfc/falcon/net_driver.h > +++ b/drivers/net/ethernet/sfc/falcon/net_driver.h > @@ -1164,7 +1164,7 @@ struct ef4_nic_type { > *************************************************************************/ > > static inline struct ef4_channel * > -ef4_get_channel(struct ef4_nic *efx, unsigned index) > +ef4_get_channel(struct ef4_nic *efx, unsigned int index) You've added an extra space here after int. Don't do that. Martin > { > EF4_BUG_ON_PARANOID(index >= efx->n_channels); > return efx->channel[index]; > @@ -1185,7 +1185,7 @@ struct ef4_nic_type { > (_efx)->channel[_channel->channel - 1] : NULL) > > static inline struct ef4_tx_queue * > -ef4_get_tx_queue(struct ef4_nic *efx, unsigned index, unsigned type) > +ef4_get_tx_queue(struct ef4_nic *efx, unsigned int index, unsigned int > type) > { > EF4_BUG_ON_PARANOID(index >= efx->n_tx_channels || > type >= EF4_TXQ_TYPES); > @@ -1199,7 +1199,7 @@ static inline bool ef4_channel_has_tx_queues(struct > ef4_channel *channel) > } > > static inline struct ef4_tx_queue * > -ef4_channel_get_tx_queue(struct ef4_channel *channel, unsigned type) > +ef4_channel_get_tx_queue(struct ef4_channel *channel, unsigned int type) > { > EF4_BUG_ON_PARANOID(!ef4_channel_has_tx_queues(channel) || > type >= EF4_TXQ_TYPES);
diff --git a/drivers/net/ethernet/sfc/falcon/net_driver.h b/drivers/net/ethernet/sfc/falcon/net_driver.h index a2c7139..d2d8f9b 100644 --- a/drivers/net/ethernet/sfc/falcon/net_driver.h +++ b/drivers/net/ethernet/sfc/falcon/net_driver.h @@ -1164,7 +1164,7 @@ struct ef4_nic_type { *************************************************************************/ static inline struct ef4_channel * -ef4_get_channel(struct ef4_nic *efx, unsigned index) +ef4_get_channel(struct ef4_nic *efx, unsigned int index) { EF4_BUG_ON_PARANOID(index >= efx->n_channels);
Fix checkpatch warnings: ./drivers/net/ethernet/sfc/falcon/net_driver.h:1167: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' ./drivers/net/ethernet/sfc/falcon/net_driver.h:1188: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' ./drivers/net/ethernet/sfc/falcon/net_driver.h:1188: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' ./drivers/net/ethernet/sfc/falcon/net_driver.h:1202: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: maqimei <2433033762@qq.com> --- drivers/net/ethernet/sfc/falcon/net_driver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) return efx->channel[index]; @@ -1185,7 +1185,7 @@ struct ef4_nic_type { (_efx)->channel[_channel->channel - 1] : NULL) static inline struct ef4_tx_queue * -ef4_get_tx_queue(struct ef4_nic *efx, unsigned index, unsigned type) +ef4_get_tx_queue(struct ef4_nic *efx, unsigned int index, unsigned int type) { EF4_BUG_ON_PARANOID(index >= efx->n_tx_channels || type >= EF4_TXQ_TYPES); @@ -1199,7 +1199,7 @@ static inline bool ef4_channel_has_tx_queues(struct ef4_channel *channel) } static inline struct ef4_tx_queue * -ef4_channel_get_tx_queue(struct ef4_channel *channel, unsigned type) +ef4_channel_get_tx_queue(struct ef4_channel *channel, unsigned int type) { EF4_BUG_ON_PARANOID(!ef4_channel_has_tx_queues(channel) || type >= EF4_TXQ_TYPES);