diff for duplicates of <20080806182724.GI5605@tesla> diff --git a/a/1.txt b/N1/1.txt index 4ef3086..64c2742 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,23 +1,24 @@ -On Tue, Aug 05, 2008 at 01:52:22AM -0700, Jochen Vo? wrote: +On Tue, Aug 05, 2008 at 01:52:22AM -0700, Jochen Vo=DF wrote: > Hi, -> +>=20 > 2008/8/5 Luis R. Rodriguez <lrodriguez@atheros.com>: > > +static inline void __list_cut_position(struct list_head *list, > > + struct list_head *head, struct list_head *entry) > > +{ -> > + struct list_head *new_first = -> > + (entry->next != head) ? entry->next : head; -> -> Isn't this just an over-complicated way of writing "new_first = entry->next"? +> > + struct list_head *new_first =3D +> > + (entry->next !=3D head) ? entry->next : head; +>=20 +> Isn't this just an over-complicated way of writing "new_first =3D ent= +ry->next"? Sorry, yes. -> > + list->next = head->next; -> > + list->next->prev = list; -> > + list->prev = entry; -> > + entry->next = list; -> > + head->next = new_first; -> > + new_first->prev = head; +> > + list->next =3D head->next; +> > + list->next->prev =3D list; +> > + list->prev =3D entry; +> > + entry->next =3D list; +> > + head->next =3D new_first; +> > + new_first->prev =3D head; > > +} > > + > > +/** @@ -27,9 +28,11 @@ Sorry, yes. > > + * @entry: an entry within head, could be the head itself > > + * and if so we won't cut the list > > + */ -> -> I think it would be helpful if the comment explained what the function -> actually does, i.e. that it moves the inital part of 'head' (up to and +>=20 +> I think it would be helpful if the comment explained what the functio= +n +> actually does, i.e. that it moves the inital part of 'head' (up to an= +d > including 'entry' from 'head' to 'list'. Will do. @@ -39,16 +42,17 @@ Will do. > > +{ > > + BUG_ON(list_empty(head)); > > + if (list_is_singular(head)) -> > + BUG_ON(head->next != entry && head != entry); -> +> > + BUG_ON(head->next !=3D entry && head !=3D entry); +>=20 > No other list function in "list.h" has BUG_ONs. Why this one? -Alright, I'll just make some small note on the documentation and exit early +Alright, I'll just make some small note on the documentation and exit e= +arly on these. -> > + if (entry == head) +> > + if (entry =3D=3D head) > > + INIT_LIST_HEAD(list); -> +>=20 > If there was data in 'list' before the call, it will be lost now. Is > this intended behaviour? @@ -61,7 +65,7 @@ clarify this. > > + __list_cut_position(list, head, entry); > > +} > > + -> +>=20 > I hope this helps, It certainly has, thanks for reviewing. How's this: @@ -75,20 +79,21 @@ diff --git a/include/linux/list.h b/include/linux/list.h index 453916b..6c02a83 100644 --- a/include/linux/list.h +++ b/include/linux/list.h -@@ -214,6 +214,46 @@ static inline int list_is_singular(const struct list_head *head) - return !list_empty(head) && (head->next == head->prev); +@@ -214,6 +214,46 @@ static inline int list_is_singular(const struct li= +st_head *head) + return !list_empty(head) && (head->next =3D=3D head->prev); } - +=20 +static inline void __list_cut_position(struct list_head *list, + struct list_head *head, struct list_head *entry) +{ -+ struct list_head *new_first = entry->next; -+ list->next = head->next; -+ list->next->prev = list; -+ list->prev = entry; -+ entry->next = list; -+ head->next = new_first; -+ new_first->prev = head; ++ struct list_head *new_first =3D entry->next; ++ list->next =3D head->next; ++ list->next->prev =3D list; ++ list->prev =3D entry; ++ entry->next =3D list; ++ head->next =3D new_first; ++ new_first->prev =3D head; +} + +/** @@ -111,9 +116,9 @@ index 453916b..6c02a83 100644 + if (list_empty(head)) + return; + if (list_is_singular(head) && -+ (head->next != entry && head != entry)) ++ (head->next !=3D entry && head !=3D entry)) + return; -+ if (entry == head) ++ if (entry =3D=3D head) + INIT_LIST_HEAD(list); + else + __list_cut_position(list, head, entry); @@ -122,3 +127,8 @@ index 453916b..6c02a83 100644 static inline void __list_splice(const struct list_head *list, struct list_head *head) { +-- +To unsubscribe from this list: send the line "unsubscribe linux-wireles= +s" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/a/content_digest b/N1/content_digest index 330576f..713c392 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -3,31 +3,40 @@ "ref\020080804231320.GG6447@tesla\0" "ref\0ef1cd66f0808050152g1dd8b96cl2df820607d480f0f@mail.gmail.com\0" "From\0Luis R. Rodriguez <lrodriguez@atheros.com>\0" - "Subject\0[ath9k-devel] [PATCH 2/4] list.h: add list_cut_position()\0" + "Subject\0Re: [PATCH 2/4] list.h: add list_cut_position()\0" "Date\0Wed, 6 Aug 2008 11:27:24 -0700\0" - "To\0ath9k-devel@lists.ath9k.org\0" + "To\0Jochen Vo\303\237 <jochen.voss@googlemail.com>\0" + "Cc\0Luis Rodriguez <Luis.Rodriguez@atheros.com>" + Randy Dunlap <randy.dunlap@oracle.com> + linville@tuxdriver.com <linville@tuxdriver.com> + netdev@vger.kernel.org <netdev@vger.kernel.org> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + torvalds@linux-foundation.org <torvalds@linux-foundation.org> + linux-wireless@vger.kernel.org <linux-wireless@vger.kernel.org> + " ath9k-devel@venema.h4ckr.net <ath9k-devel@venema.h4ckr.net>\0" "\00:1\0" "b\0" - "On Tue, Aug 05, 2008 at 01:52:22AM -0700, Jochen Vo? wrote:\n" + "On Tue, Aug 05, 2008 at 01:52:22AM -0700, Jochen Vo=DF wrote:\n" "> Hi,\n" - "> \n" + ">=20\n" "> 2008/8/5 Luis R. Rodriguez <lrodriguez@atheros.com>:\n" "> > +static inline void __list_cut_position(struct list_head *list,\n" "> > + struct list_head *head, struct list_head *entry)\n" "> > +{\n" - "> > + struct list_head *new_first =\n" - "> > + (entry->next != head) ? entry->next : head;\n" - "> \n" - "> Isn't this just an over-complicated way of writing \"new_first = entry->next\"?\n" + "> > + struct list_head *new_first =3D\n" + "> > + (entry->next !=3D head) ? entry->next : head;\n" + ">=20\n" + "> Isn't this just an over-complicated way of writing \"new_first =3D ent=\n" + "ry->next\"?\n" "\n" "Sorry, yes.\n" "\n" - "> > + list->next = head->next;\n" - "> > + list->next->prev = list;\n" - "> > + list->prev = entry;\n" - "> > + entry->next = list;\n" - "> > + head->next = new_first;\n" - "> > + new_first->prev = head;\n" + "> > + list->next =3D head->next;\n" + "> > + list->next->prev =3D list;\n" + "> > + list->prev =3D entry;\n" + "> > + entry->next =3D list;\n" + "> > + head->next =3D new_first;\n" + "> > + new_first->prev =3D head;\n" "> > +}\n" "> > +\n" "> > +/**\n" @@ -37,9 +46,11 @@ "> > + * @entry: an entry within head, could be the head itself\n" "> > + * and if so we won't cut the list\n" "> > + */\n" - "> \n" - "> I think it would be helpful if the comment explained what the function\n" - "> actually does, i.e. that it moves the inital part of 'head' (up to and\n" + ">=20\n" + "> I think it would be helpful if the comment explained what the functio=\n" + "n\n" + "> actually does, i.e. that it moves the inital part of 'head' (up to an=\n" + "d\n" "> including 'entry' from 'head' to 'list'.\n" "\n" "Will do.\n" @@ -49,16 +60,17 @@ "> > +{\n" "> > + BUG_ON(list_empty(head));\n" "> > + if (list_is_singular(head))\n" - "> > + BUG_ON(head->next != entry && head != entry);\n" - "> \n" + "> > + BUG_ON(head->next !=3D entry && head !=3D entry);\n" + ">=20\n" "> No other list function in \"list.h\" has BUG_ONs. Why this one?\n" "\n" - "Alright, I'll just make some small note on the documentation and exit early\n" + "Alright, I'll just make some small note on the documentation and exit e=\n" + "arly\n" "on these.\n" "\n" - "> > + if (entry == head)\n" + "> > + if (entry =3D=3D head)\n" "> > + INIT_LIST_HEAD(list);\n" - "> \n" + ">=20\n" "> If there was data in 'list' before the call, it will be lost now. Is\n" "> this intended behaviour?\n" "\n" @@ -71,7 +83,7 @@ "> > + __list_cut_position(list, head, entry);\n" "> > +}\n" "> > +\n" - "> \n" + ">=20\n" "> I hope this helps,\n" "\n" "It certainly has, thanks for reviewing. How's this:\n" @@ -85,20 +97,21 @@ "index 453916b..6c02a83 100644\n" "--- a/include/linux/list.h\n" "+++ b/include/linux/list.h\n" - "@@ -214,6 +214,46 @@ static inline int list_is_singular(const struct list_head *head)\n" - " \treturn !list_empty(head) && (head->next == head->prev);\n" + "@@ -214,6 +214,46 @@ static inline int list_is_singular(const struct li=\n" + "st_head *head)\n" + " \treturn !list_empty(head) && (head->next =3D=3D head->prev);\n" " }\n" - " \n" + "=20\n" "+static inline void __list_cut_position(struct list_head *list,\n" "+\t\tstruct list_head *head, struct list_head *entry)\n" "+{\n" - "+\tstruct list_head *new_first = entry->next;\n" - "+\tlist->next = head->next;\n" - "+\tlist->next->prev = list;\n" - "+\tlist->prev = entry;\n" - "+\tentry->next = list;\n" - "+\thead->next = new_first;\n" - "+\tnew_first->prev = head;\n" + "+\tstruct list_head *new_first =3D entry->next;\n" + "+\tlist->next =3D head->next;\n" + "+\tlist->next->prev =3D list;\n" + "+\tlist->prev =3D entry;\n" + "+\tentry->next =3D list;\n" + "+\thead->next =3D new_first;\n" + "+\tnew_first->prev =3D head;\n" "+}\n" "+\n" "+/**\n" @@ -121,9 +134,9 @@ "+\tif (list_empty(head))\n" "+\t\treturn;\n" "+\tif (list_is_singular(head) &&\n" - "+\t\t(head->next != entry && head != entry))\n" + "+\t\t(head->next !=3D entry && head !=3D entry))\n" "+\t\treturn;\n" - "+\tif (entry == head)\n" + "+\tif (entry =3D=3D head)\n" "+\t\tINIT_LIST_HEAD(list);\n" "+\telse\n" "+\t\t__list_cut_position(list, head, entry);\n" @@ -131,6 +144,11 @@ "+\n" " static inline void __list_splice(const struct list_head *list,\n" " \t\t\t\t struct list_head *head)\n" - { + " {\n" + "--\n" + "To unsubscribe from this list: send the line \"unsubscribe linux-wireles=\n" + "s\" in\n" + "the body of a message to majordomo@vger.kernel.org\n" + More majordomo info at http://vger.kernel.org/majordomo-info.html -1bba8de370cd67f741dc0a093942fcb17d65c24a5e845c65fa8fa766547eca6c +7663f73d3904b89f0e928543d47d2ba3972be9d1145650731b70af13f8ac7d9d
diff --git a/a/1.txt b/N2/1.txt index 4ef3086..627cdbf 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,4 +1,4 @@ -On Tue, Aug 05, 2008 at 01:52:22AM -0700, Jochen Vo? wrote: +On Tue, Aug 05, 2008 at 01:52:22AM -0700, Jochen Voß wrote: > Hi, > > 2008/8/5 Luis R. Rodriguez <lrodriguez@atheros.com>: diff --git a/a/content_digest b/N2/content_digest index 330576f..332a6a9 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -3,12 +3,20 @@ "ref\020080804231320.GG6447@tesla\0" "ref\0ef1cd66f0808050152g1dd8b96cl2df820607d480f0f@mail.gmail.com\0" "From\0Luis R. Rodriguez <lrodriguez@atheros.com>\0" - "Subject\0[ath9k-devel] [PATCH 2/4] list.h: add list_cut_position()\0" + "Subject\0Re: [PATCH 2/4] list.h: add list_cut_position()\0" "Date\0Wed, 6 Aug 2008 11:27:24 -0700\0" - "To\0ath9k-devel@lists.ath9k.org\0" + "To\0Jochen Vo\303\237 <jochen.voss@googlemail.com>\0" + "Cc\0Luis Rodriguez <Luis.Rodriguez@atheros.com>" + Randy Dunlap <randy.dunlap@oracle.com> + linville@tuxdriver.com <linville@tuxdriver.com> + netdev@vger.kernel.org <netdev@vger.kernel.org> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + torvalds@linux-foundation.org <torvalds@linux-foundation.org> + linux-wireless@vger.kernel.org <linux-wireless@vger.kernel.org> + " ath9k-devel@venema.h4ckr.net <ath9k-devel@venema.h4ckr.net>\0" "\00:1\0" "b\0" - "On Tue, Aug 05, 2008 at 01:52:22AM -0700, Jochen Vo? wrote:\n" + "On Tue, Aug 05, 2008 at 01:52:22AM -0700, Jochen Vo\303\237 wrote:\n" "> Hi,\n" "> \n" "> 2008/8/5 Luis R. Rodriguez <lrodriguez@atheros.com>:\n" @@ -133,4 +141,4 @@ " \t\t\t\t struct list_head *head)\n" { -1bba8de370cd67f741dc0a093942fcb17d65c24a5e845c65fa8fa766547eca6c +de2ef3eff6ebf9378ce85d1577beab4088da902936975e6d8b8f1b2a09cea500
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.