I see what you are saying, any time a patch says "also" or "and" I start looking for why it was not two patches :)
On 9 June 2015 at 17:09, Nicolas Morey Chaisemartin <[email protected]> wrote: > The sscanf format is also changed. > Because of this checkpatch was bothering me with the uncheck returned > value so I squashed it in the same path. > If you'd rather have two patches, I'll happily split it :) > > > -- > > Nicolas Morey Chaisemartin > > Phone : +33 6 42 46 68 87 > [email protected] > > KALRAY SA > 86 rue de Paris 91400 Orsay FRANCE > 445 rue Lavoisier 38330 Montbonnot FRANCE > > This message contains information that may be privileged or confidential > and is the property of the KALRAY SA. It is intended only for the person to > whom it is addressed. If you are not the intended recipient, you are not > authorized to print, retain, copy, disseminate, distribute, or use this > message or any part thereof. If you receive this message in error, please > notify the sender immediately and delete all copies of this message. > > ------------------------------ > > *From: *"Mike Holmes" <[email protected]> > *To: *"Nicolas Morey-Chaisemartin" <[email protected]> > *Cc: *"LNG ODP Mailman List" <[email protected]> > *Sent: *Tuesday, 9 June, 2015 6:46:52 PM > *Subject: *Re: [lng-odp] [PATCH] example: use PRIx32 macro > > > These look like two unrelated patches squashed in one patch to me. > One adds a return check and the other adds printf formatting. > > On 9 June 2015 at 10:26, Nicolas Morey-Chaisemartin <[email protected]> > wrote: > >> Also adds a check of sscanf return value to make checkpatch happy >> >> Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]> >> --- >> example/classifier/odp_classifier.c | 6 ++++-- >> example/timer/odp_timer_test.c | 3 ++- >> 2 files changed, 6 insertions(+), 3 deletions(-) >> >> diff --git a/example/classifier/odp_classifier.c >> b/example/classifier/odp_classifier.c >> index 48fc1ab..5413984 100644 >> --- a/example/classifier/odp_classifier.c >> +++ b/example/classifier/odp_classifier.c >> @@ -171,9 +171,11 @@ static inline >> int parse_ipv4_mask(const char *str, uint32_t *mask) >> { >> uint32_t b; >> - sscanf(str, "%x", &b); >> + int ret; >> + >> + ret = sscanf(str, "%" PRIx32, &b); >> *mask = b; >> - return 0; >> + return ret != 1; >> } >> >> /** >> diff --git a/example/timer/odp_timer_test.c >> b/example/timer/odp_timer_test.c >> index 4f4c798..3ac4fe1 100644 >> --- a/example/timer/odp_timer_test.c >> +++ b/example/timer/odp_timer_test.c >> @@ -182,7 +182,8 @@ static void test_abs_timeouts(int thr, test_globals_t >> *gbls) >> if (!odp_timeout_fresh(tmo)) { >> /* Not the expected expiration tick, timer has >> * been reset or cancelled or freed */ >> - EXAMPLE_ABORT("Unexpected timeout received (timer >> %x, tick %"PRIu64")\n", >> + EXAMPLE_ABORT("Unexpected timeout received (timer >> %" >> + PRIx32 ", tick %" PRIu64 ")\n", >> ttp->tim, tick); >> } >> EXAMPLE_DBG(" [%i] timeout, tick %"PRIu64"\n", thr, >> tick); >> _______________________________________________ >> lng-odp mailing list >> [email protected] >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > > > > -- > Mike Holmes > Technical Manager - Linaro Networking Group > Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs > > > > > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
