All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: matthias.bgg@kernel.org, arend.vanspriel@broadcom.com,
	kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org
Cc: kbuild-all@lists.01.org, franky.lin@broadcom.com,
	hante.meuleman@broadcom.com, chi-hsien.lin@cypress.com,
	wright.feng@cypress.com, mbrugger@suse.com,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] brcmfmac: Transform compatible string for FW loading
Date: Fri, 26 Jun 2020 04:43:39 +0800	[thread overview]
Message-ID: <202006260414.pZj87gPB%lkp@intel.com> (raw)
In-Reply-To: <20200625160725.31581-1-matthias.bgg@kernel.org>

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

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master sparc-next/master v5.8-rc2 next-20200625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/matthias-bgg-kernel-org/brcmfmac-Transform-compatible-string-for-FW-loading/20200626-001324
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c: In function 'brcmf_of_probe':
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c:35:3: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
      35 |   strncpy(board_type, tmp, strlen(tmp));
         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/strncpy +35 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c

    14	
    15	void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
    16			    struct brcmf_mp_device *settings)
    17	{
    18		struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio;
    19		struct device_node *root, *np = dev->of_node;
    20		int irq;
    21		u32 irqf;
    22		u32 val;
    23	
    24		/* Set board-type to the first string of the machine compatible prop */
    25		root = of_find_node_by_path("/");
    26		if (root) {
    27			int i;
    28			char *board_type;
    29			const char *tmp;
    30	
    31			of_property_read_string_index(root, "compatible", 0, &tmp);
    32	
    33			/* get rid of '/' in the compatible string to be able to find the FW */
    34			board_type = devm_kzalloc(dev, strlen(tmp), GFP_KERNEL);
  > 35			strncpy(board_type, tmp, strlen(tmp));

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

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] brcmfmac: Transform compatible string for FW loading
Date: Fri, 26 Jun 2020 04:43:39 +0800	[thread overview]
Message-ID: <202006260414.pZj87gPB%lkp@intel.com> (raw)
In-Reply-To: <20200625160725.31581-1-matthias.bgg@kernel.org>

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

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master sparc-next/master v5.8-rc2 next-20200625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/matthias-bgg-kernel-org/brcmfmac-Transform-compatible-string-for-FW-loading/20200626-001324
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c: In function 'brcmf_of_probe':
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c:35:3: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
      35 |   strncpy(board_type, tmp, strlen(tmp));
         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/strncpy +35 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c

    14	
    15	void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
    16			    struct brcmf_mp_device *settings)
    17	{
    18		struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio;
    19		struct device_node *root, *np = dev->of_node;
    20		int irq;
    21		u32 irqf;
    22		u32 val;
    23	
    24		/* Set board-type to the first string of the machine compatible prop */
    25		root = of_find_node_by_path("/");
    26		if (root) {
    27			int i;
    28			char *board_type;
    29			const char *tmp;
    30	
    31			of_property_read_string_index(root, "compatible", 0, &tmp);
    32	
    33			/* get rid of '/' in the compatible string to be able to find the FW */
    34			board_type = devm_kzalloc(dev, strlen(tmp), GFP_KERNEL);
  > 35			strncpy(board_type, tmp, strlen(tmp));

---
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: 65125 bytes --]

  parent reply	other threads:[~2020-06-25 20:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 16:07 [PATCH] brcmfmac: Transform compatible string for FW loading matthias.bgg
2020-06-25 17:09 ` Hans de Goede
2020-06-25 20:43 ` kernel test robot [this message]
2020-06-25 20:43   ` kernel test robot
2020-06-25 21:00 ` kernel test robot
2020-06-25 21:00   ` 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=202006260414.pZj87gPB%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=chi-hsien.lin@cypress.com \
    --cc=davem@davemloft.net \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=matthias.bgg@kernel.org \
    --cc=mbrugger@suse.com \
    --cc=wright.feng@cypress.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 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.