提交 15dfeb6d 编写于 作者: C Colin Ian King 提交者: Greg Kroah-Hartman

usb: host: isp1362-hcd: remove a couple of redundant assignments

Variable index is being initialized and the value is never read,
it is being updated a few statements later, so remove the redundant
initialization.  Variable total is being updated but the value is
never read, so this is also redundant and can be removed. Cleans
up two clang warnings:

drivers/usb/host/isp1362-hcd.c:715:6: warning: Value stored to
'index' during its initialization is never read
drivers/usb/host/isp1362-hcd.c:2254:2: warning: Value stored to
'total' is never read
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8444efc4
...@@ -713,7 +713,7 @@ static inline void enable_istl_transfers(struct isp1362_hcd *isp1362_hcd, int fl ...@@ -713,7 +713,7 @@ static inline void enable_istl_transfers(struct isp1362_hcd *isp1362_hcd, int fl
static int submit_req(struct isp1362_hcd *isp1362_hcd, struct urb *urb, static int submit_req(struct isp1362_hcd *isp1362_hcd, struct urb *urb,
struct isp1362_ep *ep, struct isp1362_ep_queue *epq) struct isp1362_ep *ep, struct isp1362_ep_queue *epq)
{ {
int index = epq->free_ptd; int index;
prepare_ptd(isp1362_hcd, urb, ep, epq, 0); prepare_ptd(isp1362_hcd, urb, ep, epq, 0);
index = claim_ptd_buffers(epq, ep, ep->length); index = claim_ptd_buffers(epq, ep, ep->length);
...@@ -2253,7 +2253,6 @@ static int isp1362_mem_config(struct usb_hcd *hcd) ...@@ -2253,7 +2253,6 @@ static int isp1362_mem_config(struct usb_hcd *hcd)
return -ENOMEM; return -ENOMEM;
} }
total = istl_size + intl_size + atl_size;
spin_lock_irqsave(&isp1362_hcd->lock, flags); spin_lock_irqsave(&isp1362_hcd->lock, flags);
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册