Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1577034

Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver

From Richard Leitner <dev@g0hl1n.net>
Newsgroups linux.kernel
Subject Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver
Date 2017-02-08 21:40 +0100
Message-ID <t8GSC-4S1-17@gated-at.bofh.it> (permalink)
References (2 earlier) <t8B6x-1k4-7@gated-at.bofh.it> <t8CvD-240-1@gated-at.bofh.it> <t8DBo-2Hv-27@gated-at.bofh.it> <t8GfU-4p7-27@gated-at.bofh.it> <t8GfU-4p7-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller Driver Richard Leitner <richard.leitner@skidata.com> - 2017-02-08 10:00 +0100
  Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Richard Leitner <richard.leitner@skidata.com> - 2017-02-08 10:00 +0100
    Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Greg KH <gregkh@linuxfoundation.org> - 2017-02-08 14:20 +0100
  Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-02-08 14:30 +0100
    Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Greg KH <gregkh@linuxfoundation.org> - 2017-02-08 15:10 +0100
      Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Richard Leitner <richard.leitner@skidata.com> - 2017-02-08 16:40 +0100
        Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-02-08 17:50 +0100
          Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-02-08 20:40 +0100
            Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-02-08 21:20 +0100
              Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Richard Leitner <richard.leitner@skidata.com> - 2017-02-09 10:00 +0100
            Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Richard Leitner <dev@g0hl1n.net> - 2017-02-08 21:40 +0100
          Re: [PATCH v4] usb: misc: add USB251xB/xBi Hi-Speed Hub Controller  Driver Richard Leitner <dev@g0hl1n.net> - 2017-02-08 22:00 +0100

csiph-web