2014-07-18 17:34:47

by Nicholas Krause

[permalink] [raw]
Subject: [PATCH] usb-core: Remove Fix mes in file hcd.c

I am removing two fix mes in this file as after dicussing then it seems
there is no reason to check against Null for usb_device as it can never
be NULL and this is check is therefore not needed.

Signed-off-by: Nicholas Krause <[email protected]>
---
drivers/usb/core/hcd.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bec31e2..487abcf 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
struct usb_bus *usb_bus = rh_usb_dev->bus;
struct usb_hcd *usb_hcd;

- if (usb_bus == NULL) /* FIXME: not sure if this case is possible */
- return -ENODEV;
usb_hcd = bus_to_hcd(usb_bus);
return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
}
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
struct usb_bus *usb_bus = rh_usb_dev->bus;
struct usb_hcd *usb_hcd;

- if (usb_bus == NULL) /* FIXME: not sure if this case is possible */
- return -ENODEV;
usb_hcd = bus_to_hcd(usb_bus);
result = sscanf(buf, "%u\n", &val);
if (result == 1) {
--
1.9.1


2014-07-18 19:09:51

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH] usb-core: Remove Fix mes in file hcd.c

On Fri, 18 Jul 2014, Nicholas Krause wrote:

> I am removing two fix mes in this file as after dicussing then it seems
> there is no reason to check against Null for usb_device as it can never
> be NULL and this is check is therefore not needed.
>
> Signed-off-by: Nicholas Krause <[email protected]>
> ---
> drivers/usb/core/hcd.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> index bec31e2..487abcf 100644
> --- a/drivers/usb/core/hcd.c
> +++ b/drivers/usb/core/hcd.c
> @@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
> struct usb_bus *usb_bus = rh_usb_dev->bus;
> struct usb_hcd *usb_hcd;
>
> - if (usb_bus == NULL) /* FIXME: not sure if this case is possible */
> - return -ENODEV;
> usb_hcd = bus_to_hcd(usb_bus);
> return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
> }
> @@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
> struct usb_bus *usb_bus = rh_usb_dev->bus;
> struct usb_hcd *usb_hcd;
>
> - if (usb_bus == NULL) /* FIXME: not sure if this case is possible */
> - return -ENODEV;
> usb_hcd = bus_to_hcd(usb_bus);
> result = sscanf(buf, "%u\n", &val);
> if (result == 1) {

Acked-by: Alan Stern <[email protected]>

2014-07-18 19:55:05

by Nicholas Krause

[permalink] [raw]
Subject: Re: [PATCH] usb-core: Remove Fix mes in file hcd.c

On Fri, Jul 18, 2014 at 3:09 PM, Alan Stern <[email protected]> wrote:
> On Fri, 18 Jul 2014, Nicholas Krause wrote:
>
>> I am removing two fix mes in this file as after dicussing then it seems
>> there is no reason to check against Null for usb_device as it can never
>> be NULL and this is check is therefore not needed.
>>
>> Signed-off-by: Nicholas Krause <[email protected]>
>> ---
>> drivers/usb/core/hcd.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
>> index bec31e2..487abcf 100644
>> --- a/drivers/usb/core/hcd.c
>> +++ b/drivers/usb/core/hcd.c
>> @@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
>> struct usb_bus *usb_bus = rh_usb_dev->bus;
>> struct usb_hcd *usb_hcd;
>>
>> - if (usb_bus == NULL) /* FIXME: not sure if this case is possible */
>> - return -ENODEV;
>> usb_hcd = bus_to_hcd(usb_bus);
>> return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
>> }
>> @@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
>> struct usb_bus *usb_bus = rh_usb_dev->bus;
>> struct usb_hcd *usb_hcd;
>>
>> - if (usb_bus == NULL) /* FIXME: not sure if this case is possible */
>> - return -ENODEV;
>> usb_hcd = bus_to_hcd(usb_bus);
>> result = sscanf(buf, "%u\n", &val);
>> if (result == 1) {
>
> Acked-by: Alan Stern <[email protected]>
>
Great to hear this is going through :).
Nick

2014-07-19 02:36:15

by Sasha Levin

[permalink] [raw]
Subject: Re: [PATCH] usb-core: Remove Fix mes in file hcd.c

On 07/18/2014 01:34 PM, Nicholas Krause wrote:
> I am removing two fix mes in this file as after dicussing then it seems
> there is no reason to check against Null for usb_device as it can never
> be NULL and this is check is therefore not needed.
>
> Signed-off-by: Nicholas Krause <[email protected]>

Please explain exactly why it's not needed, why it can never be NULL, and
what prevents it from being NULL.

