linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Palmer Dabbelt <palmerdabbelt@google.com>
Subject: [kbuild] fs/btrfs/sysfs.c:1034:4: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.
Date: Fri, 26 Mar 2021 13:09:55 +0300	[thread overview]
Message-ID: <20210326100955.GZ1667@kadam> (raw)

Hi Kefeng,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  master
head:   002322402dafd846c424ffa9240a937f49b48c42
commit: ed1ed4c0da5447c5e322481ce2ef9f03336c6ffb riscv: mmiowb: Fix implicit declaration of function 'smp_processor_id'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

vim +1034 fs/btrfs/sysfs.c

79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1001  static void init_feature_attrs(void)
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1002  {
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1003  	struct btrfs_feature_attr *fa;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1004  	int set, i;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1005  
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1006  	BUILD_BUG_ON(ARRAY_SIZE(btrfs_unknown_feature_names) !=
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1007  		     ARRAY_SIZE(btrfs_feature_attrs));
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1008  	BUILD_BUG_ON(ARRAY_SIZE(btrfs_unknown_feature_names[0]) !=
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1009  		     ARRAY_SIZE(btrfs_feature_attrs[0]));
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1010  
3b02a68a636400 Jeff Mahoney    2013-11-01  1011  	memset(btrfs_feature_attrs, 0, sizeof(btrfs_feature_attrs));
3b02a68a636400 Jeff Mahoney    2013-11-01  1012  	memset(btrfs_unknown_feature_names, 0,
3b02a68a636400 Jeff Mahoney    2013-11-01  1013  	       sizeof(btrfs_unknown_feature_names));
3b02a68a636400 Jeff Mahoney    2013-11-01  1014  
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1015  	for (i = 0; btrfs_supported_feature_attrs[i]; i++) {
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1016  		struct btrfs_feature_attr *sfa;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1017  		struct attribute *a = btrfs_supported_feature_attrs[i];
3b02a68a636400 Jeff Mahoney    2013-11-01  1018  		int bit;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1019  		sfa = attr_to_btrfs_feature_attr(a);
3b02a68a636400 Jeff Mahoney    2013-11-01  1020  		bit = ilog2(sfa->feature_bit);
3b02a68a636400 Jeff Mahoney    2013-11-01  1021  		fa = &btrfs_feature_attrs[sfa->feature_set][bit];
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1022  
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1023  		fa->kobj_attr.attr.name = sfa->kobj_attr.attr.name;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1024  	}
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1025  
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1026  	for (set = 0; set < FEAT_MAX; set++) {
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1027  		for (i = 0; i < ARRAY_SIZE(btrfs_feature_attrs[set]); i++) {
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1028  			char *name = btrfs_unknown_feature_names[set][i];
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1029  			fa = &btrfs_feature_attrs[set][i];
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1030  
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1031  			if (fa->kobj_attr.attr.name)
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1032  				continue;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1033  
6c52157fa9378e Tomohiro Misono 2018-05-16 @1034  			snprintf(name, BTRFS_FEATURE_NAME_MAX, "%s:%u",
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1035  				 btrfs_feature_set_names[set], i);

It looks like these two arguments are reversed?

79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1036  
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1037  			fa->kobj_attr.attr.name = name;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1038  			fa->kobj_attr.attr.mode = S_IRUGO;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1039  			fa->feature_set = set;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1040  			fa->feature_bit = 1ULL << i;
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1041  		}
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1042  	}
79da4fa4d9dcf8 Jeff Mahoney    2013-11-01  1043  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org 
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org

                 reply	other threads:[~2021-03-26 10:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210326100955.GZ1667@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=palmerdabbelt@google.com \
    --cc=wangkefeng.wang@huawei.com \
    /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).