All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [android-goldfish:android-3.18 109/182] net/batman-adv/debugfs.c:507:63: sparse: sparse: incorrect type in argument 4 (different modifiers)
Date: Tue, 23 Mar 2021 15:19:50 +0800	[thread overview]
Message-ID: <202103231547.tKvC96j9-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2713 bytes --]

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   d03166b0fbc7b4e2f666b01f48aa26b12a5462d8
commit: 9330a80441f617103f18385993619f05fa948b71 [109/182] batman-adv: Fix debugfs path for renamed hardif
config: x86_64-randconfig-s021-20210322 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-277-gc089cd2d-dirty
        git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
        git fetch --no-tags android-goldfish android-3.18
        git checkout 9330a80441f617103f18385993619f05fa948b71
        # 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@intel.com>


sparse warnings: (new ones prefixed by >>)
>> net/batman-adv/debugfs.c:507:63: sparse: sparse: incorrect type in argument 4 (different modifiers) @@     expected char *new_name @@     got char const *name @@
   net/batman-adv/debugfs.c:507:63: sparse:     expected char *new_name
   net/batman-adv/debugfs.c:507:63: sparse:     got char const *name
   net/batman-adv/debugfs.c: In function 'batadv_debugfs_rename_hardif':
   net/batman-adv/debugfs.c:507:56: warning: passing argument 4 of 'debugfs_rename' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     d = debugfs_rename(dir->d_parent, dir, dir->d_parent, name);
                                                           ^
   In file included from net/batman-adv/debugfs.c:21:0:
   include/linux/debugfs.h:145:30: note: expected 'char *' but argument is of type 'const char *'
    static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,
                                 ^

vim +507 net/batman-adv/debugfs.c

   492	
   493	/**
   494	 * batadv_debugfs_rename_hardif() - Fix debugfs path for renamed hardif
   495	 * @hard_iface: hard interface which was renamed
   496	 */
   497	void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface)
   498	{
   499		const char *name = hard_iface->net_dev->name;
   500		struct dentry *dir;
   501		struct dentry *d;
   502	
   503		dir = hard_iface->debug_dir;
   504		if (!dir)
   505			return;
   506	
 > 507		d = debugfs_rename(dir->d_parent, dir, dir->d_parent, name);
   508		if (!d)
   509			pr_err("Can't rename debugfs dir to %s\n", name);
   510	}
   511	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23714 bytes --]

             reply	other threads:[~2021-03-23  7:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23  7:19 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-20  7:09 [android-goldfish:android-3.18 109/182] net/batman-adv/debugfs.c:507:63: sparse: sparse: incorrect type in argument 4 (different modifiers) kernel test robot

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=202103231547.tKvC96j9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.