From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 3 12:39:50 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DAB016A4CE for ; Mon, 3 Jan 2005 12:39:50 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 462FB43D1D for ; Mon, 3 Jan 2005 12:39:50 +0000 (GMT) (envelope-from tejas.sumant@gmail.com) Received: by rproxy.gmail.com with SMTP id g11so20699rne for ; Mon, 03 Jan 2005 04:39:49 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:from:to:subject:date:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=qDMmtkFFwFDgxaEIVax0U2YHV5QAHhb/KhzAy/t9+seBssSRPtQnk6NA678LSvACAYsbCoOIIhxnn7OiBhLWYft+fXTLy0F+9/H4+edifwdYnksaY551eeKF9/ncxcfjXtnohzgdP9FdjxHbIZIf71W1V8KjsoEAVdRBAPEVl84= Received: by 10.38.86.65 with SMTP id j65mr182234rnb; Mon, 03 Jan 2005 04:39:49 -0800 (PST) Received: from dhruv ([61.11.17.122]) by smtp.gmail.com with ESMTP id 63sm155881rna.2005.01.03.04.39.48; Mon, 03 Jan 2005 04:39:49 -0800 (PST) Message-ID: <009e01c4f191$50433430$1500a8c0@indranet.local> From: "Tejas Sumant" To: Date: Mon, 3 Jan 2005 18:09:45 +0530 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: Freeing Volatile Pointer X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2005 12:39:50 -0000 Hi, I have a volatile pointer declared in my device driver. I am allocating memory using kernel malloc function. host_mem_resp_ptr = (volatile unsigned long *)malloc(sizeof(volatile unsigned long), M_DEVBUF, M_NOWAIT); When I try to free it, I get following warning while compiling the driver. "warning: passing arg 1 of free discards qualifiers from pointer target type" The statment to free the memory is free(host_mem_resp_ptr, M_DEVBUF); Can anybody please tell me reason and solution? Tejas