Re: [PATCH 2/2] stmmac: intel: Honor phy LED set by system firmware on a Dell hardware
by kernel test robot
Hi Kai-Heng,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16 next-20220113]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kai-Heng-Feng/net-phy-marvell-Us...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fb3b0673b7d5b477ed104949450cd511337ba3c6
config: x86_64-randconfig-a016 (https://download.01.org/0day-ci/archive/20220114/202201141429.5HZ7UZB6-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82c8aca93488730ce8f66101e0f3538f14b551dd)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/83e7c70ef5632f6b94caf8221a20db088...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kai-Heng-Feng/net-phy-marvell-Use-BIT-macro-for-flags/20220114-120936
git checkout 83e7c70ef5632f6b94caf8221a20db0881ee6ce2
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/phy/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/phy/marvell.c:755:27: warning: result of comparison of constant -1 with expression of type 'u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
if (priv->led_def_config == -1)
~~~~~~~~~~~~~~~~~~~~ ^ ~~
1 warning generated.
vim +755 drivers/net/phy/marvell.c
749
750 static void marvell_config_led(struct phy_device *phydev)
751 {
752 struct marvell_priv *priv = phydev->priv;
753 int err;
754
> 755 if (priv->led_def_config == -1)
756 return;
757
758 if (priv->led_def_config)
759 goto write;
760
761 if (phydev->dev_flags & MARVELL_PHY_USE_PRESET_LED) {
762 priv->led_def_config = phy_read_paged(phydev, MII_MARVELL_LED_PAGE,
763 MII_PHY_LED_CTRL);
764 if (priv->led_def_config < 0) {
765 priv->led_def_config = -1;
766 return;
767 }
768 } else {
769 switch (MARVELL_PHY_FAMILY_ID(phydev->phy_id)) {
770 /* Default PHY LED config: LED[0] .. Link, LED[1] .. Activity */
771 case MARVELL_PHY_FAMILY_ID(MARVELL_PHY_ID_88E1121R):
772 case MARVELL_PHY_FAMILY_ID(MARVELL_PHY_ID_88E1318S):
773 priv->led_def_config = MII_88E1121_PHY_LED_DEF;
774 break;
775 /* Default PHY LED config:
776 * LED[0] .. 1000Mbps Link
777 * LED[1] .. 100Mbps Link
778 * LED[2] .. Blink, Activity
779 */
780 case MARVELL_PHY_FAMILY_ID(MARVELL_PHY_ID_88E1510):
781 if (phydev->dev_flags & MARVELL_PHY_LED0_LINK_LED1_ACTIVE)
782 priv->led_def_config = MII_88E1510_PHY_LED0_LINK_LED1_ACTIVE;
783 else
784 priv->led_def_config = MII_88E1510_PHY_LED_DEF;
785 break;
786 default:
787 priv->led_def_config = -1;
788 return;
789 }
790 }
791
792 write:
793 err = phy_write_paged(phydev, MII_MARVELL_LED_PAGE, MII_PHY_LED_CTRL,
794 priv->led_def_config);
795 if (err < 0)
796 phydev_warn(phydev, "Fail to config marvell phy LED.\n");
797 }
798
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[jens-wiklander-tee:testing/tuxbuild 5/13] drivers/tee/tee_shm_pool.c:17:13: warning: comparison of distinct pointer types ('typeof (align) *' (aka 'unsigned int *') and 'typeof (((((1UL))) << (genpool->min_alloc_order))) *' (aka 'unsigned long *'))
by kernel test robot
tree: http://git.linaro.org/people/jens.wiklander/linux-tee testing/tuxbuild
head: 9ea0d125d4c9a4144b8641c454e97406b483722d
commit: 5b552e1bc3780894781030500c0216a9e0bef3f8 [5/13] tee: simplify shm pool handling
config: hexagon-randconfig-r041-20220113 (https://download.01.org/0day-ci/archive/20220114/202201141423.k7Z21dOm-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82c8aca93488730ce8f66101e0f3538f14b551dd)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add jens-wiklander-tee http://git.linaro.org/people/jens.wiklander/linux-tee
git fetch --no-tags jens-wiklander-tee testing/tuxbuild
git checkout 5b552e1bc3780894781030500c0216a9e0bef3f8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/tee/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/tee/tee_shm_pool.c:17:13: warning: comparison of distinct pointer types ('typeof (align) *' (aka 'unsigned int *') and 'typeof (((((1UL))) << (genpool->min_alloc_order))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
size_t a = max(align, BIT(genpool->min_alloc_order));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:52:19: note: expanded from macro 'max'
#define max(x, y) __careful_cmp(x, y, >)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +17 drivers/tee/tee_shm_pool.c
11
12 static int pool_op_gen_alloc(struct tee_shm_pool *pool, struct tee_shm *shm,
13 size_t size, size_t align)
14 {
15 unsigned long va;
16 struct gen_pool *genpool = pool->private_data;
> 17 size_t a = max(align, BIT(genpool->min_alloc_order));
18 struct genpool_data_align data = { .align = a };
19 size_t s = roundup(size, a);
20
21 va = gen_pool_alloc_algo(genpool, s, gen_pool_first_fit_align, &data);
22 if (!va)
23 return -ENOMEM;
24
25 memset((void *)va, 0, s);
26 shm->kaddr = (void *)va;
27 shm->paddr = gen_pool_virt_to_phys(genpool, va);
28 shm->size = s;
29 /*
30 * This is from a static shared memory pool so no need to register
31 * each chunk, and no need to unregister later either.
32 */
33 shm->flags &= ~TEE_SHM_REGISTER;
34 return 0;
35 }
36
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[jens-wiklander-tee:testing/tuxbuild 6/13] drivers/tee/tee_shm.c:52:17: warning: no previous prototype for function 'shm_alloc_helper'
by kernel test robot
tree: http://git.linaro.org/people/jens.wiklander/linux-tee testing/tuxbuild
head: 9ea0d125d4c9a4144b8641c454e97406b483722d
commit: b056eac4e504db8ee3fb03b4d13f1c9f2653bee8 [6/13] tee: replace tee_shm_alloc()
config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20220114/202201141435.ogrNv2hr-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82c8aca93488730ce8f66101e0f3538f14b551dd)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add jens-wiklander-tee http://git.linaro.org/people/jens.wiklander/linux-tee
git fetch --no-tags jens-wiklander-tee testing/tuxbuild
git checkout b056eac4e504db8ee3fb03b4d13f1c9f2653bee8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/tee/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/tee/tee_shm.c:52:17: warning: no previous prototype for function 'shm_alloc_helper' [-Wmissing-prototypes]
struct tee_shm *shm_alloc_helper(struct tee_context *ctx, size_t size,
^
drivers/tee/tee_shm.c:52:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct tee_shm *shm_alloc_helper(struct tee_context *ctx, size_t size,
^
static
1 warning generated.
vim +/shm_alloc_helper +52 drivers/tee/tee_shm.c
51
> 52 struct tee_shm *shm_alloc_helper(struct tee_context *ctx, size_t size,
53 size_t align, u32 flags, int id)
54 {
55 struct tee_device *teedev = ctx->teedev;
56 struct tee_shm *shm;
57 void *ret;
58 int rc;
59
60 if (!tee_device_get(teedev))
61 return ERR_PTR(-EINVAL);
62
63 if (!teedev->pool) {
64 /* teedev has been detached from driver */
65 ret = ERR_PTR(-EINVAL);
66 goto err_dev_put;
67 }
68
69 shm = kzalloc(sizeof(*shm), GFP_KERNEL);
70 if (!shm) {
71 ret = ERR_PTR(-ENOMEM);
72 goto err_dev_put;
73 }
74
75 refcount_set(&shm->refcount, 1);
76 shm->flags = flags;
77 shm->id = id;
78
79 /*
80 * We're assigning this as it is needed if the shm is to be
81 * registered. If this function returns OK then the caller expected
82 * to call teedev_ctx_get() or clear shm->ctx in case it's not
83 * needed any longer.
84 */
85 shm->ctx = ctx;
86
87 rc = teedev->pool->ops->alloc(teedev->pool, shm, size, align);
88 if (rc) {
89 ret = ERR_PTR(rc);
90 goto err_kfree;
91 }
92
93 teedev_ctx_get(ctx);
94 return shm;
95 err_kfree:
96 kfree(shm);
97 err_dev_put:
98 tee_device_put(teedev);
99 return ret;
100 }
101
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[jirislaby:devel 25/28] drivers/tty/mxser.c:1745:30: warning: unused variable 'mxser_ops'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: 54c28df496f290b0dfbb55d569ce5ddf8cafc4be
commit: 6f7621dd2f7f908ab9ca6882cebf663d4aac4e3e [25/28] mxser: switch to uart_driver
config: arm-randconfig-c002-20220111 (https://download.01.org/0day-ci/archive/20220114/202201141428.PLNSXkwB-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 244dd2913a43a200f5a6544d424cdc37b771028b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commi...
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout 6f7621dd2f7f908ab9ca6882cebf663d4aac4e3e
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/tty/mxser.c:1745:30: warning: unused variable 'mxser_ops' [-Wunused-const-variable]
static const struct uart_ops mxser_ops = {
^
1 warning generated.
clang-analyzer warnings: (new ones prefixed by >>)
9 warnings generated.
Suppressed 9 warnings (4 in non-user code, 5 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
kernel/sched/deadline.c:1534:22: warning: Value stored to 'p' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct task_struct *p = dl_task_of(dl_se);
^ ~~~~~~~~~~~~~~~~~
kernel/sched/deadline.c:1534:22: note: Value stored to 'p' during its initialization is never read
struct task_struct *p = dl_task_of(dl_se);
^ ~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (4 in non-user code, 2 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/iio/adc/ltc2497.c:18:8: warning: Excessive padding in 'struct ltc2497_driverdata' (32 padding bytes, where 0 is optimal).
Optimal fields order:
buf,
client,
common_ddata,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct ltc2497_driverdata {
~~~~~~~^~~~~~~~~~~~~~~~~~~~
drivers/iio/adc/ltc2497.c:18:8: note: Excessive padding in 'struct ltc2497_driverdata' (32 padding bytes, where 0 is optimal). Optimal fields order: buf, client, common_ddata, consider reordering the fields or adding explicit padding members
struct ltc2497_driverdata {
~~~~~~~^~~~~~~~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
drivers/w1/w1.c:589:3: warning: Value stored to 'event_owner' is never read [clang-analyzer-deadcode.DeadStores]
event_owner = "master";
^ ~~~~~~~~
drivers/w1/w1.c:589:3: note: Value stored to 'event_owner' is never read
event_owner = "master";
^ ~~~~~~~~
drivers/w1/w1.c:590:3: warning: Value stored to 'name' is never read [clang-analyzer-deadcode.DeadStores]
name = md->name;
^ ~~~~~~~~
drivers/w1/w1.c:590:3: note: Value stored to 'name' is never read
name = md->name;
^ ~~~~~~~~
drivers/w1/w1.c:593:3: warning: Value stored to 'event_owner' is never read [clang-analyzer-deadcode.DeadStores]
event_owner = "slave";
^ ~~~~~~~
drivers/w1/w1.c:593:3: note: Value stored to 'event_owner' is never read
event_owner = "slave";
^ ~~~~~~~
drivers/w1/w1.c:594:3: warning: Value stored to 'name' is never read [clang-analyzer-deadcode.DeadStores]
name = sl->name;
^ ~~~~~~~~
drivers/w1/w1.c:594:3: note: Value stored to 'name' is never read
name = sl->name;
^ ~~~~~~~~
drivers/w1/w1.c:997:2: warning: Value stored to 'search_bit' is never read [clang-analyzer-deadcode.DeadStores]
search_bit = 0;
^ ~
drivers/w1/w1.c:997:2: note: Value stored to 'search_bit' is never read
search_bit = 0;
^ ~
drivers/w1/w1.c:999:2: warning: Value stored to 'last_rn' is never read [clang-analyzer-deadcode.DeadStores]
last_rn = 0;
^ ~
drivers/w1/w1.c:999:2: note: Value stored to 'last_rn' is never read
last_rn = 0;
^ ~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
drivers/tty/mxser.c:396:7: warning: Although the value stored to 'hwid' is used in the enclosing expression, the value is never actually read from 'hwid' [clang-analyzer-deadcode.DeadStores]
if ((hwid = inb(io + UART_MCR)) != 0) {
^
drivers/tty/mxser.c:396:7: note: Although the value stored to 'hwid' is used in the enclosing expression, the value is never actually read from 'hwid'
>> drivers/tty/mxser.c:1693:4: warning: Value stored to 'int_cnt' is never read [clang-analyzer-deadcode.DeadStores]
int_cnt = 0;
^ ~
drivers/tty/mxser.c:1693:4: note: Value stored to 'int_cnt' is never read
int_cnt = 0;
^ ~
Suppressed 3 warnings (2 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/iio/adc/qcom-spmi-vadc.c:326:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = vadc_poll_wait_eoc(vadc, timeout);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/adc/qcom-spmi-vadc.c:326:3: note: Value stored to 'ret' is never read
ret = vadc_poll_wait_eoc(vadc, timeout);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
sound/isa/gus/interwave.c:686:2: warning: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcat(wss->pcm->name, " (codec)");
^~~~~~
sound/isa/gus/interwave.c:686:2: note: Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
strcat(wss->pcm->name, " (codec)");
^~~~~~
sound/isa/gus/interwave.c:740:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(card->driver, str);
^~~~~~
sound/isa/gus/interwave.c:740:2: note: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy(card->driver, str);
^~~~~~
sound/isa/gus/interwave.c:741:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
strcpy(card->shortname, str);
--
if (unlikely(__ret_warn_on)) \
^
drivers/nvme/host/fc.c:540:2: note: Memory is released
kfree(rport);
^~~~~~~~~~~~
include/linux/kref.h:65:3: note: Returning; memory was released
release(kref);
^~~~~~~~~~~~~
drivers/nvme/host/fc.c:548:2: note: Returning; memory was released
kref_put(&rport->ref, nvme_fc_free_rport);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/fc.c:3826:3: note: Returning; memory was released
nvme_fc_rport_put(rport);
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/fc.c:3829:3: note: Loop condition is false. Exiting loop
spin_lock_irqsave(&nvme_fc_lock, flags);
^
include/linux/spinlock.h:384:2: note: expanded from macro 'spin_lock_irqsave'
raw_spin_lock_irqsave(spinlock_check(lock), flags); \
^
include/linux/spinlock.h:240:2: note: expanded from macro 'raw_spin_lock_irqsave'
do { \
^
drivers/nvme/host/fc.c:3829:3: note: Loop condition is false. Exiting loop
spin_lock_irqsave(&nvme_fc_lock, flags);
^
include/linux/spinlock.h:382:43: note: expanded from macro 'spin_lock_irqsave'
#define spin_lock_irqsave(lock, flags) \
^
drivers/nvme/host/fc.c:3817:2: note: Loop condition is true. Entering loop body
while (!list_empty(&local_disc_list)) {
^
drivers/nvme/host/fc.c:3820:3: note: Calling 'list_del_init'
list_del_init(&rport->disc_list);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:206:2: note: Calling '__list_del_entry'
__list_del_entry(entry);
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:134:6: note: Assuming the condition is false
if (!__list_del_entry_valid(entry))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:134:2: note: Taking false branch
if (!__list_del_entry_valid(entry))
^
include/linux/list.h:137:13: note: Use of memory after it is freed
__list_del(entry->prev, entry->next);
^~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/tty/serial/fsl_lpuart.c:1283:33: warning: The result of the left shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1));
^
drivers/tty/serial/fsl_lpuart.c:2868:6: note: Assuming field 'suspended' is 0
if (sport->port.suspended && !irq_wake)
^~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/fsl_lpuart.c:2868:28: note: Left side of '&&' is false
if (sport->port.suspended && !irq_wake)
^
drivers/tty/serial/fsl_lpuart.c:2871:2: note: Taking false branch
if (lpuart_is_32(sport))
^
drivers/tty/serial/fsl_lpuart.c:2876:6: note: Assuming field 'lpuart_dma_rx_use' is true
if (sport->lpuart_dma_rx_use) {
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/fsl_lpuart.c:2876:2: note: Taking true branch
if (sport->lpuart_dma_rx_use) {
^
drivers/tty/serial/fsl_lpuart.c:2877:7: note: Assuming 'irq_wake' is true
if (irq_wake) {
^~~~~~~~
drivers/tty/serial/fsl_lpuart.c:2877:3: note: Taking true branch
if (irq_wake) {
^
drivers/tty/serial/fsl_lpuart.c:2878:9: note: Calling 'lpuart_start_rx_dma'
if (!lpuart_start_rx_dma(sport))
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/fsl_lpuart.c:1274:9: note: Assuming the condition is false
bits = (termios->c_cflag & CSIZE) == CS7 ? 9 : 10;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/fsl_lpuart.c:1274:9: note: '?' condition is false
drivers/tty/serial/fsl_lpuart.c:1275:6: note: Assuming the condition is false
if (termios->c_cflag & PARENB)
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/fsl_lpuart.c:1275:2: note: Taking false branch
if (termios->c_cflag & PARENB)
^
drivers/tty/serial/fsl_lpuart.c:1283:33: note: The result of the left shift is undefined because the right operand is negative
sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
drivers/tty/mxser.c:396:7: warning: Although the value stored to 'hwid' is used in the enclosing expression, the value is never actually read from 'hwid' [clang-analyzer-deadcode.DeadStores]
if ((hwid = inb(io + UART_MCR)) != 0) {
^
drivers/tty/mxser.c:396:7: note: Although the value stored to 'hwid' is used in the enclosing expression, the value is never actually read from 'hwid'
>> drivers/tty/mxser.c:1693:4: warning: Value stored to 'int_cnt' is never read [clang-analyzer-deadcode.DeadStores]
int_cnt = 0;
^ ~
drivers/tty/mxser.c:1693:4: note: Value stored to 'int_cnt' is never read
int_cnt = 0;
^ ~
Suppressed 3 warnings (2 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
drivers/leds/leds-pwm.c:146:15: warning: Access to field 'name' results in a dereference of a null pointer [clang-analyzer-core.NullDereference]
led.name = to_of_node(fwnode)->name;
^
include/linux/of.h:161:2: note: expanded from macro 'to_of_node'
({ \
^
drivers/leds/leds-pwm.c:180:6: note: Assuming 'count' is not equal to 0
if (!count)
^~~~~~
drivers/leds/leds-pwm.c:180:2: note: Taking false branch
if (!count)
^
drivers/leds/leds-pwm.c:185:6: note: Assuming 'priv' is non-null
if (!priv)
^~~~~
drivers/leds/leds-pwm.c:185:2: note: Taking false branch
if (!priv)
^
drivers/leds/leds-pwm.c:188:8: note: Calling 'led_pwm_create_fwnode'
ret = led_pwm_create_fwnode(&pdev->dev, priv);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/leds-pwm.c:143:2: note: Loop condition is true. Entering loop body
device_for_each_child_node(dev, fwnode) {
^
include/linux/property.h:112:2: note: expanded from macro 'device_for_each_child_node'
for (child = device_get_next_child_node(dev, NULL); child; \
^
drivers/leds/leds-pwm.c:145:7: note: Assuming 'ret' is not equal to 0
if (ret && is_of_node(fwnode))
^~~
drivers/leds/leds-pwm.c:145:7: note: Left side of '&&' is true
drivers/leds/leds-pwm.c:145:14: note: Assuming the condition is true
if (ret && is_of_node(fwnode))
^~~~~~~~~~~~~~~~~~
drivers/leds/leds-pwm.c:145:3: note: Taking true branch
if (ret && is_of_node(fwnode))
^
drivers/leds/leds-pwm.c:146:15: note: Assuming the condition is false
led.name = to_of_node(fwnode)->name;
^
include/linux/of.h:164:3: note: expanded from macro 'to_of_node'
is_of_node(__to_of_node_fwnode) ? \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/leds-pwm.c:146:15: note: '?' condition is false
led.name = to_of_node(fwnode)->name;
^
include/linux/of.h:164:3: note: expanded from macro 'to_of_node'
is_of_node(__to_of_node_fwnode) ? \
^
drivers/leds/leds-pwm.c:146:15: note: Access to field 'name' results in a dereference of a null pointer
led.name = to_of_node(fwnode)->name;
^
include/linux/of.h:161:2: note: expanded from macro 'to_of_node'
({ \
^
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
drivers/ata/pata_pdc2027x.c:521:2: warning: Value stored to 'pll_ctl' is never read [clang-analyzer-deadcode.DeadStores]
pll_ctl = ioread16(mmio_base + PDC_PLL_CTL);
^
drivers/ata/pata_pdc2027x.c:521:2: note: Value stored to 'pll_ctl' is never read
drivers/ata/pata_pdc2027x.c:570:2: warning: Value stored to 'pll_ctl' is never read [clang-analyzer-deadcode.DeadStores]
pll_ctl = ioread16(mmio_base + PDC_PLL_CTL);
^
drivers/ata/pata_pdc2027x.c:570:2: note: Value stored to 'pll_ctl' is never read
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
drivers/ata/pata_sis.c:417:6: warning: Value stored to 'speed' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
int speed = adev->dma_mode - XFER_MW_DMA_0;
vim +/mxser_ops +1745 drivers/tty/mxser.c
1612
1613 static bool mxser_port_isr(struct mxser_port *port)
1614 {
1615 struct uart_port *uport = &port->uport;
1616 struct tty_struct *tty;
1617 u8 iir, status;
1618 bool error = false;
1619
1620 iir = inb(uport->iobase + UART_IIR);
1621 if (iir & UART_IIR_NO_INT)
1622 return true;
1623
1624 iir &= MOXA_MUST_IIR_MASK;
1625 tty = tty_port_tty_get(&port->port);
1626 if (!tty) {
1627 status = inb(uport->iobase + UART_LSR);
1628 outb(port->FCR | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT,
1629 uport->iobase + UART_FCR);
1630 inb(uport->iobase + UART_MSR);
1631
1632 error = true;
1633 goto put_tty;
1634 }
1635
1636 status = inb(uport->iobase + UART_LSR);
1637
1638 if (port->board->must_hwid) {
1639 if (iir == MOXA_MUST_IIR_GDA ||
1640 iir == MOXA_MUST_IIR_RDA ||
1641 iir == MOXA_MUST_IIR_RTO ||
1642 iir == MOXA_MUST_IIR_LSR)
1643 status = mxser_receive_chars(tty, port, status);
1644 } else {
1645 status &= uport->read_status_mask;
1646 if (status & UART_LSR_DR)
1647 status = mxser_receive_chars(tty, port, status);
1648 }
1649
1650 mxser_check_modem_status(tty, port);
1651
1652 if (port->board->must_hwid) {
1653 if (iir == 0x02 && (status & UART_LSR_THRE))
1654 mxser_transmit_chars(tty, port);
1655 } else {
1656 if (status & UART_LSR_THRE)
1657 mxser_transmit_chars(tty, port);
1658 }
1659
1660 put_tty:
1661 tty_kref_put(tty);
1662
1663 return error;
1664 }
1665 #endif
1666 /*
1667 * This is the serial driver's generic interrupt routine
1668 */
1669 static irqreturn_t mxser_interrupt(int irq, void *dev_id)
1670 {
1671 struct mxser_board *brd = dev_id;
1672 struct mxser_port *port;
1673 struct uart_port *uport;
1674 unsigned int int_cnt, pass_counter = 0;
1675 unsigned int i, max = brd->nports;
1676 int handled = IRQ_NONE;
1677 u8 irqbits, bits, mask = BIT(max) - 1;
1678
1679 while (pass_counter++ < MXSER_ISR_PASS_LIMIT) {
1680 irqbits = inb(brd->vector) & mask;
1681 if (irqbits == mask)
1682 break;
1683
1684 handled = IRQ_HANDLED;
1685 for (i = 0, bits = 1; i < max; i++, irqbits |= bits, bits <<= 1) {
1686 if (irqbits == mask)
1687 break;
1688 if (bits & irqbits)
1689 continue;
1690 port = &brd->ports[i];
1691 uport = &port->uport;
1692
> 1693 int_cnt = 0;
1694 spin_lock(&uport->lock);
1695 do {
1696 //if (mxser_port_isr(port))
1697 break;
1698 } while (int_cnt++ < MXSER_ISR_PASS_LIMIT);
1699 spin_unlock(&uport->lock);
1700 }
1701 }
1702
1703 return handled;
1704 }
1705 #ifdef OLD
1706 static const struct tty_operations mxser_ops = {
1707 .open = mxser_open,
1708 .close = mxser_close,
1709 .write = mxser_write,
1710 .put_char = mxser_put_char,
1711 .flush_chars = mxser_flush_chars,
1712 .write_room = mxser_write_room,
1713 .chars_in_buffer = mxser_chars_in_buffer,
1714 .flush_buffer = mxser_flush_buffer,
1715 .ioctl = mxser_ioctl,
1716 .throttle = mxser_throttle,
1717 .unthrottle = mxser_unthrottle,
1718 .set_termios = mxser_set_termios,
1719 .stop = mxser_stop,
1720 .start = mxser_start,
1721 .hangup = mxser_hangup,
1722 .break_ctl = mxser_rs_break,
1723 .wait_until_sent = mxser_wait_until_sent,
1724 .tiocmget = mxser_tiocmget,
1725 .tiocmset = mxser_tiocmset,
1726 .set_serial = mxser_set_serial_info,
1727 .get_serial = mxser_get_serial_info,
1728 .get_icount = mxser_get_icount,
1729 };
1730
1731 static const struct tty_port_operations mxser_port_ops = {
1732 .carrier_raised = mxser_carrier_raised,
1733 .dtr_rts = mxser_dtr_rts,
1734 .activate = mxser_activate,
1735 .shutdown = mxser_shutdown_port,
1736 };
1737 #endif
1738
1739 static struct uart_driver mxser_uart_driver = {
1740 .owner = THIS_MODULE,
1741 .dev_name = "ttyMI",
1742 .nr = MXSER_PORTS,
1743 };
1744
> 1745 static const struct uart_ops mxser_ops = {
1746 .tx_empty = mxser_tx_empty,
1747 //.get_mctrl = mxser_get_mctrl,
1748 //.set_mctrl = mxser_set_mctrl,
1749 .stop_tx = mxser_stop_tx,
1750 .start_tx = mxser_start_tx,
1751 .stop_rx = mxser_stop_rx,
1752 .break_ctl = mxser_break_ctl,
1753 .startup = mxser_startup,
1754 .shutdown = mxser_shutdown,
1755 .set_termios = mxser_set_termios,
1756 //.pm = mxser_pm,
1757 //.type = mxser_type,
1758 //.release_port = mxser_release_port,
1759 //.request_port = mxser_request_port,
1760 //.config_port = mxser_config_port,
1761 //.verify_port = mxser_verify_port,
1762 };
1763
1764
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
Re: [PATCH v13 1/4] drm/msm/dp: do not initialize phy until plugin interrupt received
by kernel test robot
Hi Kuogee,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm/drm-next]
[also build test WARNING on drm-tip/drm-tip next-20220113]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next airlied/drm-next v5.16]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kuogee-Hsieh/group-dp-driver-rel...
base: git://anongit.freedesktop.org/drm/drm drm-next
config: csky-allmodconfig (https://download.01.org/0day-ci/archive/20220114/202201141446.nNPQPiCv-lk...)
compiler: csky-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/fbd3a5f531a9b0ad814e36a17b3ba95a2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kuogee-Hsieh/group-dp-driver-related-patches-into-one-series/20220114-075514
git checkout fbd3a5f531a9b0ad814e36a17b3ba95a20fe52a2
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=csky SHELL=/bin/bash drivers/gpu/drm/msm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/msm/dp/dp_display.c: In function 'dp_irq_hpd_handle':
>> drivers/gpu/drm/msm/dp/dp_display.c:682:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
682 | int ret;
| ^~~
vim +/ret +682 drivers/gpu/drm/msm/dp/dp_display.c
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 678
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 679 static int dp_irq_hpd_handle(struct dp_display_private *dp, u32 data)
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 680 {
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 681 u32 state;
c58eb1b54feefc3 Kuogee Hsieh 2020-11-18 @682 int ret;
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 683
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 684 mutex_lock(&dp->event_mutex);
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 685
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 686 /* irq_hpd can happen at either connected or disconnected state */
19e52bcb27c2ba1 Kuogee Hsieh 2020-11-03 687 state = dp->hpd_state;
f21c8a276c2dadd Kuogee Hsieh 2021-05-21 688 if (state == ST_DISPLAY_OFF || state == ST_SUSPENDED) {
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 689 mutex_unlock(&dp->event_mutex);
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 690 return 0;
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 691 }
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 692
2b5f09cadfc5768 Kuogee Hsieh 2020-12-18 693 if (state == ST_CONNECT_PENDING) {
2b5f09cadfc5768 Kuogee Hsieh 2020-12-18 694 /* wait until ST_CONNECTED */
2b5f09cadfc5768 Kuogee Hsieh 2020-12-18 695 dp_add_event(dp, EV_IRQ_HPD_INT, 0, 1); /* delay = 1 */
2b5f09cadfc5768 Kuogee Hsieh 2020-12-18 696 mutex_unlock(&dp->event_mutex);
2b5f09cadfc5768 Kuogee Hsieh 2020-12-18 697 return 0;
2b5f09cadfc5768 Kuogee Hsieh 2020-12-18 698 }
2b5f09cadfc5768 Kuogee Hsieh 2020-12-18 699
ea9f337ce81e315 Kuogee Hsieh 2021-02-05 700 if (state == ST_CONNECT_PENDING || state == ST_DISCONNECT_PENDING) {
9fc418430c65848 Kuogee Hsieh 2021-01-13 701 /* wait until ST_CONNECTED */
9fc418430c65848 Kuogee Hsieh 2021-01-13 702 dp_add_event(dp, EV_IRQ_HPD_INT, 0, 1); /* delay = 1 */
9fc418430c65848 Kuogee Hsieh 2021-01-13 703 mutex_unlock(&dp->event_mutex);
9fc418430c65848 Kuogee Hsieh 2021-01-13 704 return 0;
9fc418430c65848 Kuogee Hsieh 2021-01-13 705 }
9fc418430c65848 Kuogee Hsieh 2021-01-13 706
f61550b3864b957 Kuogee Hsieh 2021-12-08 707 /*
f61550b3864b957 Kuogee Hsieh 2021-12-08 708 * dp core (ahb/aux clks) must be initialized before
f61550b3864b957 Kuogee Hsieh 2021-12-08 709 * irq_hpd be handled
f61550b3864b957 Kuogee Hsieh 2021-12-08 710 */
fbd3a5f531a9b0a Kuogee Hsieh 2022-01-13 711 if (dp->core_initialized)
c58eb1b54feefc3 Kuogee Hsieh 2020-11-18 712 ret = dp_display_usbpd_attention_cb(&dp->pdev->dev);
fbd3a5f531a9b0a Kuogee Hsieh 2022-01-13 713
601f0479c583603 Maitreyee Rao 2021-07-26 714 DRM_DEBUG_DP("hpd_state=%d\n", state);
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 715
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 716 mutex_unlock(&dp->event_mutex);
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 717
8ede2ecc3e5ee32 Kuogee Hsieh 2020-09-11 718 return 0;
c943b4948b5848f Chandan Uddaraju 2020-08-27 719 }
c943b4948b5848f Chandan Uddaraju 2020-08-27 720
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
kernel/time/hrtimer.c:650:19: warning: unused function 'hrtimer_hres_active'
by kernel test robot
Hi Thomas,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fb3b0673b7d5b477ed104949450cd511337ba3c6
commit: 9482fd71dbb8f0d1a61821a83e467dc0a9d7b429 hrtimer: Use raw_cpu_ptr() in clock_was_set()
date: 5 months ago
config: mips-randconfig-r032-20220114 (https://download.01.org/0day-ci/archive/20220114/202201141442.FVgxOEDt-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82c8aca93488730ce8f66101e0f3538f14b551dd)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9482fd71dbb8f0d1a61821a83e467dc0a9d7b429
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash kernel/time/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/time/hrtimer.c:120:21: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_REALTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:121:22: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_MONOTONIC,
^~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:122:21: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_BOOTTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:123:17: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_TAI,
^~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:276:20: warning: unused function 'is_migration_base'
static inline bool is_migration_base(struct hrtimer_clock_base
^
>> kernel/time/hrtimer.c:650:19: warning: unused function 'hrtimer_hres_active'
static inline int hrtimer_hres_active(void)
^
kernel/time/hrtimer.c:1887:20: warning: unused function '__hrtimer_peek_ahead_timers'
static inline void __hrtimer_peek_ahead_timers(void) { }
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 105, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $1
or $0, $2
sc $0, $1
beqz $0, 1b
.set pop
'
clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 14.0.0 (git://gitmirror/llvm_project 82c8aca93488730ce8f66101e0f3538f14b551dd)
Target: mipsel-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-82c8aca934/bin
clang-14: note: diagnostic msg:
Makefile arch include kernel nr_bisected scripts source usr
vim +/hrtimer_hres_active +650 kernel/time/hrtimer.c
28bfd18bf3daa5 Anna-Maria Gleixner 2017-12-21 649
28bfd18bf3daa5 Anna-Maria Gleixner 2017-12-21 @650 static inline int hrtimer_hres_active(void)
28bfd18bf3daa5 Anna-Maria Gleixner 2017-12-21 651 {
28bfd18bf3daa5 Anna-Maria Gleixner 2017-12-21 652 return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
28bfd18bf3daa5 Anna-Maria Gleixner 2017-12-21 653 }
28bfd18bf3daa5 Anna-Maria Gleixner 2017-12-21 654
:::::: The code at line 650 was first introduced by commit
:::::: 28bfd18bf3daa5db8bb3422ea7138c8b7d2444ac hrtimer: Make the hrtimer_cpu_base::hres_active field unconditional, to simplify the code
:::::: TO: Anna-Maria Gleixner <anna-maria(a)linutronix.de>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
Re: [PATCH 1/2] ext4: fast commit may not fallback for ineligible commit
by Dan Carpenter
Hi Xin,
url: https://github.com/0day-ci/linux/commits/Xin-Yin/ext4-fix-issues-when-fas...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: x86_64-randconfig-m001-20220107 (https://download.01.org/0day-ci/archive/20220109/202201091544.W5HHEXAp-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
fs/ext4/inode.c:340 ext4_evict_inode() error: uninitialized symbol 'handle'.
vim +/handle +340 fs/ext4/inode.c
0930fcc1ee2f0a Al Viro 2010-06-07 167 void ext4_evict_inode(struct inode *inode)
ac27a0ec112a08 Dave Kleikamp 2006-10-11 168 {
ac27a0ec112a08 Dave Kleikamp 2006-10-11 169 handle_t *handle;
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 170 int err;
65db869c754e7c Jan Kara 2019-11-05 171 /*
65db869c754e7c Jan Kara 2019-11-05 172 * Credits for final inode cleanup and freeing:
65db869c754e7c Jan Kara 2019-11-05 173 * sb + inode (ext4_orphan_del()), block bitmap, group descriptor
65db869c754e7c Jan Kara 2019-11-05 174 * (xattr block freeing), bitmap, group descriptor (inode freeing)
65db869c754e7c Jan Kara 2019-11-05 175 */
65db869c754e7c Jan Kara 2019-11-05 176 int extra_credits = 6;
0421a189bc8cde Tahsin Erdogan 2017-06-22 177 struct ext4_xattr_inode_array *ea_inode_array = NULL;
46e294efc355c4 Jan Kara 2020-11-27 178 bool freeze_protected = false;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 179
7ff9c073dd4d72 Theodore Ts'o 2010-11-08 180 trace_ext4_evict_inode(inode);
2581fdc810889f Jiaying Zhang 2011-08-13 181
0930fcc1ee2f0a Al Viro 2010-06-07 182 if (inode->i_nlink) {
2d859db3e4a82a Jan Kara 2011-07-26 183 /*
2d859db3e4a82a Jan Kara 2011-07-26 184 * When journalling data dirty buffers are tracked only in the
2d859db3e4a82a Jan Kara 2011-07-26 185 * journal. So although mm thinks everything is clean and
2d859db3e4a82a Jan Kara 2011-07-26 186 * ready for reaping the inode might still have some pages to
2d859db3e4a82a Jan Kara 2011-07-26 187 * write in the running transaction or waiting to be
2d859db3e4a82a Jan Kara 2011-07-26 188 * checkpointed. Thus calling jbd2_journal_invalidatepage()
2d859db3e4a82a Jan Kara 2011-07-26 189 * (via truncate_inode_pages()) to discard these buffers can
2d859db3e4a82a Jan Kara 2011-07-26 190 * cause data loss. Also even if we did not discard these
2d859db3e4a82a Jan Kara 2011-07-26 191 * buffers, we would have no way to find them after the inode
2d859db3e4a82a Jan Kara 2011-07-26 192 * is reaped and thus user could see stale data if he tries to
2d859db3e4a82a Jan Kara 2011-07-26 193 * read them before the transaction is checkpointed. So be
2d859db3e4a82a Jan Kara 2011-07-26 194 * careful and force everything to disk here... We use
2d859db3e4a82a Jan Kara 2011-07-26 195 * ei->i_datasync_tid to store the newest transaction
2d859db3e4a82a Jan Kara 2011-07-26 196 * containing inode's data.
2d859db3e4a82a Jan Kara 2011-07-26 197 *
2d859db3e4a82a Jan Kara 2011-07-26 198 * Note that directories do not have this problem because they
2d859db3e4a82a Jan Kara 2011-07-26 199 * don't use page cache.
2d859db3e4a82a Jan Kara 2011-07-26 200 */
6a7fd522a7c94c Vegard Nossum 2016-07-04 201 if (inode->i_ino != EXT4_JOURNAL_INO &&
6a7fd522a7c94c Vegard Nossum 2016-07-04 202 ext4_should_journal_data(inode) &&
3abb1a0fc2871f Jan Kara 2017-06-22 203 (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode)) &&
3abb1a0fc2871f Jan Kara 2017-06-22 204 inode->i_data.nrpages) {
2d859db3e4a82a Jan Kara 2011-07-26 205 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
2d859db3e4a82a Jan Kara 2011-07-26 206 tid_t commit_tid = EXT4_I(inode)->i_datasync_tid;
2d859db3e4a82a Jan Kara 2011-07-26 207
d76a3a77113db0 Theodore Ts'o 2013-04-03 208 jbd2_complete_transaction(journal, commit_tid);
2d859db3e4a82a Jan Kara 2011-07-26 209 filemap_write_and_wait(&inode->i_data);
2d859db3e4a82a Jan Kara 2011-07-26 210 }
91b0abe36a7b2b Johannes Weiner 2014-04-03 211 truncate_inode_pages_final(&inode->i_data);
5dc23bdd5f846e Jan Kara 2013-06-04 212
0930fcc1ee2f0a Al Viro 2010-06-07 213 goto no_delete;
Assume we hit this goto
0930fcc1ee2f0a Al Viro 2010-06-07 214 }
0930fcc1ee2f0a Al Viro 2010-06-07 215
e2bfb088fac03c Theodore Ts'o 2014-10-05 216 if (is_bad_inode(inode))
e2bfb088fac03c Theodore Ts'o 2014-10-05 217 goto no_delete;
871a293155a245 Christoph Hellwig 2010-03-03 218 dquot_initialize(inode);
907f4554e2521c Christoph Hellwig 2010-03-03 219
678aaf481496b0 Jan Kara 2008-07-11 220 if (ext4_should_order_data(inode))
678aaf481496b0 Jan Kara 2008-07-11 221 ext4_begin_ordered_truncate(inode, 0);
91b0abe36a7b2b Johannes Weiner 2014-04-03 222 truncate_inode_pages_final(&inode->i_data);
ac27a0ec112a08 Dave Kleikamp 2006-10-11 223
ceff86fddae874 Jan Kara 2020-04-21 224 /*
ceff86fddae874 Jan Kara 2020-04-21 225 * For inodes with journalled data, transaction commit could have
ceff86fddae874 Jan Kara 2020-04-21 226 * dirtied the inode. Flush worker is ignoring it because of I_FREEING
ceff86fddae874 Jan Kara 2020-04-21 227 * flag but we still need to remove the inode from the writeback lists.
ceff86fddae874 Jan Kara 2020-04-21 228 */
ceff86fddae874 Jan Kara 2020-04-21 229 if (!list_empty_careful(&inode->i_io_list)) {
ceff86fddae874 Jan Kara 2020-04-21 230 WARN_ON_ONCE(!ext4_should_journal_data(inode));
ceff86fddae874 Jan Kara 2020-04-21 231 inode_io_list_del(inode);
ceff86fddae874 Jan Kara 2020-04-21 232 }
ceff86fddae874 Jan Kara 2020-04-21 233
8e8ad8a57c75f3 Jan Kara 2012-06-12 234 /*
8e8ad8a57c75f3 Jan Kara 2012-06-12 235 * Protect us against freezing - iput() caller didn't have to have any
46e294efc355c4 Jan Kara 2020-11-27 236 * protection against it. When we are in a running transaction though,
46e294efc355c4 Jan Kara 2020-11-27 237 * we are already protected against freezing and we cannot grab further
46e294efc355c4 Jan Kara 2020-11-27 238 * protection due to lock ordering constraints.
8e8ad8a57c75f3 Jan Kara 2012-06-12 239 */
46e294efc355c4 Jan Kara 2020-11-27 240 if (!ext4_journal_current_handle()) {
8e8ad8a57c75f3 Jan Kara 2012-06-12 241 sb_start_intwrite(inode->i_sb);
46e294efc355c4 Jan Kara 2020-11-27 242 freeze_protected = true;
46e294efc355c4 Jan Kara 2020-11-27 243 }
e50e5129f384ae Andreas Dilger 2017-06-21 244
30a7eb970c3aae Tahsin Erdogan 2017-06-22 245 if (!IS_NOQUOTA(inode))
30a7eb970c3aae Tahsin Erdogan 2017-06-22 246 extra_credits += EXT4_MAXQUOTAS_DEL_BLOCKS(inode->i_sb);
30a7eb970c3aae Tahsin Erdogan 2017-06-22 247
65db869c754e7c Jan Kara 2019-11-05 248 /*
65db869c754e7c Jan Kara 2019-11-05 249 * Block bitmap, group descriptor, and inode are accounted in both
65db869c754e7c Jan Kara 2019-11-05 250 * ext4_blocks_for_truncate() and extra_credits. So subtract 3.
65db869c754e7c Jan Kara 2019-11-05 251 */
30a7eb970c3aae Tahsin Erdogan 2017-06-22 252 handle = ext4_journal_start(inode, EXT4_HT_TRUNCATE,
65db869c754e7c Jan Kara 2019-11-05 253 ext4_blocks_for_truncate(inode) + extra_credits - 3);
ac27a0ec112a08 Dave Kleikamp 2006-10-11 254 if (IS_ERR(handle)) {
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 255 ext4_std_error(inode->i_sb, PTR_ERR(handle));
ac27a0ec112a08 Dave Kleikamp 2006-10-11 256 /*
ac27a0ec112a08 Dave Kleikamp 2006-10-11 257 * If we're going to skip the normal cleanup, we still need to
ac27a0ec112a08 Dave Kleikamp 2006-10-11 258 * make sure that the in-core orphan linked list is properly
ac27a0ec112a08 Dave Kleikamp 2006-10-11 259 * cleaned up.
ac27a0ec112a08 Dave Kleikamp 2006-10-11 260 */
617ba13b31fbf5 Mingming Cao 2006-10-11 261 ext4_orphan_del(NULL, inode);
46e294efc355c4 Jan Kara 2020-11-27 262 if (freeze_protected)
8e8ad8a57c75f3 Jan Kara 2012-06-12 263 sb_end_intwrite(inode->i_sb);
ac27a0ec112a08 Dave Kleikamp 2006-10-11 264 goto no_delete;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 265 }
30a7eb970c3aae Tahsin Erdogan 2017-06-22 266
ac27a0ec112a08 Dave Kleikamp 2006-10-11 267 if (IS_SYNC(inode))
0390131ba84fd3 Frank Mayhar 2009-01-07 268 ext4_handle_sync(handle);
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 269
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 270 /*
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 271 * Set inode->i_size to 0 before calling ext4_truncate(). We need
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 272 * special handling of symlinks here because i_size is used to
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 273 * determine whether ext4_inode_info->i_data contains symlink data or
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 274 * block mappings. Setting i_size to 0 will remove its fast symlink
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 275 * status. Erase i_data so that it becomes a valid empty block map.
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 276 */
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 277 if (ext4_inode_is_fast_symlink(inode))
407cd7fb83c0eb Tahsin Erdogan 2017-07-04 278 memset(EXT4_I(inode)->i_data, 0, sizeof(EXT4_I(inode)->i_data));
ac27a0ec112a08 Dave Kleikamp 2006-10-11 279 inode->i_size = 0;
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 280 err = ext4_mark_inode_dirty(handle, inode);
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 281 if (err) {
12062dddda4509 Eric Sandeen 2010-02-15 282 ext4_warning(inode->i_sb,
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 283 "couldn't mark inode dirty (err %d)", err);
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 284 goto stop_handle;
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 285 }
2c98eb5ea24976 Theodore Ts'o 2016-11-13 286 if (inode->i_blocks) {
2c98eb5ea24976 Theodore Ts'o 2016-11-13 287 err = ext4_truncate(inode);
2c98eb5ea24976 Theodore Ts'o 2016-11-13 288 if (err) {
54d3adbc29f0c7 Theodore Ts'o 2020-03-28 289 ext4_error_err(inode->i_sb, -err,
2c98eb5ea24976 Theodore Ts'o 2016-11-13 290 "couldn't truncate inode %lu (err %d)",
2c98eb5ea24976 Theodore Ts'o 2016-11-13 291 inode->i_ino, err);
2c98eb5ea24976 Theodore Ts'o 2016-11-13 292 goto stop_handle;
2c98eb5ea24976 Theodore Ts'o 2016-11-13 293 }
2c98eb5ea24976 Theodore Ts'o 2016-11-13 294 }
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 295
30a7eb970c3aae Tahsin Erdogan 2017-06-22 296 /* Remove xattr references. */
30a7eb970c3aae Tahsin Erdogan 2017-06-22 297 err = ext4_xattr_delete_inode(handle, inode, &ea_inode_array,
30a7eb970c3aae Tahsin Erdogan 2017-06-22 298 extra_credits);
30a7eb970c3aae Tahsin Erdogan 2017-06-22 299 if (err) {
30a7eb970c3aae Tahsin Erdogan 2017-06-22 300 ext4_warning(inode->i_sb, "xattr delete (err %d)", err);
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 301 stop_handle:
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 302 ext4_journal_stop(handle);
4538821993f448 Theodore Ts'o 2010-07-29 303 ext4_orphan_del(NULL, inode);
46e294efc355c4 Jan Kara 2020-11-27 304 if (freeze_protected)
8e8ad8a57c75f3 Jan Kara 2012-06-12 305 sb_end_intwrite(inode->i_sb);
30a7eb970c3aae Tahsin Erdogan 2017-06-22 306 ext4_xattr_inode_array_free(ea_inode_array);
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 307 goto no_delete;
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 308 }
bc965ab3f2b4b7 Theodore Ts'o 2008-08-02 309
ac27a0ec112a08 Dave Kleikamp 2006-10-11 310 /*
617ba13b31fbf5 Mingming Cao 2006-10-11 311 * Kill off the orphan record which ext4_truncate created.
ac27a0ec112a08 Dave Kleikamp 2006-10-11 312 * AKPM: I think this can be inside the above `if'.
617ba13b31fbf5 Mingming Cao 2006-10-11 313 * Note that ext4_orphan_del() has to be able to cope with the
ac27a0ec112a08 Dave Kleikamp 2006-10-11 314 * deletion of a non-existent orphan - this is because we don't
617ba13b31fbf5 Mingming Cao 2006-10-11 315 * know if ext4_truncate() actually created an orphan record.
ac27a0ec112a08 Dave Kleikamp 2006-10-11 316 * (Well, we could do this if we need to, but heck - it works)
ac27a0ec112a08 Dave Kleikamp 2006-10-11 317 */
617ba13b31fbf5 Mingming Cao 2006-10-11 318 ext4_orphan_del(handle, inode);
5ffff834322281 Arnd Bergmann 2018-07-29 319 EXT4_I(inode)->i_dtime = (__u32)ktime_get_real_seconds();
ac27a0ec112a08 Dave Kleikamp 2006-10-11 320
ac27a0ec112a08 Dave Kleikamp 2006-10-11 321 /*
ac27a0ec112a08 Dave Kleikamp 2006-10-11 322 * One subtle ordering requirement: if anything has gone wrong
ac27a0ec112a08 Dave Kleikamp 2006-10-11 323 * (transaction abort, IO errors, whatever), then we can still
ac27a0ec112a08 Dave Kleikamp 2006-10-11 324 * do these next steps (the fs will already have been marked as
ac27a0ec112a08 Dave Kleikamp 2006-10-11 325 * having errors), but we can't free the inode if the mark_dirty
ac27a0ec112a08 Dave Kleikamp 2006-10-11 326 * fails.
ac27a0ec112a08 Dave Kleikamp 2006-10-11 327 */
617ba13b31fbf5 Mingming Cao 2006-10-11 328 if (ext4_mark_inode_dirty(handle, inode))
ac27a0ec112a08 Dave Kleikamp 2006-10-11 329 /* If that failed, just do the required in-core inode clear. */
0930fcc1ee2f0a Al Viro 2010-06-07 330 ext4_clear_inode(inode);
ac27a0ec112a08 Dave Kleikamp 2006-10-11 331 else
617ba13b31fbf5 Mingming Cao 2006-10-11 332 ext4_free_inode(handle, inode);
617ba13b31fbf5 Mingming Cao 2006-10-11 333 ext4_journal_stop(handle);
46e294efc355c4 Jan Kara 2020-11-27 334 if (freeze_protected)
8e8ad8a57c75f3 Jan Kara 2012-06-12 335 sb_end_intwrite(inode->i_sb);
0421a189bc8cde Tahsin Erdogan 2017-06-22 336 ext4_xattr_inode_array_free(ea_inode_array);
ac27a0ec112a08 Dave Kleikamp 2006-10-11 337 return;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 338 no_delete:
b21ebf143af219 Harshad Shirwadkar 2020-11-05 339 if (!list_empty(&EXT4_I(inode)->i_fc_list))
It's not clear without more context where this ->i_fc_list list is
modified.
db40129f85538a Xin Yin 2022-01-07 @340 ext4_fc_mark_ineligible(inode->i_sb, EXT4_FC_REASON_NOMEM, handle);
"handle" might be uninitialized?
0930fcc1ee2f0a Al Viro 2010-06-07 341 ext4_clear_inode(inode); /* We must guarantee clearing of inode... */
9d0be50230b333 Theodore Ts'o 2010-01-01 342 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week