diff for duplicates of <20130923090100.GE6192@mwanda> diff --git a/a/1.txt b/N1/1.txt index decf71a..c90108a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -70,7 +70,8 @@ Good: Use temporary variable names: Bad: -- dev->backdev[count]->bitlistsize - dev->backdev[count]->devmagic->bitlistsize; +- dev->backdev[count]->bitlistsize = +- dev->backdev[count]->devmagic->bitlistsize; Good: + back = dev->backdev[count]; + back->bitlistsize = back->devmagic->bitlistsize; @@ -86,11 +87,11 @@ Good: If you must break up a long line then align it nicely. Use spaces if needed. Bad: -- if (adapter->flowcontrol = FLOW_RXONLY || -- adapter->flowcontrol = FLOW_BOTH) { +- if (adapter->flowcontrol == FLOW_RXONLY || +- adapter->flowcontrol == FLOW_BOTH) { Good: -+ if (adapter->flowcontrol = FLOW_RXONLY || -+ adapter->flowcontrol = FLOW_BOTH) { ++ if (adapter->flowcontrol == FLOW_RXONLY || ++ adapter->flowcontrol == FLOW_BOTH) { It's preferred if the operator goes at the end of the first line instead of at the start of the second line: diff --git a/a/content_digest b/N1/content_digest index 58d963f..2c289ae 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,6 +1,6 @@ "From\0Dan Carpenter <dan.carpenter@oracle.com>\0" "Subject\0checkpatch guide for newbies\0" - "Date\0Mon, 23 Sep 2013 09:01:00 +0000\0" + "Date\0Mon, 23 Sep 2013 12:01:00 +0300\0" "To\0kernel-janitors@vger.kernel.org" " linux-kernel@vger.kernel.org\0" "\00:1\0" @@ -77,7 +77,8 @@ "\n" "Use temporary variable names:\n" "Bad:\n" - "-\tdev->backdev[count]->bitlistsize -\t\tdev->backdev[count]->devmagic->bitlistsize;\n" + "-\tdev->backdev[count]->bitlistsize =\n" + "-\t\tdev->backdev[count]->devmagic->bitlistsize;\n" "Good:\n" "+\tback = dev->backdev[count];\n" "+\tback->bitlistsize = back->devmagic->bitlistsize;\n" @@ -93,11 +94,11 @@ "\n" "If you must break up a long line then align it nicely. Use spaces if needed.\n" "Bad:\n" - "-\tif (adapter->flowcontrol = FLOW_RXONLY ||\n" - "-\t\t\tadapter->flowcontrol = FLOW_BOTH) {\n" + "-\tif (adapter->flowcontrol == FLOW_RXONLY ||\n" + "-\t\t\tadapter->flowcontrol == FLOW_BOTH) {\n" "Good:\n" - "+\tif (adapter->flowcontrol = FLOW_RXONLY ||\n" - "+\t adapter->flowcontrol = FLOW_BOTH) {\n" + "+\tif (adapter->flowcontrol == FLOW_RXONLY ||\n" + "+\t adapter->flowcontrol == FLOW_BOTH) {\n" "\n" "It's preferred if the operator goes at the end of the first line instead of at\n" "the start of the second line:\n" @@ -114,4 +115,4 @@ "Use the word \"cleanup\" instead of \"fix\". \"Fix\" implies the runtime changed and\n" "it fixes a bug. \"Cleanup\" implies that runtime stayed exactly the same." -6f4f6aa12e176079440227ee0b8654e83348a4baca5a467a701588aaf49392a4 +1149ee570a2c512c9ac52e4d99c4f94b7c3c162636faca0ffe7a5333af9ae2ff
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.