"after dicussing" (do you run spellcheck on your mails?) won't mean anything
to someone looking at this commit in a year.

Your commit message also mentions usb_device which has nothing to do with
your patch.


Thanks,
Sasha

2014-07-19 02:45:52

by Nicholas Krause

[permalink] [raw]
Subject: Re: [PATCH] usb-core: Remove Fix mes in file hcd.c

Sorry didn't run spell check. I will resend this patch with the
correct information
as needed. Thanks for the advice, Sasha.

Cheers Nick

On Fri, Jul 18, 2014 at 10:36 PM, Sasha Levin <[email protected]> wrote:
> On 07/18/2014 01:34 PM, Nicholas Krause wrote:
>> I am removing two fix mes in this file as after dicussing then it seems
>> there is no reason to check against Null for usb_device as it can never
>> be NULL and this is check is therefore not needed.
>>
>> Signed-off-by: Nicholas Krause <[email protected]>
>
> Please explain exactly why it's not needed, why it can never be NULL, and
> what prevents it from being NULL.
>
> "after dicussing" (do you run spellcheck on your mails?) won't mean anything
> to someone looking at this commit in a year.
>
> Your commit message also mentions usb_device which has nothing to do with
> your patch.
>
>
> Thanks,
> Sasha

2014-07-19 02:52:11

by Nicholas Krause

[permalink] [raw]
Subject: Re: [PATCH] usb-core: Remove Fix mes in file hcd.c

On Fri, Jul 18, 2014 at 10:45 PM, Nick Krause <[email protected]> wrote:
> Sorry didn't run spell check. I will resend this patch with the
> correct information
> as needed. Thanks for the advice, Sasha.
>
> Cheers Nick
>
> On Fri, Jul 18, 2014 at 10:36 PM, Sasha Levin <[email protected]> wrote:
>> On 07/18/2014 01:34 PM, Nicholas Krause wrote:
>>> I am removing two fix mes in this file as after dicussing then it seems
>>> there is no reason to check against Null for usb_device as it can never
>>> be NULL and this is check is therefore not needed.
>>>
>>> Signed-off-by: Nicholas Krause <[email protected]>
>>
>> Please explain exactly why it's not needed, why it can never be NULL, and
>> what prevents it from being NULL.
>>
>> "after dicussing" (do you run spellcheck on your mails?) won't mean anything
>> to someone looking at this commit in a year.
>>
>> Your commit message also mentions usb_device which has nothing to do with
>> your patch.
>>
>>
>> Thanks,
>> Sasha

Sasha ,
Greg seems to have signed it off.
Cheers Nick

2014-07-23 00:44:08

by Sasha Levin

[permalink] [raw]
Subject: Re: [PATCH] usb-core: Remove Fix mes in file hcd.c

On 07/18/2014 10:52 PM, Nick Krause wrote:
> On Fri, Jul 18, 2014 at 10:45 PM, Nick Krause <[email protected]> wrote:
>> Sorry didn't run spell check. I will resend this patch with the
>> correct information
>> as needed. Thanks for the advice, Sasha.
>>
>> Cheers Nick
>>
>> On Fri, Jul 18, 2014 at 10:36 PM, Sasha Levin <[email protected]> wrote:
>>> On 07/18/2014 01:34 PM, Nicholas Krause wrote:
>>>> I am removing two fix mes in this file as after dicussing then it seems
>>>> there is no reason to check against Null for usb_device as it can never
>>>> be NULL and this is check is therefore not needed.
>>>>
>>>> Signed-off-by: Nicholas Krause <[email protected]>
>>>
>>> Please explain exactly why it's not needed, why it can never be NULL, and
>>> what prevents it from being NULL.
>>>
>>> "after dicussing" (do you run spellcheck on your mails?) won't mean anything
>>> to someone looking at this commit in a year.
>>>
>>> Your commit message also mentions usb_device which has nothing to do with
>>> your patch.
>>>
>>>
>>> Thanks,
>>> Sasha
>
> Sasha ,
> Greg seems to have signed it off.
> Cheers Nick

Greg?

