Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S275110AbTHRV3s (ORCPT ); Mon, 18 Aug 2003 17:29:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S275125AbTHRV3r (ORCPT ); Mon, 18 Aug 2003 17:29:47 -0400 Received: from fmr06.intel.com ([134.134.136.7]:55032 "EHLO caduceus.jf.intel.com") by vger.kernel.org with ESMTP id S275110AbTHRV2G convert rfc822-to-8bit (ORCPT ); Mon, 18 Aug 2003 17:28:06 -0400 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Subject: [2.{4,5} TRIVIAL PATCH] Change list_emtpy() to take a const pointer Date: Mon, 18 Aug 2003 14:28:03 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [2.{4,5} TRIVIAL PATCH] Change list_emtpy() to take a const pointer Thread-Index: AcNlz5xXhNMJYIx4QKGg8YhIq1WO8Q== From: "Perez-Gonzalez, Inaky" To: , X-OriginalArrivalTime: 18 Aug 2003 21:28:03.0716 (UTC) FILETIME=[9B733440:01C365CF] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 830 Lines: 27 Hi Rusty, list Didn't know what was the best place to submit this one, I guessed trivial. Just change the definition of list_empty() to take a const pointer. I have some upper layers of code that do all the const/non-const thing and list_empty() breaks it without this. --- linux/include/linux/list.h +++ linux/include/linux/list.h @@ -203,7 +203,7 @@ * list_empty - tests whether a list is empty * @head: the list to test. */ -static inline int list_empty(struct list_head *head) +static inline int list_empty(const struct list_head *head) { return head->next == head; } - 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/