From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758829AbYC1UeX (ORCPT ); Fri, 28 Mar 2008 16:34:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758305AbYC1UeF (ORCPT ); Fri, 28 Mar 2008 16:34:05 -0400 Received: from pasmtpb.tele.dk ([80.160.77.98]:50998 "EHLO pasmtpB.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758255AbYC1UeE (ORCPT ); Fri, 28 Mar 2008 16:34:04 -0400 Date: Fri, 28 Mar 2008 21:34:28 +0100 From: Sam Ravnborg To: LKML Cc: Ingo Molnar Subject: use of volatile in iounmap()? Message-ID: <20080328203427.GA14256@uranus.ravnborg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While reviewing some CAN driver I stumbled on iounmap which has following prototype on x86: extern void iounmap(volatile void __iomem *addr); I argued that the driver should not use volatile but then I cannot explain why the argument to iounmap takes a volatile. The same goes for many other functions in the io*.h headers. Grepping the other archs they mostly follow same pattern. Can anyone explain the rational for volatile in this case. Thanks, Sam