From: Dmitry Torokhov Date: Sat, 6 Nov 2010 20:11:38 +0000 (+0000) Subject: NET: pktgen - fix compile warning X-Git-Tag: firefly_0821_release~7613^2~3442^2~45 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=86c2c0a8a4965ae5cbc0ff97ed39a4472e8e9b23;p=firefly-linux-kernel-4.4.55.git NET: pktgen - fix compile warning This should fix the following warning: net/core/pktgen.c: In function ‘pktgen_if_write’: net/core/pktgen.c:890: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Dmitry Torokhov Reviewed-by: Nelson Elhage Signed-off-by: David S. Miller --- diff --git a/net/core/pktgen.c b/net/core/pktgen.c index fbce4b05a53e..1992cd050e26 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -887,7 +887,7 @@ static ssize_t pktgen_if_write(struct file *file, i += len; if (debug) { - size_t copy = min(count, 1023); + size_t copy = min_t(size_t, count, 1023); char tb[copy + 1]; if (copy_from_user(tb, user_buffer, copy)) return -EFAULT;