2014-07-18 04:52:25

by Nicholas Krause

[permalink] [raw]
Subject: hcd.c Fix me statements

I am assuming this is a stupid question but since I am new I will ask it anyway.
Can the usb_bus structure be Null? If can I will send it a patch removing the
fix mes on lines 854 and 878 of hcd.c .
Cheers Nick


2014-07-18 14:45:29

by Alan Stern

[permalink] [raw]
Subject: Re: hcd.c Fix me statements

On Fri, 18 Jul 2014, Nick Krause wrote:

> I am assuming this is a stupid question but since I am new I will ask it anyway.
> Can the usb_bus structure be Null? If can I will send it a patch removing the
> fix mes on lines 854 and 878 of hcd.c .

Line numbers in a source file usually aren't very useful. They're
different in every version of the kernel. Instead just mention which
functions you're talking about. It looks like
authorized_default_show() and authorized_default_store().

Yes, it's true that usb_bus (which is a pointer, not a structure) can
never be NULL.

Alan Stern

2014-07-18 17:19:05

by Nicholas Krause

[permalink] [raw]
Subject: Re: hcd.c Fix me statements

On Fri, Jul 18, 2014 at 10:45 AM, Alan Stern <[email protected]> wrote:
> On Fri, 18 Jul 2014, Nick Krause wrote:
>
>> I am assuming this is a stupid question but since I am new I will ask it anyway.
>> Can the usb_bus structure be Null? If can I will send it a patch removing the
>> fix mes on lines 854 and 878 of hcd.c .
>
> Line numbers in a source file usually aren't very useful. They're
> different in every version of the kernel. Instead just mention which
> functions you're talking about. It looks like
> authorized_default_show() and authorized_default_store().
>
> Yes, it's true that usb_bus (which is a pointer, not a structure) can
> never be NULL.
>
> Alan Stern
>

If that is the case I will send a patch, removing the lines as it
seems we don't need to check for NULL then based
on your information.
Cheers Nick