Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809105/?format=api
{ "id": 809105, "url": "http://patchwork.ozlabs.org/api/patches/809105/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170902163806.27265-2-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": "<20170902163806.27265-2-robdclark@gmail.com>", "list_archive_url": null, "date": "2017-09-02T16:37:56", "name": "[U-Boot,v2,1/8] fs/fat: split out helper to init fsdata", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "af68f13ad388340ac429daaffd1626255eaa0cb3", "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/20170902163806.27265-2-robdclark@gmail.com/mbox/", "series": [ { "id": 1165, "url": "http://patchwork.ozlabs.org/api/series/1165/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=1165", "date": "2017-09-02T16:37:55", "name": "fs/fat: cleanups + readdir implementation", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/1165/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809105/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809105/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=\"k9IpIFN8\"; dkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xl1zR2Fhpz9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 3 Sep 2017 02:39:31 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid E50A4C21F53; Sat, 2 Sep 2017 16:38:33 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 7971FC21EEF;\n\tSat, 2 Sep 2017 16:38:31 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid B5866C21F8B; Sat, 2 Sep 2017 16:38:23 +0000 (UTC)", "from mail-qk0-f196.google.com (mail-qk0-f196.google.com\n\t[209.85.220.196])\n\tby lists.denx.de (Postfix) with ESMTPS id 036C5C21F69\n\tfor <u-boot@lists.denx.de>; Sat, 2 Sep 2017 16:38:20 +0000 (UTC)", "by mail-qk0-f196.google.com with SMTP id c6so1289465qkh.4\n\tfor <u-boot@lists.denx.de>; Sat, 02 Sep 2017 09:38:19 -0700 (PDT)", "from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a])\n\tby smtp.gmail.com with ESMTPSA id\n\t36sm2165442qtz.89.2017.09.02.09.38.17\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 02 Sep 2017 09:38:17 -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\tbh=pMEzW3GykdwsH5pd17soXwG3Rgb3dNh0+gBHnxWg9aY=;\n\tb=k9IpIFN8HqApKOSm4k9/dZ1n7ZiW5jgaHi3IMhWunyNK1Gy3xkuDjCbjMKIDEMtE/5\n\tKA1HMnLkwU7xN7y6FzavBCEvsKIUDW1sB+Mn9bQpAp6jFqpIClpyAYcQVAYwJ6okEQqU\n\tqU9FjAvWRMFMcHzD3Vv5T7savGS1Ieo5ZBPqII+5Qsq3F8oD5DWhWGThJ4oc8kndqZ46\n\tErjQ9aZOhbcxPRILL7uzREeXSZ+AQlvGWiwM8FBkVabDsz6PqoDmow7bI/uAZuv9Pngx\n\tqvCE2Y9nWk0CsolSKgJ7GpnwjBe8lZmBtdN+xucs0WiiNrgmiGaBJEcCnXwGJLlHo0el\n\thLUA==", "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;\n\tbh=pMEzW3GykdwsH5pd17soXwG3Rgb3dNh0+gBHnxWg9aY=;\n\tb=f6bv/2MKH4Ubsjx3zx1IGH9LhRV7pVneDwBicOHW+e+q5YJgxSA0rEyQE8LV0xkMiZ\n\tbGSVz3dFmXbOSHtbK6YYICKiLMc9He542wvjggjvv88hNsw4AyBXmsZ+UzSLn/+E7EqT\n\tq3NRCXeE/5UFZFyzELdHymXEGluRnj2PTTrQcogBdfyEgg9GHBoqX9F9K6KT9FJzhG9g\n\t4Ky1Qh54CBgWOpXlbNjyA7bIRJ+XjNoNs7tvDw66UC1PkwWmpGVJAiWsma++E86FFB6k\n\tkGCVPky+Nm+kUY3+l1iofDUcFKP65wgm/3xHjiUFR1IZFmX+8o1ml4XI8/N1dPGCuTZN\n\tfdLg==", "X-Gm-Message-State": "AHPjjUgOvUBohHmvnEAm2pQNtlCpYl+fqBUSGmlD5CnMiOd9DtKP160c\n\tEJkWXAFLpVeJjXGAcAw=", "X-Google-Smtp-Source": "ADKCNb76X+vGBA3urMj2e2iixpozF29ggA0MuiTlDXbyZXRx2D8WaQ4tqzlAemeuNfJ+RvPiElOgEg==", "X-Received": "by 10.55.169.195 with SMTP id s186mr7030232qke.130.1504370298500;\n\tSat, 02 Sep 2017 09:38:18 -0700 (PDT)", "From": "Rob Clark <robdclark@gmail.com>", "To": "U-Boot Mailing List <u-boot@lists.denx.de>", "Date": "Sat, 2 Sep 2017 12:37:56 -0400", "Message-Id": "<20170902163806.27265-2-robdclark@gmail.com>", "X-Mailer": "git-send-email 2.13.5", "In-Reply-To": "<20170902163806.27265-1-robdclark@gmail.com>", "References": "<20170902163806.27265-1-robdclark@gmail.com>", "Cc": "Genevieve Chan <ccheauya@altera.com>, Tien Fong Chee <tfchee@altera.com>", "Subject": "[U-Boot] [PATCH v2 1/8] fs/fat: split out helper to init fsdata", "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>", "MIME-Version": "1.0", "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": "Want to re-use this in fat dirent iterator in next patch.\n\nSigned-off-by: Rob Clark <robdclark@gmail.com>\n---\n fs/fat/fat.c | 73 +++++++++++++++++++++++++++++++++++------------------------\n include/fat.h | 1 +\n 2 files changed, 44 insertions(+), 30 deletions(-)", "diff": "diff --git a/fs/fat/fat.c b/fs/fat/fat.c\nindex 465a6875ed..e1c0a15dc7 100644\n--- a/fs/fat/fat.c\n+++ b/fs/fat/fat.c\n@@ -808,35 +808,17 @@ exit:\n \treturn ret;\n }\n \n-__u8 do_fat_read_at_block[MAX_CLUSTSIZE]\n-\t__aligned(ARCH_DMA_MINALIGN);\n-\n-int do_fat_read_at(const char *filename, loff_t pos, void *buffer,\n-\t\t loff_t maxsize, int dols, int dogetsize, loff_t *size)\n+static int get_fs_info(fsdata *mydata)\n {\n-\tchar fnamecopy[2048];\n \tboot_sector bs;\n \tvolume_info volinfo;\n-\tfsdata datablock;\n-\tfsdata *mydata = &datablock;\n-\tdir_entry *dentptr = NULL;\n-\t__u16 prevcksum = 0xffff;\n-\tchar *subname = \"\";\n-\t__u32 cursect;\n-\tint idx, isdir = 0;\n-\tint files = 0, dirs = 0;\n-\tint ret = -1;\n-\tint firsttime;\n \t__u32 root_cluster = 0;\n-\t__u32 read_blk;\n-\tint rootdir_size = 0;\n-\tint buffer_blk_cnt;\n-\tint do_read;\n-\t__u8 *dir_ptr;\n+\tint ret;\n \n-\tif (read_bootsectandvi(&bs, &volinfo, &mydata->fatsize)) {\n+\tret = read_bootsectandvi(&bs, &volinfo, &mydata->fatsize);\n+\tif (ret) {\n \t\tdebug(\"Error: reading boot sector\\n\");\n-\t\treturn -1;\n+\t\treturn ret;\n \t}\n \n \tif (mydata->fatsize == 32) {\n@@ -848,8 +830,7 @@ int do_fat_read_at(const char *filename, loff_t pos, void *buffer,\n \n \tmydata->fat_sect = bs.reserved;\n \n-\tcursect = mydata->rootdir_sect\n-\t\t= mydata->fat_sect + mydata->fatlength * bs.fats;\n+\tmydata->rootdir_sect = mydata->fat_sect + mydata->fatlength * bs.fats;\n \n \tmydata->sect_size = (bs.sector_size[1] << 8) + bs.sector_size[0];\n \tmydata->clust_size = bs.cluster_size;\n@@ -863,12 +844,12 @@ int do_fat_read_at(const char *filename, loff_t pos, void *buffer,\n \t\tmydata->data_begin = mydata->rootdir_sect -\n \t\t\t\t\t(mydata->clust_size * 2);\n \t} else {\n-\t\trootdir_size = ((bs.dir_entries[1] * (int)256 +\n-\t\t\t\t bs.dir_entries[0]) *\n-\t\t\t\t sizeof(dir_entry)) /\n-\t\t\t\t mydata->sect_size;\n+\t\tmydata->rootdir_size = ((bs.dir_entries[1] * (int)256 +\n+\t\t\t\t\t bs.dir_entries[0]) *\n+\t\t\t\t\t sizeof(dir_entry)) /\n+\t\t\t\t\t mydata->sect_size;\n \t\tmydata->data_begin = mydata->rootdir_sect +\n-\t\t\t\t\trootdir_size -\n+\t\t\t\t\tmydata->rootdir_size -\n \t\t\t\t\t(mydata->clust_size * 2);\n \t}\n \n@@ -893,6 +874,38 @@ int do_fat_read_at(const char *filename, loff_t pos, void *buffer,\n \tdebug(\"Sector size: %d, cluster size: %d\\n\", mydata->sect_size,\n \t mydata->clust_size);\n \n+\treturn 0;\n+}\n+\n+__u8 do_fat_read_at_block[MAX_CLUSTSIZE]\n+\t__aligned(ARCH_DMA_MINALIGN);\n+\n+int do_fat_read_at(const char *filename, loff_t pos, void *buffer,\n+\t\t loff_t maxsize, int dols, int dogetsize, loff_t *size)\n+{\n+\tchar fnamecopy[2048];\n+\tfsdata datablock;\n+\tfsdata *mydata = &datablock;\n+\tdir_entry *dentptr = NULL;\n+\t__u16 prevcksum = 0xffff;\n+\tchar *subname = \"\";\n+\t__u32 cursect;\n+\tint idx, isdir = 0;\n+\tint files = 0, dirs = 0;\n+\tint ret = -1;\n+\tint firsttime;\n+\t__u32 root_cluster = 0;\n+\t__u32 read_blk;\n+\tint rootdir_size = 0;\n+\tint buffer_blk_cnt;\n+\tint do_read;\n+\t__u8 *dir_ptr;\n+\n+\tif (get_fs_info(mydata))\n+\t\treturn -1;\n+\n+\tcursect = mydata->rootdir_sect;\n+\n \t/* \"cwd\" is always the root... */\n \twhile (ISDIRDELIM(*filename))\n \t\tfilename++;\ndiff --git a/include/fat.h b/include/fat.h\nindex 71879f01ca..6d3fc8e4a6 100644\n--- a/include/fat.h\n+++ b/include/fat.h\n@@ -174,6 +174,7 @@ typedef struct {\n \t__u16\tclust_size;\t/* Size of clusters in sectors */\n \tint\tdata_begin;\t/* The sector of the first cluster, can be negative */\n \tint\tfatbufnum;\t/* Used by get_fatent, init to -1 */\n+\tint\trootdir_size;\n } fsdata;\n \n typedef int\t(file_detectfs_func)(void);\n", "prefixes": [ "U-Boot", "v2", "1/8" ] }