Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/813164/?format=api
{ "id": 813164, "url": "http://patchwork.ozlabs.org/api/patches/813164/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/1505280046-16608-9-git-send-email-yamada.masahiro@socionext.com/", "project": { "id": 3, "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api", "name": "Linux MTD development", "link_name": "linux-mtd", "list_id": "linux-mtd.lists.infradead.org", "list_email": "linux-mtd@lists.infradead.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1505280046-16608-9-git-send-email-yamada.masahiro@socionext.com>", "list_archive_url": null, "date": "2017-09-13T05:20:45", "name": "[8/9] mtd: nand: denali: clean up comments", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5ad1d5bdf7f1366142d31080dfefb91e27df0647", "submitter": { "id": 65882, "url": "http://patchwork.ozlabs.org/api/people/65882/?format=api", "name": "Masahiro Yamada", "email": "yamada.masahiro@socionext.com" }, "delegate": { "id": 58324, "url": "http://patchwork.ozlabs.org/api/users/58324/?format=api", "username": "bbrezillon", "first_name": "Boris", "last_name": "Brezillon", "email": "boris.brezillon@free-electrons.com" }, "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/1505280046-16608-9-git-send-email-yamada.masahiro@socionext.com/mbox/", "series": [ { "id": 2809, "url": "http://patchwork.ozlabs.org/api/series/2809/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=2809", "date": "2017-09-13T05:20:39", "name": "mtd: nand: denali: more clean-ups", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2809/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/813164/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/813164/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"KrPEtyO6\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=nifty.com header.i=@nifty.com\n\theader.b=\"SgtByf/9\"; dkim-atps=neutral" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsVVp43ZWz9sPt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 15:25:38 +1000 (AEST)", "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1ds0Ay-00027x-Sf; Wed, 13 Sep 2017 05:25:28 +0000", "from conuserg-12.nifty.com ([210.131.2.79])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1ds07J-0006Xs-NH\n\tfor linux-mtd@lists.infradead.org; Wed, 13 Sep 2017 05:21:54 +0000", "from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp\n\t[153.142.97.92]) (authenticated)\n\tby conuserg-12.nifty.com with ESMTP id v8D5Kpx7010397;\n\tWed, 13 Sep 2017 14:20:58 +0900" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:\n\tIn-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Owner;\n\tbh=bE/Smr6y1YMec2PGqgX2SMl+OEKfEABi/lk4MwP9fcI=;\n\tb=KrPEtyO6kGk3gIrK30PwhIYsMR\n\tFIzY9/sYt5McUlN0XSeeaQd0k/k9Ze0WRia4EdDXQqWUHa7/JmKJXpKULD6ldr/2PyyLlq5AxAU0t\n\tjB3urdGSi6deJensgsflRT+CYJl1X3d1rKn/2c7o7HsdewtgM9u8GBnPtzR5WwoCwySmzyOaUgByx\n\thNpZjX3QA6Hsb/b/+PmtoxMwwipj3/Cg1k6Zwya1qwqIhvYK6J2gpOUIISqP+5Yv9WsVJfefUSJTH\n\tamjuoMCpBq7f5NmT2ZEzN57/V63x+sqRNSvat/JWLRZIiO/N3JU8FeGlXJGqbvCX5yv5ffvflxAdN\n\ttp/hoBeQ==;", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n\ts=dec2015msa; t=1505280058;\n\tbh=a0NCciFOCqGCblZwHbVdaatk1W95UNaMPT+UBGaChEA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=SgtByf/9beqbXr7tqfz53iuW4qbyDFGFvLe7HxjzbK/hpBht/GyS8bJzPUBVtLy9I\n\tTi8gg3Zq1/ShCjh4MXOtZDUqr35oYfzV18mjLhomeZSYvQIdpd5j1aOPxomkjPBmRk\n\t1K5d1h8dPZlVMT2TyNvYMI8cbvI79Jqare/SkU6vgMk9Wwe6ku4xSdbkaQ3Opcce8g\n\tpLaIYPiTmw9rhwijhK+7aUrq2nFl3KcLntWkfuWVsW9lZ9lY0t9GK70K4SxysOykRR\n\ts0xW7QqY5i2ycUoYwjLDg6/6qQzk4a9o09YQ4JBa7+35NP/tCybmTCzTzZl7dtMXuS\n\t0tZwxkQdDFAbw==" ], "DKIM-Filter": "OpenDKIM Filter v2.10.3 conuserg-12.nifty.com v8D5Kpx7010397", "X-Nifty-SrcIP": "[153.142.97.92]", "From": "Masahiro Yamada <yamada.masahiro@socionext.com>", "To": "linux-mtd@lists.infradead.org", "Subject": "[PATCH 8/9] mtd: nand: denali: clean up comments", "Date": "Wed, 13 Sep 2017 14:20:45 +0900", "Message-Id": "<1505280046-16608-9-git-send-email-yamada.masahiro@socionext.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1505280046-16608-1-git-send-email-yamada.masahiro@socionext.com>", "References": "<1505280046-16608-1-git-send-email-yamada.masahiro@socionext.com>", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20170912_222142_308643_3D835D71 ", "X-CRM114-Status": "GOOD ( 16.43 )", "X-Spam-Score": "-1.2 (-)", "X-Spam-Report": "SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details: (-1.2 points)\n\tpts rule name description\n\t---- ----------------------\n\t--------------------------------------------------\n\t0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)\n\t-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n\tnot necessarily valid", "X-BeenThere": "linux-mtd@lists.infradead.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>", "List-Post": "<mailto:linux-mtd@lists.infradead.org>", "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>", "Cc": "Boris Brezillon <boris.brezillon@free-electrons.com>,\n\tMarek Vasut <marek.vasut@gmail.com>,\n\tRichard Weinberger <richard@nod.at>, linux-kernel@vger.kernel.org,\n\tMasahiro Yamada <yamada.masahiro@socionext.com>, \n\tCyrille Pitchen <cyrille.pitchen@wedev4u.fr>,\n\tBrian Norris <computersforpeace@gmail.com>,\n\tDavid Woodhouse <dwmw2@infradead.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>", "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "This driver explains too much about what is apparent from the code.\n\nComments around basic APIs such as init_completion(), spin_lock_init(),\netc. seem unneeded lessons to kernel developers.\n(With those comments dropped, denali_drv_init() is small enough,\nso it has been merged into the probe function.)\n\nAlso, NAND driver developers should know the NAND init procedure, so\nthere is no need to explain nand_scan_ident/tail.\n\nI removed FSF's address from the license blocks, and added a simple\ncomment to the spinlock as \"checkpatch.pl --strict\" suggested so.\n\nSigned-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n---\n\n drivers/mtd/nand/denali.c | 52 +++++--------------------------------------\n drivers/mtd/nand/denali.h | 7 +-----\n drivers/mtd/nand/denali_dt.c | 1 -\n drivers/mtd/nand/denali_pci.c | 2 --\n 4 files changed, 6 insertions(+), 56 deletions(-)", "diff": "diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c\nindex ca98015..02ce310 100644\n--- a/drivers/mtd/nand/denali.c\n+++ b/drivers/mtd/nand/denali.c\n@@ -10,11 +10,6 @@\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n- *\n- * You should have received a copy of the GNU General Public License along with\n- * this program; if not, write to the Free Software Foundation, Inc.,\n- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.\n- *\n */\n \n #include <linux/bitfield.h>\n@@ -64,10 +59,6 @@ MODULE_LICENSE(\"GPL\");\n */\n #define DENALI_CLK_X_MULT\t6\n \n-/*\n- * this macro allows us to convert from an MTD structure to our own\n- * device context (denali) structure.\n- */\n static inline struct denali_nand_info *mtd_to_denali(struct mtd_info *mtd)\n {\n \treturn container_of(mtd_to_nand(mtd), struct denali_nand_info, nand);\n@@ -450,9 +441,8 @@ static int denali_sw_ecc_fixup(struct mtd_info *mtd,\n \t} while (!(err_cor_info & ERR_CORRECTION_INFO__LAST_ERR));\n \n \t/*\n-\t * Once handle all ecc errors, controller will trigger a\n-\t * ECC_TRANSACTION_DONE interrupt, so here just wait for\n-\t * a while for this interrupt\n+\t * Once handle all ECC errors, controller will trigger an\n+\t * ECC_TRANSACTION_DONE interrupt.\n \t */\n \tirq_status = denali_wait_for_irq(denali, INTR__ECC_TRANSACTION_DONE);\n \tif (!(irq_status & INTR__ECC_TRANSACTION_DONE))\n@@ -613,7 +603,6 @@ static int denali_dma_xfer(struct denali_nand_info *denali, void *buf,\n \tdenali_reset_irq(denali);\n \tdenali_setup_dma(denali, dma_addr, page, write);\n \n-\t/* wait for operation to complete */\n \tirq_status = denali_wait_for_irq(denali, irq_mask);\n \tif (!(irq_status & INTR__DMA_CMD_COMP))\n \t\tret = -EIO;\n@@ -1185,22 +1174,6 @@ static const struct mtd_ooblayout_ops denali_ooblayout_ops = {\n \t.free = denali_ooblayout_free,\n };\n \n-/* initialize driver data structures */\n-static void denali_drv_init(struct denali_nand_info *denali)\n-{\n-\t/*\n-\t * the completion object will be used to notify\n-\t * the callee that the interrupt is done\n-\t */\n-\tinit_completion(&denali->complete);\n-\n-\t/*\n-\t * the spinlock will be used to synchronize the ISR with any\n-\t * element that might be access shared data (interrupt status)\n-\t */\n-\tspin_lock_init(&denali->irq_lock);\n-}\n-\n static int denali_multidev_fixup(struct denali_nand_info *denali)\n {\n \tstruct nand_chip *chip = &denali->nand;\n@@ -1260,11 +1233,12 @@ int denali_init(struct denali_nand_info *denali)\n \n \tmtd->dev.parent = denali->dev;\n \tdenali_hw_init(denali);\n-\tdenali_drv_init(denali);\n+\n+\tinit_completion(&denali->complete);\n+\tspin_lock_init(&denali->irq_lock);\n \n \tdenali_clear_irq_all(denali);\n \n-\t/* Request IRQ after all the hardware initialization is finished */\n \tret = devm_request_irq(denali->dev, denali->irq, denali_isr,\n \t\t\t IRQF_SHARED, DENALI_NAND_NAME, denali);\n \tif (ret) {\n@@ -1282,7 +1256,6 @@ int denali_init(struct denali_nand_info *denali)\n \tif (!mtd->name)\n \t\tmtd->name = \"denali-nand\";\n \n-\t/* register the driver with the NAND core subsystem */\n \tchip->select_chip = denali_select_chip;\n \tchip->read_byte = denali_read_byte;\n \tchip->write_byte = denali_write_byte;\n@@ -1295,11 +1268,6 @@ int denali_init(struct denali_nand_info *denali)\n \tif (denali->clk_x_rate)\n \t\tchip->setup_data_interface = denali_setup_data_interface;\n \n-\t/*\n-\t * scan for NAND devices attached to the controller\n-\t * this is the first stage in a two step process to register\n-\t * with the nand subsystem\n-\t */\n \tret = nand_scan_ident(mtd, denali->max_banks, NULL);\n \tif (ret)\n \t\tgoto disable_irq;\n@@ -1323,18 +1291,9 @@ int denali_init(struct denali_nand_info *denali)\n \t\tchip->buf_align = 16;\n \t}\n \n-\t/*\n-\t * second stage of the NAND scan\n-\t * this stage requires information regarding ECC and\n-\t * bad block management.\n-\t */\n-\n \tchip->bbt_options |= NAND_BBT_USE_FLASH;\n \tchip->bbt_options |= NAND_BBT_NO_OOB;\n-\n \tchip->ecc.mode = NAND_ECC_HW_SYNDROME;\n-\n-\t/* no subpage writes on denali */\n \tchip->options |= NAND_NO_SUBPAGE_WRITE;\n \n \tret = denali_ecc_setup(mtd, chip, denali);\n@@ -1418,7 +1377,6 @@ int denali_init(struct denali_nand_info *denali)\n }\n EXPORT_SYMBOL(denali_init);\n \n-/* driver exit point */\n void denali_remove(struct denali_nand_info *denali)\n {\n \tstruct mtd_info *mtd = nand_to_mtd(&denali->nand);\ndiff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h\nindex 73aad3a..c761b5e 100644\n--- a/drivers/mtd/nand/denali.h\n+++ b/drivers/mtd/nand/denali.h\n@@ -10,11 +10,6 @@\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n- *\n- * You should have received a copy of the GNU General Public License along with\n- * this program; if not, write to the Free Software Foundation, Inc.,\n- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.\n- *\n */\n \n #ifndef __DENALI_H__\n@@ -313,7 +308,7 @@ struct denali_nand_info {\n \n \t/* elements used by ISR */\n \tstruct completion complete;\n-\tspinlock_t irq_lock;\n+\tspinlock_t irq_lock;\t\t/* protect irq_mask and irq_status */\n \tuint32_t irq_mask;\n \tuint32_t irq_status;\n \tint irq;\ndiff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c\nindex 01e0100..cfd33e6 100644\n--- a/drivers/mtd/nand/denali_dt.c\n+++ b/drivers/mtd/nand/denali_dt.c\n@@ -156,7 +156,6 @@ static struct platform_driver denali_dt_driver = {\n \t\t.of_match_table\t= denali_nand_dt_ids,\n \t},\n };\n-\n module_platform_driver(denali_dt_driver);\n \n MODULE_LICENSE(\"GPL\");\ndiff --git a/drivers/mtd/nand/denali_pci.c b/drivers/mtd/nand/denali_pci.c\nindex 7d5600b..57fb7ae 100644\n--- a/drivers/mtd/nand/denali_pci.c\n+++ b/drivers/mtd/nand/denali_pci.c\n@@ -109,7 +109,6 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)\n \treturn ret;\n }\n \n-/* driver exit point */\n static void denali_pci_remove(struct pci_dev *dev)\n {\n \tstruct denali_nand_info *denali = pci_get_drvdata(dev);\n@@ -125,5 +124,4 @@ static struct pci_driver denali_pci_driver = {\n \t.probe = denali_pci_probe,\n \t.remove = denali_pci_remove,\n };\n-\n module_pci_driver(denali_pci_driver);\n", "prefixes": [ "8/9" ] }