From patchwork Sun Nov 7 06:11:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 70341 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E04FDB70F7 for ; Sun, 7 Nov 2010 17:11:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751642Ab0KGGLp (ORCPT ); Sun, 7 Nov 2010 01:11:45 -0500 Received: from mail-iw0-f174.google.com ([209.85.214.174]:48131 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751288Ab0KGGLp (ORCPT ); Sun, 7 Nov 2010 01:11:45 -0500 Received: by iwn41 with SMTP id 41so2621591iwn.19 for ; Sat, 06 Nov 2010 23:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition :content-transfer-encoding:user-agent; bh=xEBsU8OT390Rt/VgTjnQpSH+ylMeIV63r9rGvXkbuWU=; b=iamyxrO/JioCsq6Kcm3qrrj0h7DIMGMgtUDpSm1Kynm2DVcpR0cNpLsvPKhICQDidf rNEB1IAj5PQ0o3+5vsB2TqgEA1SY7D1pno/vYjBGS6Q2jBZ6ZxiIBjrKw07aum4RTlbS MNpV+0JlZbOzLZ/sKKRdSbu+pwCABMEgy2tTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:content-transfer-encoding:user-agent; b=Os+5NqPrsKNOAQvGyuWraLeVbERWSxSmXOk6KgP2R8V6mULTIDBUsFSY5f8aa70Qsh kwxWOwqZhuOsXR8N5tnkikeYMVJTNyuwUjyGaFAgL/Z0qsHh/LLFMFVvS8CckLlzO9ym 0FbSZhrHdEA/zuzVuI8x1fOOYcDqrw/DyCEfo= Received: by 10.42.158.72 with SMTP id g8mr2567140icx.165.1289110304498; Sat, 06 Nov 2010 23:11:44 -0700 (PDT) Received: from mailhub.coreip.homeip.net (c-24-6-153-206.hsd1.ca.comcast.net [24.6.153.206]) by mx.google.com with ESMTPS id d21sm3973523ibg.21.2010.11.06.23.11.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 06 Nov 2010 23:11:43 -0700 (PDT) Date: Sat, 6 Nov 2010 23:11:38 -0700 From: Dmitry Torokhov To: netdev@vger.kernel.org Cc: "David S. Miller" , Nelson Elhage Subject: [PATCH] NET: pktgen - fix compile warning Message-ID: <20101107061138.GA6601@core.coreip.homeip.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- Unless somebody already beat me to it... net/core/pktgen.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index fbce4b0..1992cd0 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;