Sandro Volery
129dac3700
Staging: octeon: Avoid several usecases of strcpy
...
strcpy was used multiple times in strcpy to write into dev->name.
I replaced them with strscpy.
Signed-off-by: Sandro Volery <sandro@volery.com >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/20190911062359.GA14886@volery
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:38:45 +01:00
Rohit Sarkar
63350bdb38
staging: vhciq_core: replace snprintf with scnprintf
...
When the number of bytes to be printed exceeds the limit snprintf
returns the number of bytes that would have been printed (if there was
no truncation). This might cause issues, hence use scnprintf which
returns the actual number of bytes printed to buffer always
Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/20190911135112.GA5569@SARKAR
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:38:45 +01:00
Ajay Singh
9a4c56be67
staging: wilc1000: avoid twice IRQ handler execution for each single interrupt
...
The IRQ handler(isr_bh_routine()) was called twice for each interrupt
from firmware. The data was read completely during the first call and
the second call was doing nothing.
Now changed the IRQ flag from ‘level’ to ‘edge’ trigger i.e
IRQF_TRIGGER_LOW to IRQF_TRIGGER_FALLING to avoid extra interrupt
trigger.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Link: https://lore.kernel.org/r/20190910074514.3073-2-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:37:26 +01:00
Ajay Singh
a76e712a5a
staging: wilc1000: remove unused interrupt status handling code
...
Remove interrupt handling for unused interrupt status(PLL update and
Sleep). The firmware only initiates the interrupt for the data transfer
to host and rest are not used anymore.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Link: https://lore.kernel.org/r/20190910074514.3073-1-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:37:26 +01:00
Colin Ian King
5817eca067
staging: fbtft: make several arrays static const, makes object smaller
...
Don't populate the arrays on the stack but instead make them
static const. Makes the object code smaller by 1329 bytes.
Before:
text data bss dec hex filename
5581 1488 64 7133 1bdd drivers/staging/fbtft/fb_hx8340bn.o
5444 1264 0 6708 1a34 drivers/staging/fbtft/fb_hx8347d.o
3581 1360 0 4941 134d drivers/staging/fbtft/fb_ili9163.o
7154 1552 0 8706 2202 drivers/staging/fbtft/fb_ili9320.o
7478 2544 0 10022 2726 drivers/staging/fbtft/fb_ili9325.o
6327 1424 0 7751 1e47 drivers/staging/fbtft/fb_s6d1121.o
6498 1776 0 8274 2052 drivers/staging/fbtft/fb_ssd1289.o
After:
text data bss dec hex filename
5376 1584 64 7024 1b70 drivers/staging/fbtft/fb_hx8340bn.o
5276 1328 0 6604 19cc drivers/staging/fbtft/fb_hx8347d.o
3581 1360 0 4941 134d drivers/staging/fbtft/fb_ili9163.o
6905 1616 0 8521 2149 drivers/staging/fbtft/fb_ili9320.o
7229 2608 0 9837 266d drivers/staging/fbtft/fb_ili9325.o
6030 1488 0 7518 1d5e drivers/staging/fbtft/fb_s6d1121.o
6249 1872 0 8121 1fb9 drivers/staging/fbtft/fb_ssd1289.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Link: https://lore.kernel.org/r/20190906153052.31846-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:35:52 +01:00
Colin Ian King
0ba4d388d7
staging: rtl8188eu: make two arrays static const, makes object smaller
...
Don't populate two arrays on the stack but instead make them
static const. Makes the object code smaller by 49 bytes.
Before:
text data bss dec hex filename
26821 5616 0 32437 7eb5 rtl8188eu/core/rtw_ieee80211.o
After:
text data bss dec hex filename
26612 5776 0 32388 7e84 rtl8188eu/core/rtw_ieee80211.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Acked-by: Larry Finger <Larry.Finger@lwfinger.net >
Link: https://lore.kernel.org/r/20190906173949.21860-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:35:52 +01:00
Hariprasad Kelam
d9c35cca30
staging: rtl8723bs: core: Remove Macro "IS_MAC_ADDRESS_BROADCAST"
...
Remove unused macro IS_MAC_ADDRESS_BROADCAST. In future if one wants use
it ,use generic API "is_broadcast_ether_addr"
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com >
Link: https://lore.kernel.org/r/1567933780-2790-1-git-send-email-hariprasad.kelam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:35:52 +01:00
Sven Van Asbroeck
5e01274557
dt-bindings: anybus-controller: move to staging/ tree
...
The devicetree bindings for anybus-controller were mistakenly
merged into the main Linux tree. Its driver resides in
staging/, so the bindings belong in staging/ too.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Fixes: 20a980e957 ("dt-bindings: anybus-controller: document devicetree binding")
Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com >
Link: https://lore.kernel.org/r/20190908134805.30957-1-TheSven73@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:35:51 +01:00
Saiyam Doshi
8b77d94e69
staging: emxx_udc: remove local TRUE/FALSE definition
...
As the function argument and variables are defined as type 'bool',
remove local TRUE/FALSE define and change usage of those macros
with boolean value.
Signed-off-by: Saiyam Doshi <saiyamdoshi.in@gmail.com >
Link: https://lore.kernel.org/r/20190908175247.GA20699@SD
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:35:51 +01:00
Eugen Hristev
8692b047e8
staging: wilc1000: look for rtc_clk clock
...
If rtc_clk is provided from DT, use it and enable it.
This is optional.
The signal may be hardcoded and no need to be requested,
but if DT provides it, use it.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Acked-by: Ajay Singh <ajay.kathat@microchip.com >
Link: https://lore.kernel.org/r/1568037993-4646-2-git-send-email-eugen.hristev@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:35:51 +01:00
Eugen Hristev
ae8779e198
staging: dt-bindings: wilc1000: add optional rtc_clk property
...
Add bindings for optional rtc clock pin.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com >
Acked-by: Ajay Singh <ajay.kathat@microchip.com >
Link: https://lore.kernel.org/r/1568037993-4646-1-git-send-email-eugen.hristev@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:35:51 +01:00
Hariprasad Kelam
77b0a8412c
staging: nvec: make use of devm_platform_ioremap_resource
...
fix below issue reported by coccicheck
drivers/staging//nvec/nvec.c:794:1-5: WARNING: Use
devm_platform_ioremap_resource for base
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com >
Acked-by: Marc Dietrich <marvin24@gmx.de >
Link: https://lore.kernel.org/r/1567935662-8006-1-git-send-email-hariprasad.kelam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:35:50 +01:00
Valentin Vidic
2d70718dd5
staging: exfat: drop unused function parameter
...
sbi parameter not used inside the function so remove it.
Also cleanup unused variables generated by this change.
Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr >
Link: https://lore.kernel.org/r/20190908173539.26963-1-vvidic@valentin-vidic.from.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:29:29 +01:00
Sandro Volery
56a583d264
Staging: exfat: Avoid use of strcpy
...
Use strscpy instead of strcpy in exfat_core.c, and add a check
for length that will return already known FFS_INVALIDPATH.
Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk >
Signed-off-by: Sandro Volery <sandro@volery.com >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/20190912082559.GA5043@volery
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:25:05 +01:00
Valentin Vidic
4e35a0d87c
staging: exfat: use integer constants
...
Replace manually generated values with predefined constants.
Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr >
Link: https://lore.kernel.org/r/20190908152616.25459-3-vvidic@valentin-vidic.from.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:25:05 +01:00
Valentin Vidic
0e739ba8e2
staging: exfat: cleanup spacing for casts
...
Fix checkpatch.pl warnings:
CHECK: No space is necessary after a cast
Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr >
Link: https://lore.kernel.org/r/20190908152616.25459-2-vvidic@valentin-vidic.from.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:25:05 +01:00
Valentin Vidic
179e14c8e6
staging: exfat: cleanup spacing for operators
...
Fixes checkpatch.pl warnings:
CHECK: spaces preferred around that '-' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)
CHECK: spaces preferred around that '*' (ctx:VxV)
CHECK: spaces preferred around that '|' (ctx:VxV)
Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr >
Link: https://lore.kernel.org/r/20190908152616.25459-1-vvidic@valentin-vidic.from.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-12 10:25:04 +01:00
Colin Ian King
b33f56a1e4
staging: rtl8723bs: hal: remove redundant variable n
...
The variable n is being assigned a value that is never read inside
an if statement block, the assignment is redundant and can be removed.
With this removed, n is only being used for a constant loop bounds
check, so replace n with that value instead and remove n completely.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Link: https://lore.kernel.org/r/20190905152227.4610-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-06 18:20:33 +02:00
Rohit Sarkar
f0c7686dd7
staging: pi433: Fix typo in documentation
...
Fixes a typo in the documentation.
Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com >
Link: https://lore.kernel.org/r/20190905132219.GA1004@SARKAR
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-06 18:20:33 +02:00
Arnd Bergmann
44f6b40c22
staging: exfat: stop using 32-bit time_t
...
time_t suffers from overflow problems and should not be used.
In exfat, it is currently used in two open-coded time64_to_tm()
implementations. Changes those to use the existing function instead.
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Link: https://lore.kernel.org/r/20190906150917.1025250-2-arnd@arndb.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-06 18:20:28 +02:00
Arnd Bergmann
26cf766091
staging: exfat: stopusing CONFIG_FAT_DEFAULT_IOCHARSET
...
When CONFIG_VFAT_FS is disabled, the reference to CONFIG_FAT_DEFAULT_IOCHARSET
causes a link failure:
drivers/staging/exfat/exfat_super.c:46:41: error: use of undeclared identifier 'CONFIG_FAT_DEFAULT_IOCHARSET'
static char exfat_default_iocharset[] = CONFIG_FAT_DEFAULT_IOCHARSET;
I could not figure out why the correct code is commented
out, but using that fixes the problem.
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Link: https://lore.kernel.org/r/20190906150917.1025250-1-arnd@arndb.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-06 18:20:21 +02:00
Andy Shevchenko
f6897deef4
iio: hid-sensor-attributes: Fix divisions for 32-bit platforms
...
The commit 473d12f763
("iio: hid-sensor-attributes: Convert to use int_pow()")
converted to use generic int_pow() helper. Though, the generic one returns
64-bit value and, in cases when it is used as divisor, it compels 64-bit
division from compiler.
In order to fix this, introduce a temporary 32-bit variable to hold the result
of int_pow() and use it as divisor afterwards.
In couple of cases, replace int_pow() with a predefined unit factors for time
and frequency.
Fixes: 473d12f763 ("iio: hid-sensor-attributes: Convert to use int_pow()")
Reported-by: kbuild test robot <lkp@intel.com >
Reported-by: Nathan Chancellor <natechancellor@gmail.com >
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com >
Link: https://lore.kernel.org/r/20190905112759.13035-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-06 08:09:34 +02:00
Gao Xiang
618f40ea02
erofs: use read_cache_page_gfp for erofs_get_meta_page
...
As Christoph said [1], "I'd much prefer to just use
read_cache_page_gfp, and live with the fact that this
allocates bufferheads behind you for now. I'll try to
speed up my attempts to get rid of the buffer heads on
the block device mapping instead. "
This simplifies the code a lot and a minor thing is
"no REQ_META (e.g. for blktrace) on metadata at all..."
[1] https://lore.kernel.org/r/20190903153704.GA2201@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-26-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:09 +02:00
Gao Xiang
4231138fe0
erofs: always use iget5_locked
...
As Christoph said [1] [2], "Just use the slightly
more complicated 32-bit version everywhere so that
you have a single actually tested code path.
And then remove this helper. "
[1] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/
[2] https://lore.kernel.org/r/20190902125320.GA16726@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-25-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:09 +02:00
Gao Xiang
fe7c242357
erofs: use read_mapping_page instead of sb_bread
...
As Christoph said [1], "This seems to be your only direct
use of buffer heads, which while not deprecated are a bit
of an ugly step child. So if you can easily avoid creating
a buffer_head dependency in a new filesystem I think you
should avoid it. "
[1] https://lore.kernel.org/r/20190902125109.GA9826@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-24-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:09 +02:00
Gao Xiang
4f761fa253
erofs: rename errln/infoln/debugln to erofs_{err, info, dbg}
...
Add prefix "erofs_" to these functions and print
sb->s_id as a prefix to erofs_{err, info} so that
the user knows which file system is affected.
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-23-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:09 +02:00
Gao Xiang
84947eb603
erofs: save one level of indentation
...
As Christoph said [1], ".. and save one
level of indentation."
[1] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-22-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:09 +02:00
Gao Xiang
73d03931be
erofs: kill use_vmap module parameter
...
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.
Please talk to maintainers of other bits of the kernel
if you see issues and / or need enhancements. "
Let's redo the previous conclusion and kill the vmap
approach.
[1] https://lore.kernel.org/r/20190830165533.GA10909@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-21-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:09 +02:00
Gao Xiang
e2c71e74b2
erofs: kill all erofs specific fault injection
...
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.GE20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-20-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:08 +02:00
Gao Xiang
99634bf388
erofs: add "erofs_" prefix for common and short functions
...
Add erofs_ prefix to free_inode, alloc_inode, ...
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-19-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:08 +02:00
Gao Xiang
94e4e153b1
erofs: kill __submit_bio()
...
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.kernel.org/r/20190830162812.GA10694@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-18-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:08 +02:00
Gao Xiang
e655b5b3a2
erofs: kill prio and nofail of erofs_get_meta_page()
...
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
prio and nofail and erofs_get_inline_page() now.
[1] https://lore.kernel.org/r/20190830162812.GA10694@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-17-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:08 +02:00
Gao Xiang
a5c0b7802c
erofs: localize erofs_grab_bio()
...
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 and
localize erofs_grab_bio [2].
[1] https://lore.kernel.org/r/20190830162812.GA10694@infradead.org/
[2] https://lore.kernel.org/r/20190902122016.GL15931@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-16-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:08 +02:00
Gao Xiang
688a5f2ed4
erofs: kill verbose debug info in erofs_fill_super
...
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.GC20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-15-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:08 +02:00
Gao Xiang
0259f20948
erofs: use dsb instead of layout for ondisk super_block
...
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.GC20598@infradead.org/
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-14-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:08 +02:00
Gao Xiang
a2c75c8143
erofs: better erofs symlink stuffs
...
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 iops in the same place where you
also set those."
[1] https://lore.kernel.org/r/20190830163910.GB29603@infradead.org/
[2] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-13-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
2d78c209b9
erofs: update comments in inode.c
...
As Christoph suggested [1], update them all.
[1] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-12-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
ea559e7b84
erofs: update erofs_fs.h comments
...
As Christoph said [1] [2], update it now.
[1] https://lore.kernel.org/r/20190902124521.GA22153@infradead.org/
[2] https://lore.kernel.org/r/20190902120548.GB15931@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-11-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
a5876e24f1
erofs: use erofs_inode naming
...
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.GC20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-10-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
1c2dfbf9c2
erofs: kill erofs_{init,exit}_inode_cache
...
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.kernel.org/r/20190829101545.GC20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-9-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
8a76568225
erofs: better naming for erofs inode related stuffs
...
updates inode naming
- kill is_inode_layout_compression [1]
- kill magic underscores [2] [3]
- better naming for datamode & data_mapping_mode [3]
- better naming erofs_inode_{compact, extended} [4]
[1] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/
[2] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/
[3] https://lore.kernel.org/r/20190902122627.GN15931@infradead.org/
[4] https://lore.kernel.org/r/20190902125438.GA17750@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-8-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
426a930891
erofs: use feature_incompat rather than requirements
...
As Christoph said [1], "This is only cosmetic, why
not stick to feature_compat and feature_incompat?"
In my thought, requirements means "incompatible"
instead of "feature" though.
[1] https://lore.kernel.org/r/20190902125109.GA9826@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-7-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
c39747f770
erofs: update erofs_inode_is_data_compressed helper
...
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.kernel.org/r/20190829095954.GB20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-6-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
ed34aa4a8a
erofs: kill __packed for on-disk structures
...
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.GB20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-5-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
b6796abd3c
erofs: some macros are much more readable as a function
...
As Christoph suggested [1], these macros are much
more readable as a function.
[1] https://lore.kernel.org/r/20190829095954.GB20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-4-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:07 +02:00
Gao Xiang
60a49ba8fe
erofs: on-disk format should have explicitly assigned numbers
...
As Christoph suggested [1], on-disk format should have
explicitly assigned numbers.
[1] https://lore.kernel.org/r/20190829095954.GB20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-3-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:06 +02:00
Gao Xiang
4b66eb51d2
erofs: remove all the byte offset comments
...
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.GB20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com >
Link: https://lore.kernel.org/r/20190904020912.63925-2-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 20:10:06 +02:00
Leandro Ribeiro
3ee8b9de91
staging: rtl8723bs: Remove return statement from void function
...
Fix the following checkpatch warning:
"WARNING: void function return statements are not generally useful"
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net >
Link: https://lore.kernel.org/r/20190904210631.13599-1-leandrohr@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 09:37:32 +02:00
Beatriz Martins de Carvalho
21ba22e621
staging: rtl8192e: remove unnecessary blank line
...
Fix checkpath error "CHECK: Blank lines aren't necessary after an open
brace '{'"
in rtllib.h:482.
Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com >
Link: https://lore.kernel.org/r/20190904210326.17983-1-martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 09:37:31 +02:00
YueHaibing
f30bd2989b
staging: exfat: Use kmemdup in exfat_symlink()
...
Use kmemdup rather than duplicating its implementation
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Link: https://lore.kernel.org/r/20190905030047.88401-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-05 09:37:31 +02:00