Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263064AbUK0AqN (ORCPT ); Fri, 26 Nov 2004 19:46:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262897AbUK0Aod (ORCPT ); Fri, 26 Nov 2004 19:44:33 -0500 Received: from rproxy.gmail.com ([64.233.170.202]:36504 "EHLO rproxy.gmail.com") by vger.kernel.org with ESMTP id S262415AbUK0Ain (ORCPT ); Fri, 26 Nov 2004 19:38:43 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=KalWossvUtLvCRofidB6llUE35qzWEcytlGsH80Jq/j33cNMZjgInXiFDbzmx58MUdmnfL62BQ9upscdIl4XZPOot7uLyg3JERP0iJLV2tjstK23lzeX2CNvvPDTQpe48oxuljumEZO5742b39Pn166cRD9qRyzw0Psn73a53DM= Message-ID: <876ef97a0411261638988b9aa@mail.gmail.com> Date: Fri, 26 Nov 2004 19:38:38 -0500 From: Tobias DiPasquale Reply-To: Tobias DiPasquale To: akpm@digeo.com, linux-kernel@vger.kernel.org, torvalds@osdl.org Subject: [PATCH][REVISED] add list_del_head[_init] functions Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_426_3847674.1101515918827" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 14536 Lines: 212 ------=_Part_426_3847674.1101515918827 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, I revised my earlier list_del_head patch and took Jens' suggestions. There were two function additions: list_del_head() - removes the head of a list and returns it list_del_head_init() - removes the head of a list, reinitializes it and returns it I have also converted several obvious pieces of code in kernel/, net/ and mm/ to use these new functions. The patch for all of this is attached. Thanks :) Name: Add list_del_head[_init] functions for full queue API Status: Tested (smoke tests, mostly) Signed-off-by: Toby DiPasquale P.S. Again, please CC me on any replies as I'm not subscribed to LKML. Thanks again :) -- [ Tobias DiPasquale ] 0x636f6465736c696e67657240676d61696c2e636f6d ------=_Part_426_3847674.1101515918827 Content-Type: application/octet-stream; name="listdelhead.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="listdelhead.patch" ZGlmZiAtTnJ1cCBsaW51eC0yLjYuOS9pbmNsdWRlL2xpbnV4L2xpc3QuaCBsaW51eC9pbmNsdWRl L2xpbnV4L2xpc3QuaAotLS0gbGludXgtMi42LjkvaW5jbHVkZS9saW51eC9saXN0LmgJMjAwNC0x MC0xOCAyMTo1NDozMS4wMDAwMDAwMDAgKzAwMDAKKysrIGxpbnV4L2luY2x1ZGUvbGludXgvbGlz dC5oCTIwMDQtMTEtMjYgMjM6MDc6MzUuMDAwMDAwMDAwICswMDAwCkBAIC0xNjYsNiArMTY2LDM1 IEBAIHN0YXRpYyBpbmxpbmUgdm9pZCBsaXN0X2RlbChzdHJ1Y3QgbGlzdF8KIH0KIAogLyoqCisg KiBsaXN0X2RlbF9oZWFkIC0gZGVsZXRlcyBoZWFkIGVudHJ5IGZyb20gbGlzdC4KKyAqIEBoZWFk IDogbGlzdCBoZWFkIHRvIGRlbGV0ZQorICoKKyAqIENhbGxlciBtdXN0IGJlIHN1cmUgdGhhdCB0 aGUgbGlzdCBpcyBub3QgZW1wdHkgYmVmb3JlIGNhbGxpbmcgCisgKiB0aGlzIGZ1bmN0aW9uLgor ICovCitzdGF0aWMgaW5saW5lIHN0cnVjdCBsaXN0X2hlYWQgKmxpc3RfZGVsX2hlYWQoc3RydWN0 IGxpc3RfaGVhZCAqaGVhZCkKK3sKKwlzdHJ1Y3QgbGlzdF9oZWFkICplbnRyeSA9IGhlYWQtPm5l eHQ7CisJbGlzdF9kZWwoaGVhZC0+bmV4dCk7CisJcmV0dXJuIGVudHJ5OworfQorCisvKioKKyAq IGxpc3RfZGVsX2hlYWRfaW5pdCAtIGRlbGV0ZXMgaGVhZCBlbnRyeSBmcm9tIGxpc3QgYW5kIHJl aW5pdGl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KQogCXNwaW5fdW5s b2NrKCZuZXRfdG9kb19saXN0X2xvY2spOwogCQkKIAl3aGlsZSAoIWxpc3RfZW1wdHkoJmxpc3Qp KSB7Ci0JCXN0cnVjdCBuZXRfZGV2aWNlICpkZXYKLQkJCT0gbGlzdF9lbnRyeShsaXN0Lm5leHQs IHN0cnVjdCBuZXRfZGV2aWNlLCB0b2RvX2xpc3QpOwotCQlsaXN0X2RlbCgmZGV2LT50b2RvX2xp c3QpOworCQlzdHJ1Y3QgbmV0X2RldmljZSAqZGV2ID0gbGlzdF9lbnRyeShsaXN0X2RlbF9oZWFk KCZsaXN0KSwgCisJCQkJCQkgICAgc3RydWN0IG5ldF9kZXZpY2UsIAorCQkJCQkJICAgIHRvZG9f bGlzdCk7CiAKIAkJc3dpdGNoKGRldi0+cmVnX3N0YXRlKSB7CiAJCWNhc2UgTkVUUkVHX1JFR0lT VEVSSU5HOgo= ------=_Part_426_3847674.1101515918827-- - 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/