All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Liu <b-liu@ti.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@01.org, kbuild-all@01.org, linux-usb@vger.kernel.org
Subject: [09/11] usb: musb: break the huge isr musb_stage0_irq() into small functions
Date: Wed, 18 Apr 2018 08:33:52 -0500	[thread overview]
Message-ID: <20180418133352.GD14921@uda0271908> (raw)

Hi Dan,

I appreciate you scaning  the patches and reporting the issues.

On Wed, Apr 18, 2018 at 10:25:34AM +0300, Dan Carpenter wrote:
> Hi Bin,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on balbi-usb/next]
> [also build test WARNING on v4.17-rc1 next-20180417]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Bin-Liu/usb-musb-cleanup/20180417-133633
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
> 
> smatch warnings:
> drivers/usb/musb/musb_core.c:797 musb_handle_intr_connect() error: we previously assumed 'musb->hcd' could be null (see line 783)

It appears the condition check was introduced back in 2013 in an attempt
to separate host-only and gadget-only configurations for musb [1], but it
seems the work is not complete, because the musb->hcd allocation is
unconditional. So in the current code, musb->hcd won't be NULL. 

But I am now hesitated to remove this 'if(musb->hcd)' check to solve
this smatch warning, because I am still debating on either continue the
work to separate the two configurations or clean up the uncompleted code
left by the attempt to not separate them.

So I want to leave the patch as is for now, is it reasonable?

[1] commit 74c2e93600581("usb: musb: factor out hcd initalization")

Regards,
-Bin.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-04-18 13:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18 13:33 Bin Liu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-04-18 14:22 [09/11] usb: musb: break the huge isr musb_stage0_irq() into small functions Bin Liu
2018-04-18 14:14 Dan Carpenter
2018-04-18  7:25 Dan Carpenter
2018-04-16 19:15 Bin Liu

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=20180418133352.GD14921@uda0271908 \
    --to=b-liu@ti.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kbuild-all@01.org \
    --cc=kbuild@01.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.