Even if the patch is correct (and I'm not saying it is) the commit message is way off.


Thanks,
Sasha

2014-07-23 03:24:50

by Nicholas Krause

[permalink] [raw]
Subject: Re: [PATCH] usb-core: Remove Fix mes in file hcd.c

On Tue, Jul 22, 2014 at 8:44 PM, Sasha Levin <[email protected]> wrote:
> On 07/18/2014 10:52 PM, Nick Krause wrote:
>> On Fri, Jul 18, 2014 at 10:45 PM, Nick Krause <[email protected]> wrote:
>>> Sorry didn't run spell check. I will resend this patch with the
>>> correct information
>>> as needed. Thanks for the advice, Sasha.
>>>
>>> Cheers Nick
>>>
>>> On Fri, Jul 18, 2014 at 10:36 PM, Sasha Levin <[email protected]> wrote:
>>>> On 07/18/2014 01:34 PM, Nicholas Krause wrote:
>>>>> I am removing two fix mes in this file as after dicussing then it seems
>>>>> there is no reason to check against Null for usb_device as it can never
>>>>> be NULL and this is check is therefore not needed.
>>>>>
>>>>> Signed-off-by: Nicholas Krause <[email protected]>
>>>>
>>>> Please explain exactly why it's not needed, why it can never be NULL, and
>>>> what prevents it from being NULL.
>>>>
>>>> "after dicussing" (do you run spellcheck on your mails?) won't mean anything
>>>> to someone looking at this commit in a year.
>>>>
>>>> Your commit message also mentions usb_device which has nothing to do with
>>>> your patch.
>>>>
>>>>
>>>> Thanks,
>>>> Sasha
>>
>> Sasha ,
>> Greg seems to have signed it off.
>> Cheers Nick
>
> Greg?
>
> Even if the patch is correct (and I'm not saying it is) the commit message is way off.
>
>
> Thanks,
> Sasha


Sasha,
The patch is in the kernel now. I am not going through the trouble of removing
it, if you want to fix the commit message go on ahead.
Nick

2014-07-24 13:07:47

by Vlastimil Babka

[permalink] [raw]
Subject: Re: [PATCH] usb-core: Remove Fix mes in file hcd.c

On 07/23/2014 05:24 AM, Nick Krause wrote:
> On Tue, Jul 22, 2014 at 8:44 PM, Sasha Levin <[email protected]> wrote:
>> On 07/18/2014 10:52 PM, Nick Krause wrote:
>>>>> Please explain exactly why it's not needed, why it can never be NULL, and
>>>>> what prevents it from being NULL.
>>>>>
>>>>> "after dicussing" (do you run spellcheck on your mails?) won't mean anything
>>>>> to someone looking at this commit in a year.
>>>>>
>>>>> Your commit message also mentions usb_device which has nothing to do with
>>>>> your patch.
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Sasha
>>>
>>> Sasha ,
>>> Greg seems to have signed it off.
>>> Cheers Nick
>>
>> Greg?
>>
>> Even if the patch is correct (and I'm not saying it is) the commit message is way off.
>>
>>
>> Thanks,
>> Sasha
>
>
> Sasha,
> The patch is in the kernel now.

Greg's tree is not Linus' tree, so it's not set to stone in git commit
history yet.

> I am not going through the trouble of removing
> it, if you want to fix the commit message go on ahead.
> Nick

This kind of attitude might significantly lower your chances of future
patches being accepted.

Vlastimil


> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2014-07-24 16:17:19

by Nicholas Krause

[permalink] [raw]
Subject: Re: [PATCH] usb-core: Remove Fix mes in file hcd.c

On Thu, Jul 24, 2014 at 9:07 AM, Vlastimil Babka <[email protected]> wrote:
> On 07/23/2014 05:24 AM, Nick Krause wrote:
>>
>> On Tue, Jul 22, 2014 at 8:44 PM, Sasha Levin <[email protected]> wrote:
>>>
>>> On 07/18/2014 10:52 PM, Nick Krause wrote:
>>>>>>
>>>>>> Please explain exactly why it's not needed, why it can never be NULL,
>>>>>> and
>>>>>> what prevents it from being NULL.
>>>>>>
>>>>>> "after dicussing" (do you run spellcheck on your mails?) won't mean
>>>>>> anything
>>>>>> to someone looking at this commit in a year.
>>>>>>
>>>>>> Your commit message also mentions usb_device which has nothing to do
>>>>>> with
>>>>>> your patch.
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Sasha
>>>>
>>>>
>>>> Sasha ,
>>>> Greg seems to have signed it off.
>>>> Cheers Nick
>>>
>>>
>>> Greg?
>>>
>>> Even if the patch is correct (and I'm not saying it is) the commit
>>> message is way off.
>>>
>>>
>>> Thanks,
>>> Sasha
>>
>>
>>
>> Sasha,
>> The patch is in the kernel now.
>
>
> Greg's tree is not Linus' tree, so it's not set to stone in git commit
> history yet.
>
>
>> I am not going through the trouble of removing
>>
>> it, if you want to fix the commit message go on ahead.
>> Nick
>
>
> This kind of attitude might significantly lower your chances of future
> patches being accepted.
>
> Vlastimil
>
>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>>
>

I thought Greg's tree get's directly into the mainline and after
checking it seems to me in
the mainline.
Cheers Nick