From patchwork Mon Nov 25 13:57:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 3231191 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AAB36C045B for ; Mon, 25 Nov 2013 13:58:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 73B52202EA for ; Mon, 25 Nov 2013 13:58:34 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A49D8201F5 for ; Mon, 25 Nov 2013 13:58:32 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VkwgG-0001u6-Ix; Mon, 25 Nov 2013 13:58:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VkwgE-0007hM-70; Mon, 25 Nov 2013 13:58:26 +0000 Received: from bear.ext.ti.com ([192.94.94.41]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VkwgC-0007gA-G7 for linux-arm-kernel@lists.infradead.org; Mon, 25 Nov 2013 13:58:25 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id rAPDvt4k021346; Mon, 25 Nov 2013 07:57:55 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rAPDvtub018863; Mon, 25 Nov 2013 07:57:55 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Mon, 25 Nov 2013 07:57:54 -0600 Received: from [158.218.103.74] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id rAPDvsMs027310; Mon, 25 Nov 2013 07:57:54 -0600 Message-ID: <52935762.1080409@ti.com> Date: Mon, 25 Nov 2013 08:57:54 -0500 From: Santosh Shilimkar User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Sergei Shtylyov Subject: Re: [PATCH] mm: nobootmem: avoid type warning about alignment value References: <1385249326-9089-1-git-send-email-santosh.shilimkar@ti.com> <529217C7.6030304@cogentembedded.com> In-Reply-To: <529217C7.6030304@cogentembedded.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131125_085824_655748_4F162A9C X-CRM114-Status: GOOD ( 15.48 ) X-Spam-Score: -6.9 (------) Cc: Tejun Heo , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sunday 24 November 2013 10:14 AM, Sergei Shtylyov wrote: > Hello. > > On 24-11-2013 3:28, Santosh Shilimkar wrote: > >> Building ARM with NO_BOOTMEM generates below warning. Using min_t > > Where is that below? :-) > Damn.. Posted a wrong version of the patch ;-( Here is the one with warning message included. From 571dfdf4cf8ac7dfd50bd9b7519717c42824f1c3 Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Sat, 23 Nov 2013 18:16:50 -0500 Subject: [PATCH] mm: nobootmem: avoid type warning about alignment value Building ARM with NO_BOOTMEM generates below warning. mm/nobootmem.c: In function ‘__free_pages_memory’: mm/nobootmem.c:88:11: warning: comparison of distinct pointer types lacks a cast Using min_t to find the correct alignment avoids the warning. Cc: Tejun Heo Cc: Andrew Morton Signed-off-by: Santosh Shilimkar Acked-by: Tejun Heo --- mm/nobootmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/nobootmem.c b/mm/nobootmem.c index 2c254d3..8954e43 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c @@ -85,7 +85,7 @@ static void __init __free_pages_memory(unsigned long start, unsigned long end) int order; while (start < end) { - order = min(MAX_ORDER - 1UL, __ffs(start)); + order = min_t(size_t, MAX_ORDER - 1UL, __ffs(start)); while (start + (1UL << order) > end) order--;