linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Leitner <dev@g0hl1n.net>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Richard Leitner <richard.leitner@skidata.com>,
	Greg KH <gregkh@linuxfoundation.org>
Cc: Richard Leitner <dev@g0hl1n.net>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, robh+dt@kernel.org,
	mark.rutland@arm.com, stern@rowland.harvard.edu
Subject: Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver
Date: Wed, 8 Feb 2017 21:03:40 +0100	[thread overview]
Message-ID: <3902c4a9-cd1d-23fe-df75-127b5cab61ad@g0hl1n.net> (raw)
In-Reply-To: <1486581644.2133.409.camel@linux.intel.com>

On 02/08/2017 08:20 PM, Andy Shevchenko wrote:
> On Wed, 2017-02-08 at 19:45 +0100, Richard Leitner wrote:
>> On 02/08/2017 05:40 PM, Andy Shevchenko wrote:
>>> On Wed, 2017-02-08 at 16:17 +0100, Richard Leitner wrote:
>>>> On 02/08/2017 02:59 PM, Greg KH wrote:
>>>>> On Wed, Feb 08, 2017 at 03:21:08PM +0200, Andy Shevchenko wrote:
>>>>>> On Wed, 2017-02-08 at 09:52 +0100, Richard Leitner wrote:
>>
>> So the preferred solution is the BIT() stuff?
>
> I think BIT() macro in place. Otherwise you'll need a temporary unsigned
> long variable. If you already have one, then __*_bit() would work.

As I have no temporary unsigned long variable in that scope I'll go for 
the BIT() approach. Should I keep my inline {clr,set}_bit_in_byte() 
functions an use BIT() in there, or delete them and use BIT() directly 
in usb251xb_get_ofdata() ?

>>>>>>> +static int usb251xb_get_ofdata(struct usb251xb *hub,
>>>>>>> +			       struct usb251xb_data *data)
>>>>>>> +{
>>>>>>> +	return 0;
>>>>>>> +}
>>>>>>> +#endif /* CONFIG_OF */
>>>>>>
>>>>>> I don't think it's a good idea to have those ugly #ifdef.
>>>>>
>>>>> How can it be removed?
>>>
>>> __maybe_unused for function, device_property_*() instead of
>>> of_property_*() calls.
>>>
>>> Something like that. But if you are insisting this is *only* OF
>>> available hardware or we don't care, I'll not object.
>>
>> In usb3503.c and usb4604.c we have that #ifdef CONFIG_OF too. IMHO those
>> drivers should use the same solution here. But you guys are the ones
>> with tons of kernel coding experience, so just say how it should be
>> done :-)
>
> I'll agree with whatever Greg wants here.

Ok. So I'll wait for Gregs response before posting a v5.

  reply	other threads:[~2017-02-08 20:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08  8:52 [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver Richard Leitner
2017-02-08  8:58 ` Richard Leitner
2017-02-08 13:04   ` Greg KH
2017-02-08 13:21 ` Andy Shevchenko
2017-02-08 13:59   ` Greg KH
2017-02-08 15:17     ` Richard Leitner
2017-02-08 16:40       ` Andy Shevchenko
2017-02-08 18:45         ` Richard Leitner
2017-02-08 19:20           ` Andy Shevchenko
2017-02-08 20:03             ` Richard Leitner [this message]
2017-02-08 20:16               ` Andy Shevchenko
2017-02-09  8:44                 ` Richard Leitner

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=3902c4a9-cd1d-23fe-df75-127b5cab61ad@g0hl1n.net \
    --to=dev@g0hl1n.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=richard.leitner@skidata.com \
    --cc=robh+dt@kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).