From: Fengguang Wu <fengguang.wu@intel.com>
To: Vipul Pandya <vipul@chelsio.com>
Cc: kernel-janitors@vger.kernel.org, netdev@vger.kernel.org,
Jay Hernandez <jay@chelsio.com>
Subject: [wireless-next:for-davem 115/299] drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:419 t4_memory_rw() warn: 'data' puts 2048 bytes on stack
Date: Sat, 29 Sep 2012 13:50:30 +0800 [thread overview]
Message-ID: <20120929055030.GB24004@localhost> (raw)
Hi Vipul,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem
head: c487606f835a93a725bac1aefd536be98f22474d
commit: 5afc8b84eb7b29e4646d6e8ca7e6d7196031d6f7 [115/299] cxgb4: Add functions to read memory via PCIE memory window
+ drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:419 t4_memory_rw() warn: 'data' puts 2048 bytes on stack
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:499 get_vpd_params() warn: 'vpd' puts 512 bytes on stack
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:518 get_vpd_params() info: why not propagate 'i' from pci_vpd_find_tag() instead of -22?
vim +419 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
5afc8b84 (Vipul Pandya 2012-09-26 408) /*
5afc8b84 (Vipul Pandya 2012-09-26 409) * The underlaying EDC/MC read routines read MEMWIN0_APERTURE bytes
5afc8b84 (Vipul Pandya 2012-09-26 410) * at a time so we need to round down the start and round up the end.
5afc8b84 (Vipul Pandya 2012-09-26 411) * We'll start copying out of the first line at (addr - start) a word
5afc8b84 (Vipul Pandya 2012-09-26 412) * at a time.
5afc8b84 (Vipul Pandya 2012-09-26 413) */
5afc8b84 (Vipul Pandya 2012-09-26 414) start = addr & ~(MEMWIN0_APERTURE-1);
5afc8b84 (Vipul Pandya 2012-09-26 415) end = (addr + len + MEMWIN0_APERTURE-1) & ~(MEMWIN0_APERTURE-1);
5afc8b84 (Vipul Pandya 2012-09-26 416) offset = (addr - start)/sizeof(__be32);
5afc8b84 (Vipul Pandya 2012-09-26 417)
5afc8b84 (Vipul Pandya 2012-09-26 418) for (pos = start; pos < end; pos += MEMWIN0_APERTURE, offset = 0) {
5afc8b84 (Vipul Pandya 2012-09-26 @419) __be32 data[MEMWIN0_APERTURE/sizeof(__be32)];
5afc8b84 (Vipul Pandya 2012-09-26 420)
5afc8b84 (Vipul Pandya 2012-09-26 421) /*
5afc8b84 (Vipul Pandya 2012-09-26 422) * If we're writing, copy the data from the caller's memory
5afc8b84 (Vipul Pandya 2012-09-26 423) * buffer
5afc8b84 (Vipul Pandya 2012-09-26 424) */
5afc8b84 (Vipul Pandya 2012-09-26 425) if (!dir) {
5afc8b84 (Vipul Pandya 2012-09-26 426) /*
5afc8b84 (Vipul Pandya 2012-09-26 427) * If we're doing a partial write, then we need to do
---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu, Yuanhan Liu Intel Corporation
reply other threads:[~2012-09-29 5:51 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=20120929055030.GB24004@localhost \
--to=fengguang.wu@intel.com \
--cc=jay@chelsio.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vipul@chelsio.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