On Tuesday 03 November 2015 18:27:53 Ksenija Stanojević wrote:
You change the format string to print the time as hexadecimal. Is that intentional? If there is a reason for doing it, explain it in the changelog, otherwise leave it as "%d".
The cast of SIMPLE_TRANSACTION_LIMIT to u32 looks misplaced as well.
I got following warnings with original code and I was trying to fix them: include/linux/fs.h:2908:61: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘u32’ [-Wformat=] #define SIMPLE_TRANSACTION_LIMIT (PAGE_SIZE - sizeof(struct simple_transaction_argresp)) ^ fs/nfsd/nfsctl.c:963:24: note: in expansion of macro ‘SIMPLE_TRANSACTION_LIMIT’ return scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, "%ld\n", *time);
but I see now that changing %ld to %d works as well.
Ok. I have no idea why gcc decided to mention "in expansion of macro ‘SIMPLE_TRANSACTION_LIMIT’" here, which is obviously confusing as it has nothing to do with the actual change.
Arnd