[PATCH 21/21] erofs: save one level of indentation

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1], ".. and save one level of indentation." [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/inode.c | 65 1 file changed

[PATCH 18/21] erofs: add "erofs_" prefix for common and short functions

2019-08-31 Thread Gao Xiang
From: Gao Xiang Add erofs_ prefix to free_inode, alloc_inode, ... Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.c | 6 +++--- fs/erofs/decompressor.c | 22 +++--- fs/erofs/inode.c| 8 fs/erofs/namei.c| 10 +

[PATCH 19/21] erofs: kill all erofs specific fault injection

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], "Please just use plain kmalloc everywhere and let the normal kernel error injection code take care of injeting any errors." [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --

[PATCH 15/21] erofs: kill __submit_bio()

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph pointed out [1], " Why is there __submit_bio which really just obsfucates what is going on? Also why is __submit_bio using bio_set_op_attrs instead of opencode it as the comment right next to it asks you to? " Let's use submit_bio directly instead. [1] https://lore

[PATCH 14/21] erofs: kill prio and nofail of erofs_get_meta_page()

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph pointed out [1], "Why is there __erofs_get_meta_page with the two weird booleans instead of a single erofs_get_meta_page that gets and gfp_t for additional flags and an unsigned int for additional bio op flags." And since all callers can handle errors, let's kill pri

[PATCH 20/21] erofs: kill use_vmap module parameter

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1], "vm_map_ram is supposed to generally behave better. So if it doesn't please report that that to the arch maintainer and linux-mm so that they can look into the issue. Having user make choices of deep down kernel internals is just a horrible interface. Ple

[PATCH 17/21] erofs: use a switch statement when dealing with the file modes

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], " Please use a switch statement when dealing with the file modes to make everything easier to read." [1] https://lore.kernel.org/r/20190829102503.gf20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/inode.c | 3

[PATCH 16/21] erofs: kill magic underscores

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1], " > + vi->datamode = __inode_data_mapping(advise); What is the deal with these magic underscores here and various other similar helpers? " Let avoid magic underscores now... [1] https://lore.kernel.org/lkml/20190829102426.ge20...@infradead.org/ Reporte

[PATCH 13/21] erofs: simplify erofs_grab_bio() since bio_alloc() never fail

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph pointed out [1], "erofs_grab_bio tries to handle a bio_alloc failure, except that the function will not actually fail due the mempool backing it." Sorry about useless code, fix it now. [1] https://lore.kernel.org/lkml/20190830162812.ga10...@infradead.org/ Reported-b

[PATCH 05/21] erofs: update erofs_inode_is_data_compressed helper

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said, "This looks like a really obsfucated way to write: return datamode == EROFS_INODE_FLAT_COMPRESSION || datamode == EROFS_INODE_FLAT_COMPRESSION_LEGACY; " Although I had my own consideration, it's the right way for now. [1] https://lore.k

[PATCH 06/21] erofs: kill erofs_{init,exit}_inode_cache

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1] "having this function seems entirely pointless", let's kill those. filesystem function name ext2,f2fs,ext4,isofs,squashfs,cifs,... init_inodecache In addition, add a necessary "rcu_barrier()" on exit_fs(); [1] https://lore.ker

[PATCH 08/21] erofs: update comments in inode.c

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], update them all. [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/erofs/inode

[PATCH 12/21] erofs: kill verbose debug info in erofs_fill_super

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph said [1], "That is some very verbose debug info. We usually don't add that and let people trace the function instead. " [1] https://lore.kernel.org/r/20190829101545.gc20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/super.

[PATCH 04/21] erofs: kill __packed for on-disk structures

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested "Please don't add __packed" [1], remove all __packed except struct erofs_dirent here. Note that all on-disk fields except struct erofs_dirent (12 bytes with a 8-byte nid) in EROFS are naturally aligned. [1] https://lore.kernel.org/r/20190829095954.gb20...@

[PATCH 09/21] erofs: update erofs symlink stuffs

2019-08-31 Thread Gao Xiang
From: Gao Xiang Fix as Christoph suggested [1] [2], "remove is_inode_fast_symlink and just opencode it in the few places using it" and "Please just set the ops directly instead of obsfucating that in a single caller, single line inline function. And please set it instead of the normal symlink i

[PATCH 07/21] erofs: use erofs_inode naming

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], "Why is this called vnode instead of inode? That seems like a rather odd naming for a Linux file system." [1] https://lore.kernel.org/r/20190829101545.gc20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data.

[PATCH 03/21] erofs: some macros are much more readable as a function

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], these macros are much more readable as a function. [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 22 ++ fs/erofs/inode.c|

[PATCH 10/21] erofs: kill is_inode_layout_compression()

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], "The name of this helper is a little odd. But I think just opencoding it seems generally cleaner anyway. " [1] https://lore.kernel.org/r/20190829102426.ge20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/data

