Re: [PATCH] scsi: libfc: Fix passing zero to 'PTR_ERR' warning
by Dan Carpenter
Hi YueHaibing,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next v5.9-rc1 next-20200818]
[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/YueHaibing/scsi-libfc-Fix-passin...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-m001-20200818 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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:
drivers/scsi/libfc/fc_disc.c:371 fc_disc_gpn_ft_req() error: uninitialized symbol 'err'.
# https://github.com/0day-ci/linux/commit/c22a185df6f9701ac244e7f2ec1ba38e2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review YueHaibing/scsi-libfc-Fix-passing-zero-to-PTR_ERR-warning/20200818-194521
git checkout c22a185df6f9701ac244e7f2ec1ba38e27177aec
vim +/err +371 drivers/scsi/libfc/fc_disc.c
42e9a92fe6a909 Robert Love 2008-12-09 342 static void fc_disc_gpn_ft_req(struct fc_disc *disc)
42e9a92fe6a909 Robert Love 2008-12-09 343 {
42e9a92fe6a909 Robert Love 2008-12-09 344 struct fc_frame *fp;
0685230c59b548 Joe Eykholt 2010-07-20 345 struct fc_lport *lport = fc_disc_lport(disc);
c22a185df6f970 YueHaibing 2020-08-18 346 int err;
42e9a92fe6a909 Robert Love 2008-12-09 347
ee35624e1e4e4e Hannes Reinecke 2018-07-04 348 lockdep_assert_held(&disc->disc_mutex);
ee35624e1e4e4e Hannes Reinecke 2018-07-04 349
42e9a92fe6a909 Robert Love 2008-12-09 350 WARN_ON(!fc_lport_test_ready(lport));
42e9a92fe6a909 Robert Love 2008-12-09 351
42e9a92fe6a909 Robert Love 2008-12-09 352 disc->pending = 1;
42e9a92fe6a909 Robert Love 2008-12-09 353 disc->requested = 0;
42e9a92fe6a909 Robert Love 2008-12-09 354
42e9a92fe6a909 Robert Love 2008-12-09 355 disc->buf_len = 0;
42e9a92fe6a909 Robert Love 2008-12-09 356 disc->seq_count = 0;
42e9a92fe6a909 Robert Love 2008-12-09 357 fp = fc_frame_alloc(lport,
42e9a92fe6a909 Robert Love 2008-12-09 358 sizeof(struct fc_ct_hdr) +
42e9a92fe6a909 Robert Love 2008-12-09 359 sizeof(struct fc_ns_gid_ft));
c22a185df6f970 YueHaibing 2020-08-18 360 if (!fp) {
c22a185df6f970 YueHaibing 2020-08-18 361 err = -ENOMEM;
42e9a92fe6a909 Robert Love 2008-12-09 362 goto err;
c22a185df6f970 YueHaibing 2020-08-18 363 }
42e9a92fe6a909 Robert Love 2008-12-09 364
a46f327aa5caf2 Joe Eykholt 2009-08-25 365 if (lport->tt.elsct_send(lport, 0, fp,
42e9a92fe6a909 Robert Love 2008-12-09 366 FC_NS_GPN_FT,
42e9a92fe6a909 Robert Love 2008-12-09 367 fc_disc_gpn_ft_resp,
b94f8951bf2566 Joe Eykholt 2009-11-03 368 disc, 3 * lport->r_a_tov))
42e9a92fe6a909 Robert Love 2008-12-09 369 return;
It's Reverse the Last Condition anti-pattern. It's a special subcase of
Success Handling anti-pattern. Ugh... Anyway if tt.elsct_send()
returns NULL then "err" isn't initialized.
42e9a92fe6a909 Robert Love 2008-12-09 370 err:
c22a185df6f970 YueHaibing 2020-08-18 @371 fc_disc_error(disc, ERR_PTR(err));
42e9a92fe6a909 Robert Love 2008-12-09 372 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[RFC PATCH] vdpa_sim: vdpasim_get_iova_range() can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
vdpa_sim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 89854e17c3c27b..ff6c9fd8d879bd 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -574,7 +574,7 @@ static u32 vdpasim_get_generation(struct vdpa_device *vdpa)
return vdpasim->generation;
}
-struct vdpa_iova_range vdpasim_get_iova_range(struct vdpa_device *vdpa)
+static struct vdpa_iova_range vdpasim_get_iova_range(struct vdpa_device *vdpa)
{
struct vdpa_iova_range range = {
.first = 0ULL,
2 years, 1 month
Re: [PATCH 2/2] PCI: sprd: Add support for Unisoc SoCs' PCIe controller
by kernel test robot
Hi Hongtao,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on pci/next]
[also build test WARNING on robh/for-next v5.9-rc1 next-20200821]
[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/Hongtao-Wu/PCI-Add-new-Unisoc-PC...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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/pci/controller/dwc/pcie-sprd.c:43:5: warning: no previous prototype for 'sprd_pcie_syscon_setting' [-Wmissing-prototypes]
43 | int sprd_pcie_syscon_setting(struct platform_device *pdev, char *env)
| ^~~~~~~~~~~~~~~~~~~~~~~~
# https://github.com/0day-ci/linux/commit/b82baaf6b6b4a04032d29dd7b749d1f9c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hongtao-Wu/PCI-Add-new-Unisoc-PCIe-driver/20200821-175351
git checkout b82baaf6b6b4a04032d29dd7b749d1f9c4a23104
vim +/sprd_pcie_syscon_setting +43 drivers/pci/controller/dwc/pcie-sprd.c
42
> 43 int sprd_pcie_syscon_setting(struct platform_device *pdev, char *env)
44 {
45 struct device_node *np = pdev->dev.of_node;
46 int i, count, err;
47 u32 type, delay, reg, mask, val, tmp_val;
48 struct of_phandle_args out_args;
49 struct regmap *iomap;
50 struct device *dev = &pdev->dev;
51
52 if (!of_find_property(np, env, NULL)) {
53 dev_info(dev, "There isn't property %s in dts\n", env);
54 return 0;
55 }
56
57 count = of_property_count_elems_of_size(np, env,
58 (NUM_OF_ARGS + 1) * sizeof(u32));
59 dev_info(dev, "Property (%s) reg count is %d :\n", env, count);
60
61 for (i = 0; i < count; i++) {
62 err = of_parse_phandle_with_fixed_args(np, env, NUM_OF_ARGS,
63 i, &out_args);
64 if (err < 0)
65 return err;
66
67 type = out_args.args[0];
68 delay = out_args.args[1];
69 reg = out_args.args[2];
70 mask = out_args.args[3];
71 val = out_args.args[4];
72
73 iomap = syscon_node_to_regmap(out_args.np);
74
75 switch (type) {
76 case 0:
77 regmap_update_bits(iomap, reg, mask, val);
78 break;
79
80 case 1:
81 regmap_read(iomap, reg, &tmp_val);
82 tmp_val &= (~mask);
83 tmp_val |= (val & mask);
84 regmap_write(iomap, reg, tmp_val);
85 break;
86 default:
87 break;
88 }
89
90 if (delay)
91 usleep_range(delay, delay + 10);
92
93 regmap_read(iomap, reg, &tmp_val);
94 dev_dbg(&pdev->dev,
95 "%2d:reg[0x%8x] mask[0x%8x] val[0x%8x] result[0x%8x]\n",
96 i, reg, mask, val, tmp_val);
97 }
98
99 return i;
100 }
101
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [RFC v2 06/20] drm/nouveau/kms: Search for encoders' connectors properly
by Dan Carpenter
Hi Lyude,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on tegra-drm/drm/tegra/for-next linus/master drm-exynos/exynos-drm-next v5.9-rc1 next-20200820]
[cannot apply to drm-intel/for-linux-next drm/drm-next]
[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/Lyude-Paul/drm-dp-i915-nouveau-C...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-m021-20200820 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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:
drivers/gpu/drm/nouveau/dispnv50/disp.c:608 nv50_audio_component_get_eld() error: uninitialized symbol 'nv_connector'.
# https://github.com/0day-ci/linux/commit/5c362c0faa9cf06f71364cff9168034cc...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lyude-Paul/drm-dp-i915-nouveau-Cleanup-nouveau-HPD-and-add-DP-features-from-i915/20200821-023327
git checkout 5c362c0faa9cf06f71364cff9168034cc04bb05c
vim +/nv_connector +608 drivers/gpu/drm/nouveau/dispnv50/disp.c
742db30c4ee6cd Takashi Iwai 2020-01-13 581 static int
61a41097e4bd4b Takashi Iwai 2020-04-16 582 nv50_audio_component_get_eld(struct device *kdev, int port, int dev_id,
742db30c4ee6cd Takashi Iwai 2020-01-13 583 bool *enabled, unsigned char *buf, int max_bytes)
742db30c4ee6cd Takashi Iwai 2020-01-13 584 {
742db30c4ee6cd Takashi Iwai 2020-01-13 585 struct drm_device *drm_dev = dev_get_drvdata(kdev);
742db30c4ee6cd Takashi Iwai 2020-01-13 586 struct nouveau_drm *drm = nouveau_drm(drm_dev);
742db30c4ee6cd Takashi Iwai 2020-01-13 587 struct drm_encoder *encoder;
742db30c4ee6cd Takashi Iwai 2020-01-13 588 struct nouveau_encoder *nv_encoder;
5c362c0faa9cf0 Lyude Paul 2020-08-20 589 struct drm_connector *connector;
742db30c4ee6cd Takashi Iwai 2020-01-13 590 struct nouveau_connector *nv_connector;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
742db30c4ee6cd Takashi Iwai 2020-01-13 591 struct nouveau_crtc *nv_crtc;
5c362c0faa9cf0 Lyude Paul 2020-08-20 592 struct drm_connector_list_iter conn_iter;
742db30c4ee6cd Takashi Iwai 2020-01-13 593 int ret = 0;
742db30c4ee6cd Takashi Iwai 2020-01-13 594
742db30c4ee6cd Takashi Iwai 2020-01-13 595 *enabled = false;
5c362c0faa9cf0 Lyude Paul 2020-08-20 596
742db30c4ee6cd Takashi Iwai 2020-01-13 597 drm_for_each_encoder(encoder, drm->dev) {
742db30c4ee6cd Takashi Iwai 2020-01-13 598 nv_encoder = nouveau_encoder(encoder);
5c362c0faa9cf0 Lyude Paul 2020-08-20 599
5c362c0faa9cf0 Lyude Paul 2020-08-20 600 drm_connector_list_iter_begin(drm_dev, &conn_iter);
5c362c0faa9cf0 Lyude Paul 2020-08-20 601 drm_for_each_connector_iter(connector, &conn_iter) {
5c362c0faa9cf0 Lyude Paul 2020-08-20 602 if (connector->state->best_encoder == encoder) {
5c362c0faa9cf0 Lyude Paul 2020-08-20 603 nv_connector = nouveau_connector(connector);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The nouveau_connector() function is a wrapper around container_of() so
it can't be NULL.
5c362c0faa9cf0 Lyude Paul 2020-08-20 604 break;
5c362c0faa9cf0 Lyude Paul 2020-08-20 605 }
5c362c0faa9cf0 Lyude Paul 2020-08-20 606 }
5c362c0faa9cf0 Lyude Paul 2020-08-20 607 drm_connector_list_iter_end(&conn_iter);
5c362c0faa9cf0 Lyude Paul 2020-08-20 @608 if (!nv_connector)
^^^^^^^^^^^^^
Uninitialized.
5c362c0faa9cf0 Lyude Paul 2020-08-20 609 continue;
5c362c0faa9cf0 Lyude Paul 2020-08-20 610
742db30c4ee6cd Takashi Iwai 2020-01-13 611 nv_crtc = nouveau_crtc(encoder->crtc);
5c362c0faa9cf0 Lyude Paul 2020-08-20 612 if (!nv_crtc || nv_encoder->or != port ||
61a41097e4bd4b Takashi Iwai 2020-04-16 613 nv_crtc->index != dev_id)
742db30c4ee6cd Takashi Iwai 2020-01-13 614 continue;
0ad679d157aa69 Ben Skeggs 2020-05-29 615 *enabled = nv_encoder->audio;
742db30c4ee6cd Takashi Iwai 2020-01-13 616 if (*enabled) {
742db30c4ee6cd Takashi Iwai 2020-01-13 617 ret = drm_eld_size(nv_connector->base.eld);
742db30c4ee6cd Takashi Iwai 2020-01-13 618 memcpy(buf, nv_connector->base.eld,
742db30c4ee6cd Takashi Iwai 2020-01-13 619 min(max_bytes, ret));
742db30c4ee6cd Takashi Iwai 2020-01-13 620 }
742db30c4ee6cd Takashi Iwai 2020-01-13 621 break;
742db30c4ee6cd Takashi Iwai 2020-01-13 622 }
5c362c0faa9cf0 Lyude Paul 2020-08-20 623
742db30c4ee6cd Takashi Iwai 2020-01-13 624 return ret;
742db30c4ee6cd Takashi Iwai 2020-01-13 625 }
742db30c4ee6cd Takashi Iwai 2020-01-13 626
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[broonie-misc:arm64-vdso 4/5] arch/arm64/kernel/vdso/vgetcpu.c:33:5: warning: no previous prototype for function '__kernel_getcpu'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git arm64-vdso
head: 6b510319fdb2cc4136a47319f6c5e88195b4bcf0
commit: fdf2f42836c8f11889209ddd41450f6d7d0944e3 [4/5] arm64: vdso: Add getcpu() implementation
config: arm64-randconfig-r005-20200820 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout fdf2f42836c8f11889209ddd41450f6d7d0944e3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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 >>):
>> arch/arm64/kernel/vdso/vgetcpu.c:33:5: warning: no previous prototype for function '__kernel_getcpu' [-Wmissing-prototypes]
int __kernel_getcpu(unsigned int *cpu, unsigned int *node,
^
arch/arm64/kernel/vdso/vgetcpu.c:33:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_getcpu(unsigned int *cpu, unsigned int *node,
^
static
arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: no previous prototype for function '__kernel_clock_gettime' [-Wmissing-prototypes]
int __kernel_clock_gettime(clockid_t clock,
^
arch/arm64/kernel/vdso/vgettimeofday.c:9:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_clock_gettime(clockid_t clock,
^
static
arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: no previous prototype for function '__kernel_gettimeofday' [-Wmissing-prototypes]
int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
^
arch/arm64/kernel/vdso/vgettimeofday.c:15:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
^
static
arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: no previous prototype for function '__kernel_clock_getres' [-Wmissing-prototypes]
int __kernel_clock_getres(clockid_t clock_id,
^
arch/arm64/kernel/vdso/vgettimeofday.c:21:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __kernel_clock_getres(clockid_t clock_id,
^
static
1 warning generated.
3 warnings generated.
arch/arm64/kernel/vdso/vdso.so.dbg: dynamic relocations are not supported
make[2]: *** [arch/arm64/kernel/vdso/Makefile:65: arch/arm64/kernel/vdso/vdso.so.dbg] Error 1
make[2]: Target 'include/generated/vdso-offsets.h' not remade because of errors.
make[1]: *** [arch/arm64/Makefile:182: vdso_prepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
# https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git/commit/?...
git remote add broonie-misc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
git fetch --no-tags broonie-misc arm64-vdso
git checkout fdf2f42836c8f11889209ddd41450f6d7d0944e3
vim +/__kernel_getcpu +33 arch/arm64/kernel/vdso/vgetcpu.c
32
> 33 int __kernel_getcpu(unsigned int *cpu, unsigned int *node,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [RFC PATCH v2 5/9] ext4: add freespace tree optimizations
by kernel test robot
Hi Harshad,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on ext4/dev]
[also build test WARNING on next-20200821]
[cannot apply to tip/perf/core v5.9-rc1]
[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/Harshad-Shirwadkar/ext4-add-free...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: x86_64-randconfig-r036-20200820 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> fs/ext4/mballoc.c:808:6: warning: no previous prototype for function 'ext4_mb_frsp_meta_reinsert' [-Wmissing-prototypes]
void ext4_mb_frsp_meta_reinsert(struct super_block *sb,
^
fs/ext4/mballoc.c:808:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ext4_mb_frsp_meta_reinsert(struct super_block *sb,
^
static
fs/ext4/mballoc.c:890:6: warning: no previous prototype for function 'ext4_mb_frsp_free_tree' [-Wmissing-prototypes]
void ext4_mb_frsp_free_tree(struct super_block *sb, struct ext4_frsp_tree *tree)
^
fs/ext4/mballoc.c:890:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ext4_mb_frsp_free_tree(struct super_block *sb, struct ext4_frsp_tree *tree)
^
static
fs/ext4/mballoc.c:920:24: warning: no previous prototype for function 'ext4_mb_frsp_search_by_off' [-Wmissing-prototypes]
struct ext4_frsp_node *ext4_mb_frsp_search_by_off(struct super_block *sb,
^
fs/ext4/mballoc.c:920:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct ext4_frsp_node *ext4_mb_frsp_search_by_off(struct super_block *sb,
^
static
fs/ext4/mballoc.c:945:5: warning: no previous prototype for function 'ext4_mb_frsp_node_can_merge' [-Wmissing-prototypes]
int ext4_mb_frsp_node_can_merge(struct super_block *sb,
^
fs/ext4/mballoc.c:945:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ext4_mb_frsp_node_can_merge(struct super_block *sb,
^
static
fs/ext4/mballoc.c:962:5: warning: no previous prototype for function 'ext4_mb_frsp_add_region' [-Wmissing-prototypes]
int ext4_mb_frsp_add_region(struct super_block *sb, struct ext4_frsp_tree *tree,
^
fs/ext4/mballoc.c:962:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ext4_mb_frsp_add_region(struct super_block *sb, struct ext4_frsp_tree *tree,
^
static
fs/ext4/mballoc.c:1014:5: warning: no previous prototype for function 'ext4_mb_frsp_free_blocks' [-Wmissing-prototypes]
int ext4_mb_frsp_free_blocks(struct super_block *sb, ext4_group_t group,
^
fs/ext4/mballoc.c:1014:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ext4_mb_frsp_free_blocks(struct super_block *sb, ext4_group_t group,
^
static
fs/ext4/mballoc.c:1034:5: warning: no previous prototype for function 'ext4_mb_frsp_bb_to_tree' [-Wmissing-prototypes]
int ext4_mb_frsp_bb_to_tree(struct ext4_buddy *e4b, ext4_group_t group,
^
fs/ext4/mballoc.c:1034:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ext4_mb_frsp_bb_to_tree(struct ext4_buddy *e4b, ext4_group_t group,
^
static
fs/ext4/mballoc.c:1066:5: warning: no previous prototype for function 'ext4_mb_frsp_load' [-Wmissing-prototypes]
int ext4_mb_frsp_load(struct ext4_buddy *e4b)
^
fs/ext4/mballoc.c:1066:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ext4_mb_frsp_load(struct ext4_buddy *e4b)
^
static
>> fs/ext4/mballoc.c:1366:5: warning: no previous prototype for function 'ext4_mb_frsp_optimize' [-Wmissing-prototypes]
int ext4_mb_frsp_optimize(struct ext4_allocation_context *ac, int *tree_idx)
^
fs/ext4/mballoc.c:1366:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ext4_mb_frsp_optimize(struct ext4_allocation_context *ac, int *tree_idx)
^
static
fs/ext4/mballoc.c:1587:5: warning: no previous prototype for function 'ext4_mb_init_freespace_trees' [-Wmissing-prototypes]
int ext4_mb_init_freespace_trees(struct super_block *sb)
^
fs/ext4/mballoc.c:1587:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ext4_mb_init_freespace_trees(struct super_block *sb)
^
static
fs/ext4/mballoc.c:411:28: warning: unused function 'ext4_flex_offset_to_blkno' [-Wunused-function]
static inline ext4_fsblk_t ext4_flex_offset_to_blkno(struct super_block *sb,
^
11 warnings generated.
# https://github.com/0day-ci/linux/commit/832851db4656a8d433083fc076a53db95...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Harshad-Shirwadkar/ext4-add-free-space-extent-based-allocator/20200821-095647
git checkout 832851db4656a8d433083fc076a53db955d43020
vim +/ext4_mb_frsp_meta_reinsert +808 fs/ext4/mballoc.c
807
> 808 void ext4_mb_frsp_meta_reinsert(struct super_block *sb,
809 struct ext4_frsp_tree *tree)
810 {
811 struct ext4_sb_info *sbi = EXT4_SB(sb);
812 struct ext4_frsp_node *node;
813 struct rb_node *first = rb_first_cached(&tree->frsp_len_root);
814 struct rb_root_cached *meta_root = &EXT4_SB(sb)->s_mb_frsp_meta_tree;
815 int expected_len = 0;
816
817 if (!(tree->frsp_flags & EXT4_MB_FRSP_FLAG_LOADED))
818 return;
819
820 if (first) {
821 node = rb_entry(first, struct ext4_frsp_node, frsp_len_node);
822 expected_len = node->frsp_len;
823 }
824
825 if (tree->frsp_max_free_len == expected_len)
826 return;
827
828 write_lock(&sbi->s_mb_frsp_lock);
829 tree->frsp_max_free_len = expected_len;
830 rb_erase_cached(&tree->frsp_len_node, &sbi->s_mb_frsp_meta_tree);
831 RB_CLEAR_NODE(&tree->frsp_len_node);
832 ext4_mb_rb_insert(meta_root, tree, struct ext4_frsp_tree, frsp_len_node,
833 ext4_mb_frsp_meta_cmp);
834 write_unlock(&sbi->s_mb_frsp_lock);
835 }
836
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH] x86/entry/64: Disallow RDPID in paranoid entry if KVM is enabled
by kernel test robot
Hi Sean,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/auto-latest]
[also build test ERROR on v5.9-rc1 next-20200821]
[cannot apply to tip/x86/asm luto/next]
[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/Sean-Christopherson/x86-entry-64...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git a9bd3a91d6e49ebd2d7d8ace91d4cc339c382a31
config: x86_64-randconfig-s022-20200821 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/entry/entry_64.S: Assembler messages:
>> arch/x86/entry/entry_64.S:851: Error: too many positional arguments
# https://github.com/0day-ci/linux/commit/bebb51882f9c18938e44b6a7b66fdf045...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sean-Christopherson/x86-entry-64-Disallow-RDPID-in-paranoid-entry-if-KVM-is-enabled/20200821-105339
git checkout bebb51882f9c18938e44b6a7b66fdf0452eea142
vim +851 arch/x86/entry/entry_64.S
794
795 /*
796 * Save all registers in pt_regs. Return GSBASE related information
797 * in EBX depending on the availability of the FSGSBASE instructions:
798 *
799 * FSGSBASE R/EBX
800 * N 0 -> SWAPGS on exit
801 * 1 -> no SWAPGS on exit
802 *
803 * Y GSBASE value at entry, must be restored in paranoid_exit
804 */
805 SYM_CODE_START_LOCAL(paranoid_entry)
806 UNWIND_HINT_FUNC
807 cld
808 PUSH_AND_CLEAR_REGS save_ret=1
809 ENCODE_FRAME_POINTER 8
810
811 /*
812 * Always stash CR3 in %r14. This value will be restored,
813 * verbatim, at exit. Needed if paranoid_entry interrupted
814 * another entry that already switched to the user CR3 value
815 * but has not yet returned to userspace.
816 *
817 * This is also why CS (stashed in the "iret frame" by the
818 * hardware at entry) can not be used: this may be a return
819 * to kernel code, but with a user CR3 value.
820 *
821 * Switching CR3 does not depend on kernel GSBASE so it can
822 * be done before switching to the kernel GSBASE. This is
823 * required for FSGSBASE because the kernel GSBASE has to
824 * be retrieved from a kernel internal table.
825 */
826 SAVE_AND_SWITCH_TO_KERNEL_CR3 scratch_reg=%rax save_reg=%r14
827
828 /*
829 * Handling GSBASE depends on the availability of FSGSBASE.
830 *
831 * Without FSGSBASE the kernel enforces that negative GSBASE
832 * values indicate kernel GSBASE. With FSGSBASE no assumptions
833 * can be made about the GSBASE value when entering from user
834 * space.
835 */
836 ALTERNATIVE "jmp .Lparanoid_entry_checkgs", "", X86_FEATURE_FSGSBASE
837
838 /*
839 * Read the current GSBASE and store it in %rbx unconditionally,
840 * retrieve and set the current CPUs kernel GSBASE. The stored value
841 * has to be restored in paranoid_exit unconditionally.
842 *
843 * The MSR write ensures that no subsequent load is based on a
844 * mispredicted GSBASE. No extra FENCE required.
845 *
846 * Disallow RDPID if KVM is enabled as it may consume a guest's TSC_AUX
847 * if an NMI arrives in KVM's run loop. KVM loads guest's TSC_AUX on
848 * VM-Enter and may not restore the host's value until the CPU returns
849 * to userspace, i.e. KVM depends on the kernel not using TSC_AUX.
850 */
> 851 SAVE_AND_SET_GSBASE scratch_reg=%rax save_reg=%rbx no_rdpid=IS_ENABLED(CONFIG_KVM)
852 ret
853
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month