Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752745AbbK1S0Y (ORCPT ); Sat, 28 Nov 2015 13:26:24 -0500 Received: from mxf3.bahnhof.se ([213.80.101.27]:54891 "EHLO mxf3.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752612AbbK1S0V (ORCPT ); Sat, 28 Nov 2015 13:26:21 -0500 X-Spam-Score: 0.306 From: Niklas Cassel To: jesper.nilsson@axis.com Cc: starvik@axis.com, rabin@rab.in, linux-cris-kernel@axis.com, linux-kernel@vger.kernel.org, Niklas Cassel Subject: [PATCH 2/4] cris: intmem: fix pointer comparison compile warning Date: Sat, 28 Nov 2015 19:26:04 +0100 Message-Id: <1448735164-31246-1-git-send-email-nks@flawful.org> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1664 Lines: 45 The code previously depended on list_head being defined as the first item in struct intmem_allocation. arch/cris/arch-v32/mm/intmem.c: In function ‘crisv32_intmem_free’: arch/cris/arch-v32/mm/intmem.c:116:14: warning: comparison of distinct pointer types lacks a cast if ((prev != &intmem_allocations) && ^ arch/cris/arch-v32/mm/intmem.c:123:14: warning: comparison of distinct pointer types lacks a cast if ((next != &intmem_allocations) && ^ Signed-off-by: Niklas Cassel --- arch/cris/arch-v32/mm/intmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/cris/arch-v32/mm/intmem.c b/arch/cris/arch-v32/mm/intmem.c index bad735d..c807284 100644 --- a/arch/cris/arch-v32/mm/intmem.c +++ b/arch/cris/arch-v32/mm/intmem.c @@ -113,14 +113,14 @@ void crisv32_intmem_free(void* addr) allocation->status = STATUS_FREE; /* Join with prev and/or next if also free */ - if ((prev != &intmem_allocations) && + if ((&prev->entry != &intmem_allocations) && (prev->status == STATUS_FREE)) { prev->size += allocation->size; list_del(&allocation->entry); kfree(allocation); allocation = prev; } - if ((next != &intmem_allocations) && + if ((&next->entry != &intmem_allocations) && (next->status == STATUS_FREE)) { allocation->size += next->size; list_del(&next->entry); -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/