Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811974/?format=api
{ "id": 811974, "url": "http://patchwork.ozlabs.org/api/patches/811974/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170909171606.20029-7-robdclark@gmail.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170909171606.20029-7-robdclark@gmail.com>", "list_archive_url": null, "date": "2017-09-09T17:15:57", "name": "[U-Boot,v3,6/9] fat/fs: remove a bunch of dead code", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "c6a3c3301ba585e367b5ae27c3ddc9198442cf9d", "submitter": { "id": 18760, "url": "http://patchwork.ozlabs.org/api/people/18760/?format=api", "name": "Rob Clark", "email": "robdclark@gmail.com" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170909171606.20029-7-robdclark@gmail.com/mbox/", "series": [ { "id": 2355, "url": "http://patchwork.ozlabs.org/api/series/2355/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=2355", "date": "2017-09-09T17:15:51", "name": "fs/fat: cleanups + readdir implementation", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/2355/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811974/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811974/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"UkUWI05G\"; dkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xqLbD1HJ6z9t16\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 10 Sep 2017 03:22:00 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid CA482C21EB1; Sat, 9 Sep 2017 17:18:23 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 569E8C21F12;\n\tSat, 9 Sep 2017 17:17:33 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid B13B4C21F28; Sat, 9 Sep 2017 17:16:48 +0000 (UTC)", "from mail-qk0-f195.google.com (mail-qk0-f195.google.com\n\t[209.85.220.195])\n\tby lists.denx.de (Postfix) with ESMTPS id 5C3F6C21E68\n\tfor <u-boot@lists.denx.de>; Sat, 9 Sep 2017 17:16:47 +0000 (UTC)", "by mail-qk0-f195.google.com with SMTP id o77so3234392qke.2\n\tfor <u-boot@lists.denx.de>; Sat, 09 Sep 2017 10:16:47 -0700 (PDT)", "from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a])\n\tby smtp.gmail.com with ESMTPSA id\n\tp7sm3204046qke.78.2017.09.09.10.16.44\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 09 Sep 2017 10:16:44 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=PymlcJay5TBoRrL4RcwklBXHDDJILXqutTw+bvDSHWU=;\n\tb=UkUWI05GpK5jicSZT9rrQM6HZ6ggLy341AombgLXCtggxGhPJFMOcMv6FJ5TcRPNK5\n\tTNr6hZCt266xiL4bQF0+cxOUiDMP/xkZGiBGMNN9VxUGv++bTM5oquiFA3hUnOR9tJMQ\n\tV6ziB2aL1LUdWttZ+QvYIEx9HTMnt6WK6l8MoGGSi5cihDibhgyTcASP0Ja6M6+KQpK7\n\tIjGPy8k+kUpnjDMN2m0fYX8bXl9wvpOoC3nUexrlXcL5fVWqfePfPaaTi9AjzsbmcoQE\n\tKDbxQfWhvg2kDsWoGgoPigifXfnfU1dOcbHjEBHrsfyHR9ZSqBhtcSrcEFmOX8gz5ukW\n\tdVHw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=PymlcJay5TBoRrL4RcwklBXHDDJILXqutTw+bvDSHWU=;\n\tb=K/Qzeh3KBzm5POeBwaTHgzyCLq3mcyQYxNKbsbpLLPjp4DNvsb3Dr+p3xtlYC7U9TI\n\t+kKyVZ5itbwDKoN1zdhgI3ULAuO/pq6ZyyyI+Za4U0YmwLZf5/m270NcEdZfSSDDpLx5\n\tMz5hUwkrbJtIgL3gqXeIhdGjI/10pdMRtmwbzRr0jV6jIC0hJRN98bDwNCmita2M8LEW\n\t4fsK81ipkOEXIk99OOQCQutNl7JX5t3ZLMDQqYAAyLx3SRy24f8cPHU5cO8flqBq5syu\n\terCYfp3Xyx8uGen+PfdxZrLL5qInjjSADhednoqw87pm91i+QGp+6qbrF4Xdf5Y5ibsH\n\tTJ9A==", "X-Gm-Message-State": "AHPjjUjWlmBwWNH73X3KRY6dKMLn2DQYBhdz+p7eTl1bqzYkUHfaH9Tr\n\t+wSLQfdw2B1PTtY9GHU=", "X-Google-Smtp-Source": "AOwi7QAnwIWBH8j4tfFzah6kHlqUvw7sV7P75GsAd5cubx8AWMkE1HfbPFeK0ztV1GiA6fDb3hGL1g==", "X-Received": "by 10.55.158.68 with SMTP id h65mr6301730qke.322.1504977406024; \n\tSat, 09 Sep 2017 10:16:46 -0700 (PDT)", "From": "Rob Clark <robdclark@gmail.com>", "To": "U-Boot Mailing List <u-boot@lists.denx.de>", "Date": "Sat, 9 Sep 2017 13:15:57 -0400", "Message-Id": "<20170909171606.20029-7-robdclark@gmail.com>", "X-Mailer": "git-send-email 2.13.5", "In-Reply-To": "<20170909171606.20029-1-robdclark@gmail.com>", "References": "<20170909171606.20029-1-robdclark@gmail.com>", "MIME-Version": "1.0", "Cc": "Heinrich Schuchardt <xypron.glpk@gmx.de>,\n\tTien Fong Chee <tfchee@altera.com>", "Subject": "[U-Boot] [PATCH v3 6/9] fat/fs: remove a bunch of dead code", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "Spotted by chance, when trying to remove file_fat_ls(), I noticed there\nwere some dead users of the API.\n\nSigned-off-by: Rob Clark <robdclark@gmail.com>\nAcked-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>\nReviewed-by: Simon Glass <sjg@chromium.org>\n---\n fs/fat/Makefile | 4 --\n fs/fat/file.c | 183 --------------------------------------------------------\n include/fat.h | 20 -------\n 3 files changed, 207 deletions(-)\n delete mode 100644 fs/fat/file.c", "diff": "diff --git a/fs/fat/Makefile b/fs/fat/Makefile\nindex b60e8486c4..3e2a6b01a8 100644\n--- a/fs/fat/Makefile\n+++ b/fs/fat/Makefile\n@@ -5,7 +5,3 @@\n \n obj-$(CONFIG_FS_FAT)\t:= fat.o\n obj-$(CONFIG_FAT_WRITE):= fat_write.o\n-\n-ifndef CONFIG_SPL_BUILD\n-obj-$(CONFIG_FS_FAT)\t+= file.o\n-endif\ndiff --git a/fs/fat/file.c b/fs/fat/file.c\ndeleted file mode 100644\nindex 89706117b9..0000000000\n--- a/fs/fat/file.c\n+++ /dev/null\n@@ -1,183 +0,0 @@\n-/*\n- * file.c\n- *\n- * Mini \"VFS\" by Marcus Sundberg\n- *\n- * 2002-07-28 - rjones@nexus-tech.net - ported to ppcboot v1.1.6\n- * 2003-03-10 - kharris@nexus-tech.net - ported to uboot\n- *\n- * SPDX-License-Identifier:\tGPL-2.0+\n- */\n-\n-#include <common.h>\n-#include <config.h>\n-#include <malloc.h>\n-#include <fat.h>\n-#include <linux/stat.h>\n-#include <linux/time.h>\n-\n-/* Supported filesystems */\n-static const struct filesystem filesystems[] = {\n-\t{ file_fat_detectfs, file_fat_ls, file_fat_read, \"FAT\" },\n-};\n-#define NUM_FILESYS\t(sizeof(filesystems)/sizeof(struct filesystem))\n-\n-/* The filesystem which was last detected */\n-static int current_filesystem = FSTYPE_NONE;\n-\n-/* The current working directory */\n-#define CWD_LEN\t\t511\n-char file_cwd[CWD_LEN+1] = \"/\";\n-\n-const char *\n-file_getfsname(int idx)\n-{\n-\tif (idx < 0 || idx >= NUM_FILESYS)\n-\t\treturn NULL;\n-\n-\treturn filesystems[idx].name;\n-}\n-\n-static void\n-pathcpy(char *dest, const char *src)\n-{\n-\tchar *origdest = dest;\n-\n-\tdo {\n-\t\tif (dest-file_cwd >= CWD_LEN) {\n-\t\t\t*dest = '\\0';\n-\t\t\treturn;\n-\t\t}\n-\t\t*(dest) = *(src);\n-\t\tif (*src == '\\0') {\n-\t\t\tif (dest-- != origdest && ISDIRDELIM(*dest)) {\n-\t\t\t\t*dest = '\\0';\n-\t\t\t}\n-\t\t\treturn;\n-\t\t}\n-\t\t++dest;\n-\n-\t\tif (ISDIRDELIM(*src))\n-\t\t\twhile (ISDIRDELIM(*src)) src++;\n-\t\telse\n-\t\t\tsrc++;\n-\t} while (1);\n-}\n-\n-int\n-file_cd(const char *path)\n-{\n-\tif (ISDIRDELIM(*path)) {\n-\t\twhile (ISDIRDELIM(*path)) path++;\n-\t\tstrncpy(file_cwd+1, path, CWD_LEN-1);\n-\t} else {\n-\t\tconst char *origpath = path;\n-\t\tchar *tmpstr = file_cwd;\n-\t\tint back = 0;\n-\n-\t\twhile (*tmpstr != '\\0') tmpstr++;\n-\t\tdo {\n-\t\t\ttmpstr--;\n-\t\t} while (ISDIRDELIM(*tmpstr));\n-\n-\t\twhile (*path == '.') {\n-\t\t\tpath++;\n-\t\t\twhile (*path == '.') {\n-\t\t\t\tpath++;\n-\t\t\t\tback++;\n-\t\t\t}\n-\t\t\tif (*path != '\\0' && !ISDIRDELIM(*path)) {\n-\t\t\t\tpath = origpath;\n-\t\t\t\tback = 0;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t\twhile (ISDIRDELIM(*path)) path++;\n-\t\t\torigpath = path;\n-\t\t}\n-\n-\t\twhile (back--) {\n-\t\t\t/* Strip off path component */\n-\t\t\twhile (!ISDIRDELIM(*tmpstr)) {\n-\t\t\t\ttmpstr--;\n-\t\t\t}\n-\t\t\tif (tmpstr == file_cwd) {\n-\t\t\t\t/* Incremented again right after the loop. */\n-\t\t\t\ttmpstr--;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t\t/* Skip delimiters */\n-\t\t\twhile (ISDIRDELIM(*tmpstr)) tmpstr--;\n-\t\t}\n-\t\ttmpstr++;\n-\t\tif (*path == '\\0') {\n-\t\t\tif (tmpstr == file_cwd) {\n-\t\t\t\t*tmpstr = '/';\n-\t\t\t\ttmpstr++;\n-\t\t\t}\n-\t\t\t*tmpstr = '\\0';\n-\t\t\treturn 0;\n-\t\t}\n-\t\t*tmpstr = '/';\n-\t\tpathcpy(tmpstr+1, path);\n-\t}\n-\n-\treturn 0;\n-}\n-\n-int\n-file_detectfs(void)\n-{\n-\tint i;\n-\n-\tcurrent_filesystem = FSTYPE_NONE;\n-\n-\tfor (i = 0; i < NUM_FILESYS; i++) {\n-\t\tif (filesystems[i].detect() == 0) {\n-\t\t\tstrcpy(file_cwd, \"/\");\n-\t\t\tcurrent_filesystem = i;\n-\t\t\tbreak;\n-\t\t}\n-\t}\n-\n-\treturn current_filesystem;\n-}\n-\n-int\n-file_ls(const char *dir)\n-{\n-\tchar fullpath[1024];\n-\tconst char *arg;\n-\n-\tif (current_filesystem == FSTYPE_NONE) {\n-\t\tprintf(\"Can't list files without a filesystem!\\n\");\n-\t\treturn -1;\n-\t}\n-\n-\tif (ISDIRDELIM(*dir)) {\n-\t\targ = dir;\n-\t} else {\n-\t\tsprintf(fullpath, \"%s/%s\", file_cwd, dir);\n-\t\targ = fullpath;\n-\t}\n-\treturn filesystems[current_filesystem].ls(arg);\n-}\n-\n-int file_read(const char *filename, void *buffer, int maxsize)\n-{\n-\tchar fullpath[1024];\n-\tconst char *arg;\n-\n-\tif (current_filesystem == FSTYPE_NONE) {\n-\t\tprintf(\"Can't load file without a filesystem!\\n\");\n-\t\treturn -1;\n-\t}\n-\n-\tif (ISDIRDELIM(*filename)) {\n-\t\targ = filename;\n-\t} else {\n-\t\tsprintf(fullpath, \"%s/%s\", file_cwd, filename);\n-\t\targ = fullpath;\n-\t}\n-\n-\treturn filesystems[current_filesystem].read(arg, buffer, maxsize);\n-}\ndiff --git a/include/fat.h b/include/fat.h\nindex 18d8981c48..b255ce5337 100644\n--- a/include/fat.h\n+++ b/include/fat.h\n@@ -178,25 +178,6 @@ static inline u32 clust_to_sect(fsdata *fsdata, u32 clust)\n \treturn fsdata->data_begin + clust * fsdata->clust_size;\n }\n \n-typedef int\t(file_detectfs_func)(void);\n-typedef int\t(file_ls_func)(const char *dir);\n-typedef int\t(file_read_func)(const char *filename, void *buffer,\n-\t\t\t\t int maxsize);\n-\n-struct filesystem {\n-\tfile_detectfs_func\t*detect;\n-\tfile_ls_func\t\t*ls;\n-\tfile_read_func\t\t*read;\n-\tconst char\t\tname[12];\n-};\n-\n-/* FAT tables */\n-file_detectfs_func\tfile_fat_detectfs;\n-file_ls_func\t\tfile_fat_ls;\n-file_read_func\t\tfile_fat_read;\n-\n-/* Currently this doesn't check if the dir exists or is valid... */\n-int file_cd(const char *path);\n int file_fat_detectfs(void);\n int file_fat_ls(const char *dir);\n int fat_exists(const char *filename);\n@@ -204,7 +185,6 @@ int fat_size(const char *filename, loff_t *size);\n int file_fat_read_at(const char *filename, loff_t pos, void *buffer,\n \t\t loff_t maxsize, loff_t *actread);\n int file_fat_read(const char *filename, void *buffer, int maxsize);\n-const char *file_getfsname(int idx);\n int fat_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);\n int fat_register_device(struct blk_desc *dev_desc, int part_no);\n \n", "prefixes": [ "U-Boot", "v3", "6/9" ] }