[PATCH 11/21] erofs: use dsb instead of layout for ondisk super_block

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph pointed out [1], "Why is the variable name for the on-disk subperblock layout? We usually still calls this something with sb in the name, e.g. dsb. for disksuper block. " Let's fix it. [1] https://lore.kernel.org/r/20190829101545.gc20...@infradead.org/ Signed-off-by:

[PATCH 02/21] erofs: on-disk format should have explicitly assigned numbers

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph claimed [1], on-disk format should have explicitly assigned numbers. I have to change it. [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 18 +- 1

[PATCH 01/21] erofs: remove all the byte offset comments

2019-08-31 Thread Gao Xiang
From: Gao Xiang As Christoph suggested [1], "Please remove all the byte offset comments. that is something that can easily be checked with gdb or pahole." [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- fs/erofs/e

[PATCH 00/21] erofs: patchset addressing Christoph's comments

2019-08-31 Thread Gao Xiang
Hi, This patchset is based on the following patch by Pratik Shinde, https://lore.kernel.org/linux-erofs/20190830095615.10995-1-pratikshinde...@gmail.com/ All patches addressing Christoph's comments on v6, which are trivial, most deleted code are from erofs specific fault injection, which was foll

Re: [PATCH] staging: exfat: add exfat filesystem code to staging

2019-08-31 Thread Dave Chinner
On Sat, Aug 31, 2019 at 06:31:45AM -0400, Valdis Klētnieks wrote: > On Sat, 31 Aug 2019 07:54:10 +1000, Dave Chinner said: > > > The correct place for new filesystem review is where all the > > experienced filesystem developers hang out - that's linux-fsdevel, > > not the driver staging tree. > >

Re: [OSSNA] Intro to kernel hacking tutorial

2019-08-31 Thread Amit Kumar
Hi, I think now your tutorial should be ready. Regards, Amit Kumar On Mon, Jul 22, 2019 at 2:59 PM Tobin C. Harding wrote: > > On Fri, Jul 19, 2019 at 12:36:58PM +0300, Dan Carpenter wrote: > > On Fri, Jul 05, 2019 at 12:50:55PM +1000, Tobin C. Harding wrote: > > > Outcome will (hopefully) be a

Re: [PATCH] r8188eu: use skb_put_data instead of skb_put/memcpy pair

2019-08-31 Thread Ivan Safonov
On 8/27/19 1:31 PM, Dan Carpenter wrote: On Sun, Aug 25, 2019 at 11:48:58PM +0300, Ivan Safonov wrote: skb_put_data is shorter and clear. Please don't start the commit message in the middle of a sentence. It often gets split from the start of the sentence. See how it looks here. https://mar

[PATCH] staging:kpc2000: Fix long constant sparse warning

2019-08-31 Thread Harsh Jain
It fixed following warning in kpc2000 driver "constant is so big it is unsigned long" Signed-off-by: Harsh Jain --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 18 +- drivers/staging/kpc2000/kpc2000/core.c | 18 +- drivers/staging/kpc2000/kpc_dma/fil

Re: [PATCH v3 6/7] erofs: remove all likely/unlikely annotations

2019-08-31 Thread Dan Carpenter
On Sat, Aug 31, 2019 at 12:04:20AM +0800, Gao Xiang wrote: > I don't have some benchmark data for each unlikely/likely case (and I have > no idea "is that worth to take time to benchmark rather than do another more > useful stuffs"), so..I have to kill them all... We don't really require benchmark

Re: [PATCH] staging: exfat: add exfat filesystem code to staging

2019-08-31 Thread Valdis Klētnieks
On Sat, 31 Aug 2019 07:54:10 +1000, Dave Chinner said: > The correct place for new filesystem review is where all the > experienced filesystem developers hang out - that's linux-fsdevel, > not the driver staging tree. So far everything's been cc'ed to linux-fsdevel, which has been spending more t

Re: [PATCH] staging: exfat: remove redundant goto

2019-08-31 Thread Valdis Klētnieks
On Fri, 30 Aug 2019 19:15:23 +0100, Colin King said: > From: Colin Ian King > > The goto after a return is never executed, so it is redundant and can > be removed. > > Addresses-Coverity: ("Structurally dead code") > Signed-off-by: Colin Ian King Good catch > - if (dentry < -1) { > +

[PATCH] staging: rts5208: Fixed checkpatch warning.

2019-08-31 Thread Prakhar Sinha
This patch solves the following checkpatch.pl's messages in drivers/staging/rts5208/sd.c WARNING: line over 80 characters 4517: FILE: drivers/staging/rts5208/sd.c:4517: + sd_card->sd_lock_status &= ~(SD_UNLOCK_POW_ON | SD_SDR_RST); WARNING: line over

[PATCH] staging: rts5208: Fix checkpath warning

2019-08-31 Thread P SAI PRASANTH
This patch fixes the following checkpath warning in file drivers/staging/rts5208/xd.c:1754 WARNING: line over 80 characters + index, offset, DMA_TO_DEVICE, chip->xd_timeout); Signed-off-by: P SAI PRASANTH --- drivers/staging/rts5208/xd.c | 3 ++- 1 file