From patchwork Thu Oct 7 01:56:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 237531 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o971x8wk031135 for ; Thu, 7 Oct 2010 01:59:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759249Ab0JGB7G (ORCPT ); Wed, 6 Oct 2010 21:59:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62402 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757586Ab0JGB7E convert rfc822-to-8bit (ORCPT ); Wed, 6 Oct 2010 21:59:04 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o971x4cv001427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 6 Oct 2010 21:59:04 -0400 Received: from pedra (vpn-225-141.phx2.redhat.com [10.3.225.141]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o971uuB8028164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 6 Oct 2010 21:59:03 -0400 Date: Wed, 6 Oct 2010 22:56:47 -0300 From: Mauro Carvalho Chehab Cc: Linux Media Mailing List Subject: [PATCH 1/3] V4L/DVB: videobuf-dma-sg: Fix a warning due to the usage of min(PAGE_SIZE, arg) Message-ID: <20101006225647.2c0dfa39@pedra> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 07 Oct 2010 01:59:08 +0000 (UTC) diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index 359f2f3..7153e44 100644 --- a/drivers/media/video/videobuf-dma-sg.c +++ b/drivers/media/video/videobuf-dma-sg.c @@ -116,8 +116,8 @@ static struct scatterlist *videobuf_pages_to_sg(struct page **pages, goto nopage; if (PageHighMem(pages[i])) goto highmem; - sg_set_page(&sglist[i], pages[i], min(PAGE_SIZE, size), 0); - size -= min(PAGE_SIZE, size); + sg_set_page(&sglist[i], pages[i], min((unsigned)PAGE_SIZE, size), 0); + size -= min((unsigned)PAGE_SIZE, size); } return sglist;