From: kernel test robot <lkp@intel.com>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Cc: kbuild-all@lists.01.org, David Sterba <dsterba@suse.com>
Subject: Re: [PATCH v2 2/4] btrfs: assign checksum shash slots on init
Date: Wed, 3 Aug 2022 05:10:37 +0800 [thread overview]
Message-ID: <202208030448.34fSi3hk-lkp@intel.com> (raw)
In-Reply-To: <c637b01a1742d0841b71d67a91aab50ac22539f7.1659443199.git.dsterba@suse.com>
Hi David,
I love your patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on next-20220728]
[cannot apply to linus/master v5.19]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Sterba/Selectable-checksum-implementation/20220802-203426
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220803/202208030448.34fSi3hk-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/335830d3f7aa692840402c4813c125f96f510812
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review David-Sterba/Selectable-checksum-implementation/20220802-203426
git checkout 335830d3f7aa692840402c4813c125f96f510812
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/btrfs/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
fs/btrfs/disk-io.c: In function 'btrfs_init_csum_hash':
fs/btrfs/disk-io.c:2438:13: error: too few arguments to function 'strstr'
2438 | if (strstr(crypto_shash_driver_name(csum_shash)), "generic") != NULL) {
| ^~~~~~
In file included from arch/x86/include/asm/string.h:3,
from include/linux/string.h:20,
from arch/x86/include/asm/page_32.h:22,
from arch/x86/include/asm/page.h:14,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:60,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:55,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/btrfs/disk-io.c:6:
arch/x86/include/asm/string_32.h:185:14: note: declared here
185 | extern char *strstr(const char *cs, const char *ct);
| ^~~~~~
>> fs/btrfs/disk-io.c:2438:57: warning: left-hand operand of comma expression has no effect [-Wunused-value]
2438 | if (strstr(crypto_shash_driver_name(csum_shash)), "generic") != NULL) {
| ^
fs/btrfs/disk-io.c:2438:70: error: expected expression before '!=' token
2438 | if (strstr(crypto_shash_driver_name(csum_shash)), "generic") != NULL) {
| ^~
>> fs/btrfs/disk-io.c:2438:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
2438 | if (strstr(crypto_shash_driver_name(csum_shash)), "generic") != NULL) {
| ^~
fs/btrfs/disk-io.c:2438:77: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
2438 | if (strstr(crypto_shash_driver_name(csum_shash)), "generic") != NULL) {
| ^
fs/btrfs/disk-io.c:2438:77: error: expected statement before ')' token
fs/btrfs/disk-io.c:2441:11: error: 'else' without a previous 'if'
2441 | } else {
| ^~~~
vim +2438 fs/btrfs/disk-io.c
2419
2420 static int btrfs_init_csum_hash(struct btrfs_fs_info *fs_info, u16 csum_type)
2421 {
2422 struct crypto_shash *csum_shash;
2423 const char *csum_driver = btrfs_super_csum_driver(csum_type);
2424
2425 csum_shash = crypto_alloc_shash(csum_driver, 0, 0);
2426
2427 if (IS_ERR(csum_shash)) {
2428 btrfs_err(fs_info, "error allocating %s hash for checksum",
2429 csum_driver);
2430 return PTR_ERR(csum_shash);
2431 }
2432
2433 /*
2434 * Find the fastest implementation available, but keep the slots
2435 * matching the type.
2436 */
2437 fs_info->csum_shash[CSUM_DEFAULT] = csum_shash;
> 2438 if (strstr(crypto_shash_driver_name(csum_shash)), "generic") != NULL) {
2439 fs_info->csum_shash[CSUM_GENERIC] = csum_shash;
2440 clear_bit(BTRFS_FS_CSUM_IMPL_FAST, &fs_info->flags);
2441 } else {
2442 fs_info->csum_shash[CSUM_ACCEL] = csum_shash;
2443 set_bit(BTRFS_FS_CSUM_IMPL_FAST, &fs_info->flags);
2444 }
2445
2446 btrfs_info(fs_info, "using %s (%s) checksum algorithm",
2447 btrfs_super_csum_name(csum_type),
2448 crypto_shash_driver_name(csum_shash));
2449 return 0;
2450 }
2451
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-08-02 21:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-02 12:28 [PATCH v2 0/4] Selectable checksum implementation David Sterba
2022-08-02 12:28 ` [PATCH v2 1/4] btrfs: prepare more slots for checksum shash David Sterba
2022-08-02 13:00 ` Johannes Thumshirn
2022-08-03 13:34 ` David Sterba
2022-08-04 10:55 ` Anand Jain
2022-08-02 12:28 ` [PATCH v2 2/4] btrfs: assign checksum shash slots on init David Sterba
2022-08-02 20:30 ` kernel test robot
2022-08-02 21:10 ` kernel test robot [this message]
2022-08-02 12:28 ` [PATCH v2 3/4] btrfs: add checksum implementation selection after mount David Sterba
2022-08-02 13:00 ` Johannes Thumshirn
2022-08-02 13:21 ` David Sterba
2022-08-03 0:06 ` Anand Jain
2022-08-03 14:00 ` David Sterba
2022-08-04 11:12 ` Anand Jain
2022-08-03 0:22 ` Anand Jain
2022-08-03 13:24 ` David Sterba
2022-08-02 12:28 ` [PATCH v2 4/4] btrfs: sysfs: print all loaded csums implementations David Sterba
2022-08-02 13:16 ` Johannes Thumshirn
-- strict thread matches above, loose matches on Subject: below --
2022-07-29 17:42 [PATCH v2 0/4] Selectable checksum implementation David Sterba
2022-07-29 17:42 ` [PATCH v2 2/4] btrfs: assign checksum shash slots on init David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202208030448.34fSi3hk-lkp@intel.com \
--to=lkp@intel.com \
--cc=dsterba@suse.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).