From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 3E1E41C0BE0 for ; Tue, 22 Dec 2015 09:54:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3998B8B1CE for ; Tue, 22 Dec 2015 09:54:25 +0000 (UTC) Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pQ5Gfs2l0G1u for ; Tue, 22 Dec 2015 09:54:23 +0000 (UTC) Received: from email.microchip.com (exsmtp03.microchip.com [198.175.253.49]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 2A8358B197 for ; Tue, 22 Dec 2015 09:54:23 +0000 (UTC) From: Christian Gromm Subject: [PATCH 05/28] staging: most: use min_t Date: Tue, 22 Dec 2015 10:52:46 +0100 Message-ID: <1450777989-5551-6-git-send-email-christian.gromm@microchip.com> In-Reply-To: <1450777989-5551-1-git-send-email-christian.gromm@microchip.com> References: <1450777989-5551-1-git-send-email-christian.gromm@microchip.com> MIME-Version: 1.0 List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: gregkh@linuxfoundation.org Cc: Christian Gromm , driverdev-devel@linuxdriverproject.org This patch replaces min with min_t. Signed-off-by: Christian Gromm --- This patch has been resent on behalf of Greg Kroah-Hartman drivers/staging/most/aim-cdev/cdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c index 4bf0322..6ee4eb2 100644 --- a/drivers/staging/most/aim-cdev/cdev.c +++ b/drivers/staging/most/aim-cdev/cdev.c @@ -246,7 +246,9 @@ start_copy: return -EIO; } - to_copy = min(count, (size_t)mbo->processed_length - channel->mbo_offs); + to_copy = min_t(size_t, + count, + mbo->processed_length - channel->mbo_offs); not_copied = copy_to_user(buf, mbo->virt_address + channel->mbo_offs, -- 1.7.9.5 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel