All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: Felipe Balbi <balbi@ti.com>
Cc: kernel-janitors@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state() e
Date: Wed, 12 Sep 2012 08:26:22 +0000	[thread overview]
Message-ID: <20120912082622.GB27847@localhost> (raw)

Hi Felipe,

FYI, there are new smatch warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git merge-result-for-greg
head:   23953bde3e4d6aa8780dc054f6ad9882ac63f4f4
commit: e918fa161f510136fce45a524e934fe20e62c8b1 [66/99] Merge tag 'gadget-for-v3.7' into merge-result-for-greg

drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state() error: doing dma on the stack ((null))
drivers/usb/core/hub.c:4733 store_port_power_control() info: why not propagate 'ret' from set_port_feature() instead of -5?
drivers/usb/core/hub.c:4744 store_port_power_control() info: why not propagate 'ret' from clear_port_feature() instead of -5?

vim +2654 drivers/usb/core/hub.c
  2644		return ret;
  2645	}
  2646	
  2647	static int usb_get_hub_port_power_state(struct usb_device *hdev, int port1)
  2648	{
  2649		struct usb_hub *hub = hdev_to_hub(hdev);
  2650		struct usb_port_status data;
  2651		u16 portstatus;
  2652		int ret;
  2653	
> 2654		ret = get_port_status(hub->hdev, port1, &data);
  2655		if (ret < 4) {
  2656			dev_err(hub->intfdev,
  2657				"%s failed (err = %d)\n", __func__, ret);
  2658			if (ret >= 0)
  2659				ret = -EIO;
  2660			return ret;
  2661		} else
  2662			portstatus = le16_to_cpu(data.wPortStatus);
  2663		return port_is_power_on(hub, portstatus);
  2664	}

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com>                     Intel Corporation

WARNING: multiple messages have this Message-ID (diff)
From: Fengguang Wu <fengguang.wu@intel.com>
To: Felipe Balbi <balbi@ti.com>
Cc: kernel-janitors@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state() error: doing dma on the stack ((null))
Date: Wed, 12 Sep 2012 16:26:22 +0800	[thread overview]
Message-ID: <20120912082622.GB27847@localhost> (raw)

Hi Felipe,

FYI, there are new smatch warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git merge-result-for-greg
head:   23953bde3e4d6aa8780dc054f6ad9882ac63f4f4
commit: e918fa161f510136fce45a524e934fe20e62c8b1 [66/99] Merge tag 'gadget-for-v3.7' into merge-result-for-greg

drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state() error: doing dma on the stack ((null))
drivers/usb/core/hub.c:4733 store_port_power_control() info: why not propagate 'ret' from set_port_feature() instead of -5?
drivers/usb/core/hub.c:4744 store_port_power_control() info: why not propagate 'ret' from clear_port_feature() instead of -5?

vim +2654 drivers/usb/core/hub.c
  2644		return ret;
  2645	}
  2646	
  2647	static int usb_get_hub_port_power_state(struct usb_device *hdev, int port1)
  2648	{
  2649		struct usb_hub *hub = hdev_to_hub(hdev);
  2650		struct usb_port_status data;
  2651		u16 portstatus;
  2652		int ret;
  2653	
> 2654		ret = get_port_status(hub->hdev, port1, &data);
  2655		if (ret < 4) {
  2656			dev_err(hub->intfdev,
  2657				"%s failed (err = %d)\n", __func__, ret);
  2658			if (ret >= 0)
  2659				ret = -EIO;
  2660			return ret;
  2661		} else
  2662			portstatus = le16_to_cpu(data.wPortStatus);
  2663		return port_is_power_on(hub, portstatus);
  2664	}

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com>                     Intel Corporation

             reply	other threads:[~2012-09-12  8:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12  8:26 Fengguang Wu [this message]
2012-09-12  8:26 ` [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state() error: doing dma on the stack ((null)) Fengguang Wu
2012-09-12  8:50 ` [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state Dan Carpenter
2012-09-12  8:50   ` [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state() error: doing dma on the stack ((null)) Dan Carpenter
2012-09-12 12:02   ` [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state Felipe Balbi
2012-09-12 12:02     ` [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state() error: doing dma on the stack ((null)) Felipe Balbi
     [not found]     ` <20120912120211.GC5732-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-09-12 12:09       ` [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state Fengguang Wu
2012-09-12 12:09         ` [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state() error: doing dma on the stack ((null)) Fengguang Wu
2012-09-12 13:11 ` [balbi-usb:merge-result-for-greg 66/99] drivers/usb/core/hub.c:2654 usb_get_hub_port_power_state Alan Stern
2012-09-12 14:41 ` Lan Tianyu

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=20120912082622.GB27847@localhost \
    --to=fengguang.wu@intel.com \
    --cc=balbi@ti.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@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 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.