Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753907Ab3IPGiX (ORCPT ); Mon, 16 Sep 2013 02:38:23 -0400 Received: from ozlabs.org ([203.10.76.45]:39395 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977Ab3IPGiW (ORCPT ); Mon, 16 Sep 2013 02:38:22 -0400 From: Rusty Russell To: Cc: "Michael S. Tsirkin" Cc: "LKML" Subject: Why does test_bit() take a volatile addr? User-Agent: Notmuch/0.15.2+81~gd2c8818 (http://notmuchmail.org) Emacs/23.4.1 (i686-pc-linux-gnu) Date: Mon, 16 Sep 2013 13:38:35 +0930 Message-ID: <87ioy11k8s.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 576 Lines: 18 Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) I noticed because gcc failed to elimiate some code in a patch I was playing with. I'm nervous about subtle bugs involved in ripping it out, even if noone knows why. Should I add __test_bit()? Thanks, Rusty. -- 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/