On 9/15/2023 10:15 AM, Chaoyong He wrote:
> Unify the type of integer variable to the DPDK prefer style.
> Also change the return type of 'nfp_eth_speed2rate()' to the
> corresponding enum, which make it more readable.
> 
> Signed-off-by: Chaoyong He <chaoyong...@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderl...@corigine.com>

<...>

> @@ -269,7 +269,7 @@ nfp_cpp_mutex_lock(struct nfp_cpp_mutex *mutex)
>               if (err < 0 && err != -EBUSY)
>                       return err;
>               if (time(NULL) >= warn_at) {
> -                     PMD_DRV_LOG(ERR, "Warning: waiting for NFP mutex 
> usage:%u depth:%hd] target:%d addr:%llx key:%08x]",
> +                     PMD_DRV_LOG(ERR, "Warning: waiting for NFP mutex 
> usage:%u depth:%hd] target:%d addr:%lx key:%08x]",
>

'%lx' is not portable between 32bits and 64bits architectures,
when using fixed size variables, like 'uint64_t', better to use 'PRIx64'
macro,
although I know driver is only compiled for 64bits.

<...>

> @@ -316,7 +316,7 @@ nfp_nsp_command_buf(struct nfp_nsp *nsp,
>  
>       max_size = RTE_MAX(in_size, out_size);
>       if (FIELD_GET(NSP_DFLT_BUFFER_SIZE_MB, reg) * SZ_1M < max_size) {
> -             PMD_DRV_LOG(ERR, "NSP: default buffer too small for command 
> 0x%04x (%llu < %u)",
> +             PMD_DRV_LOG(ERR, "NSP: default buffer too small for command 
> 0x%04x (%llu < %lu)",
>

'%zu' is for size_t

Reply via email to