[Cake] [PATCH 1/2] cake: print_uint format fixes

Toke Høiland-Jørgensen toke at toke.dk
Sat Mar 17 10:33:43 EDT 2018


Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk> writes:

>> On 12 Mar 2018, at 15:11, Stephen Hemminger <stephen at networkplumber.org> wrote:
>> 
>> On Mon, 12 Mar 2018 10:56:09 +0100
>> Toke Høiland-Jørgensen <toke at toke.dk> wrote:
>>> 
>>> Stephen, would you accept patches to fix the API (to add
>>> print_{u,}int64() variants and turn print_uint() into native-int size)?
>>> Or should we stick with the API currently there and live with the
>>> inconsistency? :)
>>> 
>>> -Toke
>> 
>> I agree print_int should take int, print_uint should take unsigned int, and there should
>> be print_u64 (and print_u32, print_u8)
>
> Submitted a patch to netdev but almost certainly did it wrong/based on
> wrong tree etc ‘cos I don’t normally inhabit that space. The quite
> simple attached patch restores corrrect functioning on my BE MIPS box.
> Validation that the MANY calls to print_uint are using the correct
> type is left as an exercise for the reader :-) But at least there’s no
> longer a hidden promotion from uint to uint_64t going on.

Awesome! Good work :)

-Toke


More information about the Cake mailing list